Commit 0e9a0cb7 authored by Fabrice  ALLAIN's avatar Fabrice ALLAIN
Browse files

docs: update tutorial

parent 62e288e4
## [0.0.21](https://gitlab.pasteur.fr/bis-aria/Ariaec/compare/0.1.0...0.0.21) (2019-07-05)
## [0.0.21](https://gitlab.pasteur.fr/bis-aria/Ariaec/compare/0.1.0...0.0.21) (2019-07-08)
### Bug Fixes
......
Version: 0.0.21
\ No newline at end of file
Version: 0.1.01
\ No newline at end of file
......@@ -15,48 +15,50 @@ can be found in the ``docs`` folder or :download:`here <../../examples.tar.gz>`.
Contact map analysis
--------------------
**Input**
.. code-block:: console
> ariaec maplot examples/bpt1/data/BPT1_BOVIN.fa examples/bpt1/data/BPT1_BOVIN.indextableplus examples/bpt1/data/BPT1_BOVIN.native.aligned.pdb examples/bpt1/data/BPT1_BOVIN_contacts.gremlin.out -o examples/bpt1/out -t pdb gremlin
(venv) [user@host examples] > ariaec maplot bpt1/data/BPT1_BOVIN.fa bpt1/data/BPT1_BOVIN.indextableplus bpt1/data/BPT1_BOVIN.native.aligned.pdb bpt1/data/BPT1_BOVIN_contacts.gremlin.out -o bpt1/out -t pdb gremlin
**Output**
.. code-block:: console
================================================================================
ARIA Evolutive Contact toolbox
================================================================================
================================================================================
ARIA Evolutive Contact toolbox
================================================================================
INFO Initialize settings
INFO Making output directories
INFO Reading fasta file /c7/home/fallain/tmp/bpt1/data/bpt1_bovin.fa
INFO Amino acid sequence: FCLEPPYTGPCKARIIRYFYNAKAGLCQTFVYGGCRAKRNNFKSAEDCMRTCG
INFO Checking if file /c7/home/fallain/tmp/bpt1/data/BPT1_BOVIN.indextableplus correspond to indextableplus format
INFO Format type correct (indextableplus)
INFO Reading secondary structure file /c7/home/fallain/tmp/bpt1/data/BPT1_BOVIN.indextableplus [indextableplus]
INFO Loading ss dist file
INFO Reading distance file /c7/home/fallain/.conda/envs/aria/lib/python2.7/site-packages/aria/conbox/data/ss_dist.txt
INFO Align secondary structure sequence with protein sequence
INFO Reading /c7/home/fallain/tmp/bpt1/data/BPT1_BOVIN.native.aligned.pdb file
INFO Updating distance map with pdb file
INFO Generate contact map using contact definition defaultdict(None, {'default_cutoff': 8.0})
INFO Using default cutoff
INFO Reading /c7/home/fallain/tmp/bpt1/data/BPT1_BOVIN_contacts.gremlin.out file
INFO Pdb map set as reference
INFO Generate contact map plot (/c7/home/fallain/tmp/bpt1/out/BPT1_BOVIN.maplot.pdf)
INFO Generate map report file (/c7/home/fallain/tmp/bpt1/out/mapreport)
INFO Generate roc file (/c7/home/fallain/tmp/bpt1/out/graphics/maplot.roc.csv)
INFO Generate roc plot (/c7/home/fallain/tmp/bpt1/out/graphics/maplot.roc.pdf)
INFO Generate precall file (/c7/home/fallain/tmp/bpt1/out/graphics/maplot.roc.csv)
INFO Generate precall plot (/c7/home/fallain/tmp/bpt1/out/graphics/maplot.precall.pdf)
INFO Generate contact file (/c7/home/fallain/tmp/bpt1/out/BPT1_BOVIN_contacts_gremlin.contact.txt)
INFO Generate stat file (/c7/home/fallain/tmp/bpt1/out/maplot.contactcmp.csv)
INFO Contact list: [(1, 39), (1, 42), (1, 51), (3, 22), (3, 25), (3, 45), (3, 47), (3, 51), (4, 23), (4, 38), (4, 39), (4, 42), (4, 49), (5, 23), (6, 19), (7, 37), (8, 12), (8, 31), (8, 33), (9, 19), (9, 34), (9, 37), (9, 41), (10, 33), (10, 36), (11, 33), (11, 35), (12, 8), (12, 20), (12, 31), (12, 33), (13, 33), (13, 34), (14, 31), (14, 33), (14, 36), (15, 31), (16, 29), (16, 31), (17, 41), (17, 43), (18, 28), (18, 29), (18, 45), (19, 6), (19, 9), (19, 28), (19, 29), (20, 12), (20, 25), (20, 27), (21, 28), (22, 3), (22, 25), (22, 28), (23, 4), (23, 5), (23, 26), (23, 29), (23, 43), (24, 28), (25, 3), (25, 20), (25, 22), (25, 28), (25, 46), (25, 53), (26, 23), (27, 20), (27, 48), (27, 52), (28, 18), (28, 19), (28, 21), (28, 22), (28, 24), (28, 25), (29, 16), (29, 18), (29, 19), (29, 23), (30, 33), (30, 37), (30, 38), (31, 8), (31, 12), (31, 14), (31, 15), (31, 16), (32, 37), (32, 38), (32, 40), (32, 41), (33, 8), (33, 10), (33, 11), (33, 12), (33, 13), (33, 14), (33, 30), (34, 9), (34, 13), (34, 37), (35, 11), (36, 10), (36, 14), (36, 39), (36, 50), (37, 7), (37, 9), (37, 30), (37, 32), (37, 34), (37, 41), (38, 4), (38, 30), (38, 32), (38, 41), (39, 1), (39, 4), (39, 36), (40, 32), (41, 9), (41, 17), (41, 32), (41, 37), (41, 38), (42, 1), (42, 4), (43, 17), (43, 23), (43, 47), (44, 47), (45, 3), (45, 18), (45, 49), (46, 25), (46, 49), (46, 50), (47, 3), (47, 43), (47, 44), (47, 51), (48, 27), (48, 52), (49, 4), (49, 45), (49, 46), (49, 53), (50, 36), (50, 46), (50, 53), (51, 1), (51, 3), (51, 47), (52, 27), (52, 48), (53, 25), (53, 49), (53, 50)]
INFO Generate contact map plot (/c7/home/fallain/tmp/bpt1/out/.maplot.pdf)
INFO Generate contact file (/c7/home/fallain/tmp/bpt1/out/BPT1_BOVIN_native_aligned.contact.txt)
INFO Initialize settings
INFO Making output directories
reading FASTA file examples/bpt1/data/BPT1_BOVIN.fa
INFO Amino acid sequence: FCLEPPYTGPCKARIIRYFYNAKAGLCQTFVYGGCRAKRNNFKSAEDCMRTCG
INFO Checking if file examples/bpt1/data/BPT1_BOVIN.indextableplus correspond to indextableplus format
INFO Format type correct (indextableplus)
INFO Reading secondary structure file examples/bpt1/data/BPT1_BOVIN.indextableplus [indextableplus]
INFO Loading ss dist file
INFO Reading distance file ss_dist.txt
INFO Align secondary structure sequence with protein sequence
INFO Reader focused on file(s) ['examples/bpt1/data/BPT1_BOVIN.native.aligned.pdb', 'examples/bpt1/data/BPT1_BOVIN_contacts.gremlin.out'] ['pdb', 'gremlin']
INFO Reading examples/bpt1/data/BPT1_BOVIN.native.aligned.pdb file
INFO Updating distance map with pdb file
INFO Generate contact map using contact definition defaultdict(None, {'bool': None, 'default_cutoff': 8.0})
INFO Using default cutoff
INFO Reading examples/bpt1/data/BPT1_BOVIN_contacts.gremlin.out file
INFO Pdb map set as reference
INFO Generate contact map plot (examples/bpt1/out/BPT1_BOVIN.maplot.pdf)
INFO Generate contact file (examples/bpt1/out/BPT1_BOVIN_native_aligned.contact.txt)
INFO Generate map report file (examples/bpt1/out/mapreport)
INFO Generate roc file (examples/bpt1/out/graphics/maplot.roc.csv)
INFO Generate roc plot (examples/bpt1/out/graphics/maplot.roc.pdf)
INFO Generate precall file (examples/bpt1/out/graphics/maplot.roc.csv)
INFO Generate precall plot (examples/bpt1/out/graphics/maplot.precall.pdf)
INFO Generate contact file (examples/bpt1/out/BPT1_BOVIN_contacts_gremlin.contact.txt)
INFO Generate stat file (examples/bpt1/out/maplot.contactcmp.csv)
INFO Contact list: [(1, 39), (1, 42), (1, 51), (3, 22), (3, 25), (3, 45), (3, 47), (3, 51), (4, 23), (4, 38), (4, 39), (4, 42), (4, 49), (5, 23), (6, 19), (7, 37), (8, 12), (8, 31), (8, 33), (9, 19), (9, 34), (9, 37), (9, 41), (10, 33), (10, 36), (11, 33), (11, 35), (12, 8), (12, 20), (12, 31), (12, 33), (13, 33), (13, 34), (14, 31), (14, 33), (14, 36), (15, 31), (16, 29), (16, 31), (17, 41), (17, 43), (18, 28), (18, 29), (18, 45), (19, 6), (19, 9), (19, 28), (19, 29), (20, 12), (20, 25), (20, 27), (21, 28), (22, 3), (22, 25), (22, 28), (23, 4), (23, 5), (23, 26), (23, 29), (23, 43), (24, 28), (25, 3), (25, 20), (25, 22), (25, 28), (25, 46), (25, 53), (26, 23), (27, 20), (27, 48), (27, 52), (28, 18), (28, 19), (28, 21), (28, 22), (28, 24), (28, 25), (29, 16), (29, 18), (29, 19), (29, 23), (30, 33), (30, 37), (30, 38), (31, 8), (31, 12), (31, 14), (31, 15), (31, 16), (32, 37), (32, 38), (32, 40), (32, 41), (33, 8), (33, 10), (33, 11), (33, 12), (33, 13), (33, 14), (33, 30), (34, 9), (34, 13), (34, 37), (35, 11), (36, 10), (36, 14), (36, 39), (36, 50), (37, 7), (37, 9), (37, 30), (37, 32), (37, 34), (37, 41), (38, 4), (38, 30), (38, 32), (38, 41), (39, 1), (39, 4), (39, 36), (40, 32), (41, 9), (41, 17), (41, 32), (41, 37), (41, 38), (42, 1), (42, 4), (43, 17), (43, 23), (43, 47), (44, 47), (45, 3), (45, 18), (45, 49), (46, 25), (46, 49), (46, 50), (47, 3), (47, 43), (47, 44), (47, 51), (48, 27), (48, 52), (49, 4), (49, 45), (49, 46), (49, 53), (50, 36), (50, 46), (50, 53), (51, 1), (51, 3), (51, 47), (52, 27), (52, 48), (53, 25), (53, 49), (53, 50)]
INFO Generate contact map plot (examples/bpt1/out/.maplot.pdf)
Setup
......
========
Tutorial
========
=========
Workflows
=========
Project preparation
===================
Structure calculation with EC restraints
========================================
The ``ariaec`` Command Line Interface (CLI) is the main tool for
converting and analyze contact map information. The main command of this
interface is ``ariaec setup`` which create an ARIA project XML file. Then we can
follow the usual steps for an ARIA project.
Configuration file
------------------
All the parameters for ``ariaec`` commands are encapsulated on a configuration file in INI format
All the parameters for ``ariaec`` commands are encapsulated on a configuration
file in INI format. Each time you need to overwrite the default parameters,
another configuration file can be used with the updated parameters. There is
no need to give all the parameters in order to have a correct configuration
file.
A more detailed description of the parameters is in :doc:`configuration`
section.
Project template
----------------
Restraints & project conversion
-------------------------------
Setup
-----
Build infrastructure
--------------------
Running ARIA
......
......@@ -17,7 +17,7 @@ ARIAEC
.. code-block:: shell
ariaec COMMAND [OPTIONS] ARGS
ariaec COMMAND ARGS [OPTIONS]
**Commands**
......@@ -71,7 +71,7 @@ Translate contact maps as distance restraints and initialize a new ARIA XML proj
.. code-block:: shell
ariaec setup [OPTIONS] SEQFILE INFILE [INFILE ...] -o OUTPUT_DIRECTORY -t INTYPE [INTYPE ...]
ariaec setup SEQFILE INFILE [INFILE ...] -o OUTPUT_DIRECTORY [OPTIONS] -t INTYPE [INTYPE ...]
**Arguments**
......@@ -135,6 +135,12 @@ Translate contact maps as distance restraints and initialize a new ARIA XML proj
- :sup:`*` Accepted contact map formats combining formats supported by ConKit_ with few supplementary formats: ``gremlin``, ``pconsc1``, ``pconsc3``, ``pconsc2``, ``bbcontacts``, ``metapsicov_stg1``, ``membrain``, ``metapsicovhb``, ``comsat``, ``casprr``, ``ccmpred``, ``plm``, ``bclcontact``, ``epcmap``, ``evfold``, ``native``, ``pconsc``, ``psicov``, ``freecontact``, ``genericstructure``, ``ncont``, ``plmc``, ``plmdca``, ``metapsicov_stg2``, ``native_full``, ``metapsicov``, ``evcoupling``, ``contactlist``, ``plmev``, ``mmcif``, ``casp``, ``pdb``, ``flib``
.. warning::
The contact map format option needs to have the same number of format that
the number of contact of pdb files. Since this is a greedy option, it needs
to be at the end of the command in order to work correctly.
Bbconv
++++++
Translate BBcontacts as distance restraints which can be used during
......@@ -142,7 +148,7 @@ Translate BBcontacts as distance restraints which can be used during
.. code-block:: shell
ariaec bbconv [OPTIONS] CONTACTFILE SSPRED SEQ [MSA] -t CONTACTYPE
ariaec bbconv CONTACTFILE SSPRED SEQ [MSA] [OPTIONS] -t CONTACTYPE
**Arguments**
......@@ -191,7 +197,7 @@ Contactmap analysis and visualisation tool.
.. code-block:: shell
ariaec maplot [-h] [--filter] [--onlyreport] [--no-filter] [--ssidx] [--prefix] [--prefixname PREFIXNAME] seq sspred infile [infile ...] -t intype [intype ...] --merge mergetype [mergetype ...]
ariaec maplot SEQ SSPRED INFILE [INFILE ...] [OPTIONS] -t INTYPE [INTYPE ...] --merge MERGETYPE [MERGETYPE ...]
**Arguments**
......
......@@ -128,7 +128,7 @@ class AriaEcContactMap(object):
mergecontactmap = mergemaps.get("maplot")
for mapname, mapt in self.allresmap.keys():
if mapt != self.reftype:
# TODO: DON'T WORK !!!!
# TODO: DOESN'T WORK !!!!
LOG.info("Merging %s with %s map",
mergetype, mapt)
up_map = self.allresmap[mapt]["maplot"]
......@@ -191,11 +191,14 @@ class AriaEcContactMap(object):
cmpmap.write_contacts(mapname,
scoremap=scoremap,
outdir=outdir)
cmpmap.compare_contactmap(refmap, cmplist, prefix,
cmpmap.compare_contactmap(refmap, cmplist,
prefix if prefix else "cmp",
distmap=self.refmap["distmap"],
human_idx=True,
outdir=outdir)
refmap.compareplot(cmpmap, outprefix=prefix,
LOG.info(prefix)
refmap.compareplot(cmpmap,
outprefix=prefix if prefix else "ref",
outdir=outdir,
save_fig=self.settings.maplot.config.get(
"save_fig"),
......
......@@ -490,7 +490,7 @@ class ProteinMap(Map):
Parameters
----------
outdir :
param outprefix: (Default value = '')
param outprefix: (Default value = 'protein')
size_fig :
param plot_ext: (Default value = 10)
plot_dpi :
......@@ -2470,16 +2470,6 @@ class MapFilter(object):
"""
# TODO: utiliser self.clash_dict au lieu de meta_clash
"""
:param clash_dict:
:param desc_dict:
:param contactlist:
:param outdir:
:param outprefix:
:param clashlist:
:param human_idx:
"""
meta_clash = {
"cons": {
"flag": 888, "msg": "", "warn": "",
......
......@@ -101,6 +101,9 @@ class XMLElement:
def get_cdata(self):
return self.__cdata
def get_name(self):
return self.__name if self.__name else self.__class__.__name__
# def get_name(self):
# raise
# attr = '_%s__name' % self.__class__.__name__
......@@ -133,6 +136,12 @@ class XMLElement:
return 'XMLElement(name=%s, tag_order=%s)' % \
(self.get_name(), str(self.get_tag_order()))
def __repr__(self):
print('XMLElement(name=%s, tag_order=%s)' % \
(str(self.get_name()), str(self.get_tag_order())))
return 'XMLElement(name=%s, tag_order=%s)' % \
(str(self.get_name()), str(self.get_tag_order()))
class ContentConverter:
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment