Commit 13213dd3 authored by Fabrice  ALLAIN's avatar Fabrice ALLAIN
Browse files

*: update tutorial & fix NoneType issue for pdbqual when path are missing in the configuration file

parent f891072c
Configuration
Configuration
=============
The following tables list the available parameters with the corresponding
sections. In order to change default parameters, the tool can accept a
configuration file with the ``-c`` option in the :doc:`usage`. This
configuration file should follow the `INI <https://en.wikipedia.org/wiki/INI_file>`_ format.
configuration file should follow the
`INI <https://en.wikipedia.org/wiki/INI_file>`_ format. The default file can be
downloaded :download:`here <../src/aria/conbox/conf/config.ini>`.
.. note::
There is no need to give all the parameters in a configuration file. If a
field is not in the file, the CLI will take the value in the default file.
**Example:**
......@@ -14,15 +20,9 @@ configuration file should follow the `INI <https://en.wikipedia.org/wiki/INI_fil
; comment
parameter: value
main
----
.. note::
Leave these fields empty in order to use default files.
.. rst-class:: table-hover
+--------------------------+------+------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------+
......
BPT1_BOVIN structure prediction with EC map
===========================================
We show an example of *de novo* structure prediction from GREMLIN_ contacts
combined with secondary structure prediction. The files related to this example
can be found in the ``docs`` folder or :download:`here <../../examples.tar.gz>`.
.. note::
Even if data for this example are already in the ``docs/examples`` folder. You
have to change at least ``cns_executable`` and ``host_executable`` with the
path of your CNS_ executable (not supplied in this package) in the
configuration file . Otherwise, this example will not work.
Contact map analysis
--------------------
......
=========
Workflows
=========
.. note::
Even if data for this tutorial are already in the ``docs/examples`` folder. You
have to change at least ``cns_executable`` and ``host_executable`` with the
path of your CNS_ executable (not supplied in this package) in the
configuration file . Otherwise, this example will not work.
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.
We show here an example of *de novo* structure prediction from GREMLIN_ contacts
combined with secondary structure prediction with the ``ariaec`` Command Line
Interface (CLI) is the tool for converting and analyze contact map information.
. The files related to this example can be found in the ``docs`` folder
or :download:`here <../../examples.tar.gz>`.
Configuration file
......@@ -20,8 +24,6 @@ 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.
......@@ -29,11 +31,198 @@ section.
Restraints & project conversion
-------------------------------
The main command of this interface is ``ariaec setup`` which convert EC data
and create an ARIA project XML file. Then we can follow the usual steps like an
usual ARIA project.
.. code-block:: console
(venv) [user@host tmp] > ariaec setup bpt1/data/BPT1_BOVIN.fa bpt1/data/BPT1_BOVIN_contacts.gremlin.out -t gremlin -s bpt1/data/BPT1_BOVIN.indextableplus -o /tmp -c bpt1/data/config.ini
================================================================================
ARIA Evolutive Contact toolbox
================================================================================
INFO Initialize settings
INFO Updating settings according to config file
INFO Making output directories
INFO Reading fasta file /tmp/bpt1/data/bpt1_bovin.fa
INFO Amino acid sequence: FCLEPPYTGPCKARIIRYFYNAKAGLCQTFVYGGCRAKRNNFKSAEDCMRTCG
INFO Checking if file /tmp/bpt1/data/BPT1_BOVIN.indextableplus correspond to indextableplus format
INFO Format type correct (indextableplus)
INFO Reading secondary structure file /tmp/bpt1/data/BPT1_BOVIN.indextableplus [indextableplus]
INFO Loading ss dist file
INFO Reading distance file /.conda/envs/aria/lib/python2.7/site-packages/aria/conbox/data/ss_dist.txt
INFO Align secondary structure sequence with protein sequence
INFO Reading /tmp/bpt1/data/BPT1_BOVIN_contacts.gremlin.out file
INFO Filtering gremlin contact map
INFO ...Position filter
INFO Removed 21 contacts.
INFO ...Conservation filter
INFO Conservation filter only works with indextableplus files !
INFO ...Secondary structure clash filter
INFO Removed 1 contacts.
INFO ...Disulfure bridge unicity filter
INFO Removed 11 contacts.
INFO Setting contact number with treshold 1.0
INFO Update gremlin maplot
INFO Update gremlin scoremap
INFO Select top 53 contacts according to scoremap
writing to the file: /tmp/etc/BPT1_BOVIN.seq
INFO Load molecule file and convert it into xml format
INFO [SequenceList]: reading sequence /tmp/etc/BPT1_BOVIN.seq
reading /tmp/etc/BPT1_BOVIN.seq
INFO Writing tbl files ...
INFO Dihedral restraints for secondary structures (/tmp/tbl/BPT1_BOVIN_dihed.tbl)
INFO Secondary structure restraints (/tmp/tbl/BPT1_BOVIN_ssdist.tbl)
INFO Helix bond restraints (/tmp/tbl/BPT1_BOVIN_hbond.tbl)
INFO Writing gremlin ARIA XML distance restraints
INFO Using contact scores as selection criteria
INFO Selecting 53 contacts
INFO 0%| | 0/53 [00:00<?, ?it/s]
INFO 100%|##########| 53/53 [00:00<00:00, 2549.17it/s]
INFO Write 53 xml distance restraints in /tmp/xml/BPT1_BOVIN_gremlin.xml
INFO Loading aria template file /.conda/envs/aria/lib/python2.7/site-packages/aria/conbox/templates/aria_project_v2.3.7.xml
INFO Writing ARIA project file (/tmp/ariaproject.xml)
INFO Generate contact file (/tmp/etc/BPT1_BOVIN_gremlin_filtered.contact.txt)
Build infrastructure
--------------------
Before running the structure calculation pipeline, ARIA needs to build the whole
infrastructure of the project.
.. code-block:: console
(venv) [user@host tmp] > aria2 -s bpt1/out/ariaproject.xml
Loading project "ariaproject.xml"...
Setting-up bpt1/out/ariaproject.xml (run: 1)
INFO [Project]: Protocols copied.
INFO [Project]: Directory tree created.
INFO [Project]: Copying data files into local data-directory...
Done.
For running ARIA: aria2 bpt1/out/ariaproject.xml
Running ARIA
============
------------
.. code-block:: console
(venv) [user@host tmp] > aria2 --no-test bpt1/out/ariaproject.xml
.. warning::
Most of the time the ``--no-test`` flags needs to be activated
Analysis
========
Configuration file
------------------
A possible way to analyze different output according to their initial parameters
in a configuration file is to use the `iniconv` command. It will convert the
file into a comma separated value file which can be more practical for an
analysis pipeline.
.. code-block:: console
(venv) [user@host tmp] > ariaec iniconv bpt1/data/config.ini -o bpt1/out
================================================================================
ARIA Evolutive Contact toolbox
================================================================================
INFO Initialize settings
INFO Reading configuration file(s)
INFO Generate output csv file (configs.csv)
Contact map analysis
--------------------
To quickly see several plots and stats related to the reference structure
or/with the EC contact maps. We can use the ``maplot`` subcommand. The first
argument in this command will always be set as the reference map/pdb for the
contact map, ROC or precision-recall plots.
.. code-block:: console
(venv) [user@host tmp] > 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
================================================================================
ARIA Evolutive Contact toolbox
================================================================================
INFO Initialize settings
INFO Making output directories
INFO Reading fasta file /tmp/bpt1/data/bpt1_bovin.fa
INFO Amino acid sequence: FCLEPPYTGPCKARIIRYFYNAKAGLCQTFVYGGCRAKRNNFKSAEDCMRTCG
INFO Checking if file /tmp/bpt1/data/BPT1_BOVIN.indextableplus correspond to indextableplus format
INFO Format type correct (indextableplus)
INFO Reading secondary structure file /tmp/bpt1/data/BPT1_BOVIN.indextableplus [indextableplus]
INFO Loading ss dist file
INFO Reading distance file /tmp/venv/lib/python2.7/site-packages/aria/conbox/data/ss_dist.txt
INFO Align secondary structure sequence with protein sequence
INFO Reading /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 /tmp/bpt1/data/BPT1_BOVIN_contacts.gremlin.out file
INFO Pdb map set as reference
INFO Generate contact map plot (/tmp/bpt1/out/BPT1_BOVIN.maplot.pdf)
INFO Generate map report file (/tmp/bpt1/out/mapreport)
INFO Generate roc file (/tmp/bpt1/out/graphics/maplot.roc.csv)
INFO Generate roc plot (/tmp/bpt1/out/graphics/maplot.roc.pdf)
INFO Generate precall file (/tmp/bpt1/out/graphics/maplot.roc.csv)
INFO Generate precall plot (/tmp/bpt1/out/graphics/maplot.precall.pdf)
INFO Generate contact file (/tmp/bpt1/out/BPT1_BOVIN_contacts_gremlin.contact.txt)
INFO Generate stat file (/tmp/bpt1/out/cmp.contactcmp.csv)
INFO
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 (/tmp/bpt1/out/ref.maplot.pdf)
INFO Generate contact file (/tmp/bpt1/out/BPT1_BOVIN_native_aligned.contact.txt)
Structure quality report
------------------------
The generated structures can be analyzed with procheck, whatif, clashlist or
prosa using ``ariaec pdbqual`` command. It will only need a configuration
file with the path to the executable of the quality tool.
.. code-block:: console
(venv) [user@host tmp] > ariaec pdbqual run1/structures/it2/fitted.pdb -o bpt1/out/ -c bpt1/data/config.ini
================================================================================
ARIA Evolutive Contact toolbox
================================================================================
INFO Initialize settings
INFO Updating settings according to config file
INFO Starting quality runs with ['/tmp/run1/structures/it2/fitted.pdb'] file(s)
INFO Copying file(s) to output directory /tmp/bpt1/out
...
QualityChecks.py finished.
INFO /tmp/bpt1/out/quality_checks generated
INFO Removing infile(s) in output directory /tmp/bpt1/out
.. note::
If quality tools has been configured in the pipeline. There is no need to
run this command after ARIA calculation.
Violation analysis
------------------
......@@ -20,7 +20,7 @@ interupperbounds_pdbstat:
intralowerbounds_pdbstat:
intratarget_pdbstat:
intraupperbounds_pdbstat:
ariaproject_template: 2.3.6
ariaproject_template: 2.3.7
procheck_executable:
prosa_executable:
whatif_executable:
......@@ -201,15 +201,15 @@ water_refinement_solvent: water
water_refinement_n_structures: 10
water_refinement_enabled: no
water_refinement_write_solvent_molecules: no
structure_analysis_enabled: yes
structures_analysis_enabled: yes
procheck_executable:
procheck_enabled: yes
procheck_enabled: no
prosa_executable:
prosa_enabled: yes
prosa_enabled: no
whatif_executable:
whatif_enabled: yes
whatif_enabled: no
clashlist_executable:
clashlist_enabled: no
clashlist_enabled: no
pickle_output: no
; --------------------------- Iteration parameters --------------------------- #
; /!\ Parameters below can be formatted as a list if we want different values
......
......@@ -24,21 +24,24 @@ class AriaEcPdbqual(CommandProtocol):
def run(self):
""":return:"""
LOG.info("Starting quality runs with %s file(s)", self.settings.pdbqual["infiles"])
LOG.info("Copying file(s) to output directory")
LOG.info("Copying file(s) to output directory %s", self.settings.pdbqual["output_directory"])
for infile in self.settings.pdbqual["infiles"]:
if os.path.abspath(infile) != os.path.abspath(self.settings.pdbqual["output_directory"]):
shutil.copy(infile, self.settings.pdbqual["output_directory"])
LOG.info(self.settings.pdbqual["output_directory"])
runChecks(
workingDirectory=self.settings.pdbqual["output_directory"],
trashDirectory=self.settings.pdbqual["trash_directory"],
procheckExe=self.settings.setup["procheck_executable"],
procheckExe=self.settings.setup["procheck_executable"]
if self.settings.setup["procheck_executable"] else '',
procheckOnOff=1 if self.settings.setup["procheck_enabled"] in ("yes", True, "True") else 0,
whatIfExe=self.settings.setup["whatif_executable"],
whatIfExe=self.settings.setup["whatif_executable"]
if self.settings.setup["whatif_executable"] else '',
whatifOnOff=1 if self.settings.setup["whatif_enabled"] in ("yes", True, "True") else 0,
clashlistExe=self.settings.setup["clashlist_executable"],
clashlistExe=self.settings.setup["clashlist_executable"]
if self.settings.setup["clashlist_executable"] else '',
clashlistOnOff=1 if self.settings.setup["clashlist_enabled"] in ("yes", True, "True") else 0,
prosaExe=self.settings.setup["prosa_executable"] if self.settings.main["prosa_executable"] else "",
prosaExe=self.settings.setup["prosa_executable"]
if self.settings.setup["prosa_executable"] else "",
prosaOnOff=1 if self.settings.setup["prosa_enabled"] in ("yes", True, "True") else 0,
cshExe=self.settings.pdbqual["csh_executable"],
howManyPdb=len(self.settings.pdbqual["infiles"]),
......@@ -56,4 +59,5 @@ class AriaEcPdbqual(CommandProtocol):
for infile in self.settings.pdbqual["infiles"]
if os.path.exists(os.path.join(
self.settings.pdbqual["output_directory"],
os.path.basename(infile)))]
os.path.basename(infile)))
]
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