Skip to content

Commit

Permalink
scripts renamed to avoid name clashes on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Simkovic committed Feb 19, 2017
1 parent f2915ab commit 9104a9e
Show file tree
Hide file tree
Showing 16 changed files with 36 additions and 34 deletions.
File renamed without changes.
File renamed without changes.
4 changes: 3 additions & 1 deletion bin/conkit.plot → bin/conkit-plot
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ def main():
logging.info('This script is experimental for inter-chain contact plotting')

logging.info('Min sequence separation for contacting residues: {0}'.format(args.dtn))
logging.info('Contact list cutoff factor: {0} * L'.format(args.dfactor))
logging.info('Min contact list cutoff factor: {0} * L'.format(args.min_cutoff))
logging.info('Max contact list cutoff factor: {0} * L'.format(args.max_cutoff))
logging.info('Contact list cutoff factor step: {0}'.format(args.cutoff_step))

seq = conkit.io.read(args.seqfile, args.seqformat)[0]
con = conkit.io.read(args.confile, args.conformat)[0]
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,11 @@ pseudoxml:
figures:
mkdir _tmp
git clone https://github.com/rigdenlab/conkit-examples.git _tmp/conkit-examples
conkit.plot chord -o examples/images/toxd_chord_simple.png _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit.plot cmap -o examples/images/toxd_cmap_simple.png _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit.plot cmap -o examples/images/toxd_cmap_reference.png -p _tmp/conkit-examples/toxd/toxd.pdb _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit.plot cmap -o examples/images/toxd_cmap_advanced.png -e _tmp/conkit-examples/toxd/toxd.psicov -ef psicov -p _tmp/conkit-examples/toxd/toxd.pdb _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit.plot cmap -o examples/images/toxd_cmap_confidence.png --confidence -e _tmp/conkit-examples/toxd/toxd.psicov -ef psicov -p _tmp/conkit-examples/toxd/toxd.pdb _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit.plot scov -o examples/images/toxd_scov_plot.png _tmp/conkit-examples/toxd/toxd.a3m a3m
conkit.plot peval -o examples/images/toxd_peval_plot.png -j 0.1 -min 0 -max 5 _tmp/conkit-examples/toxd/toxd.pdb pdb _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit-plot chord -o examples/images/toxd_chord_simple.png _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit-plot cmap -o examples/images/toxd_cmap_simple.png _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit-plot cmap -o examples/images/toxd_cmap_reference.png -p _tmp/conkit-examples/toxd/toxd.pdb _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit-plot cmap -o examples/images/toxd_cmap_advanced.png -e _tmp/conkit-examples/toxd/toxd.psicov -ef psicov -p _tmp/conkit-examples/toxd/toxd.pdb _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit-plot cmap -o examples/images/toxd_cmap_confidence.png --confidence -e _tmp/conkit-examples/toxd/toxd.psicov -ef psicov -p _tmp/conkit-examples/toxd/toxd.pdb _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
conkit-plot scov -o examples/images/toxd_scov_plot.png _tmp/conkit-examples/toxd/toxd.a3m a3m
conkit-plot peval -o examples/images/toxd_peval_plot.png -j 0.1 -min 0 -max 5 _tmp/conkit-examples/toxd/toxd.pdb pdb _tmp/conkit-examples/toxd/toxd.fasta fasta _tmp/conkit-examples/toxd/toxd.mat ccmpred
rm -rf _tmp
4 changes: 2 additions & 2 deletions docs/examples/rst/python_analyse_conpred.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ This shows that the most confidently predicted contact is between residues 21 an

.. note::

You can use the ``conkit.precision`` script to achieve the same goal.
You can use the ``conkit-precision`` script to achieve the same goal.

Finally, in some cases you either have already existing structural information, such as a crystal structure, or a predicted model and you want to assess how accurate or satisfied your contact prediction is. For this kind of analysis, the precision score is the ideal measure. It compares one set of contacts against a second and calculates the ratio between the matches and the total number of contacts compared.

Expand Down Expand Up @@ -101,7 +101,7 @@ To produce a precision evaluation plot with factors between 0.0 and 5.0 with a s

.. note::

You can also generate the final plot using the ``conkit.plot`` script.
You can also generate the final plot using the ``conkit-plot`` script.


.. |beta| unicode:: u03B2
4 changes: 2 additions & 2 deletions docs/examples/rst/script_analyse_msa.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Multiple Sequence Alignment Analysis
You require the optional dependency `SciPy <http://scipy.org/>`_ package to use this script. If you are unsure if it is installed on your system, refer to the :ref:`Installation` documentation


If you would like to analyse a Multiple Sequence Alignment (MSA) file, you can do so using ConKit's provided script, which is called ``conkit.msatool``.
If you would like to analyse a Multiple Sequence Alignment (MSA) file, you can do so using ConKit's provided script, which is called ``conkit-msatool``.

.. code-block:: bash
$> conkit.msatool toxd/toxd.a3m a3m
$> conkit-msatool toxd/toxd.a3m a3m
The call above analyses the ``toxd.a3m`` MSA file, which is in ``a3m`` format. This call with will procude the following output:

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/rst/script_convert_conpred.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
File Format Conversion
----------------------

If you would like to convert a file from one format to another, you can do so using ConKit's provided script, which is called ``conkit.convert``.
If you would like to convert a file from one format to another, you can do so using ConKit's provided script, which is called ``conkit-convert``.

.. code-block:: bash
$> conkit.convert toxd/toxd.mat ccmpred toxd/toxd.rr casprr
$> conkit-convert toxd/toxd.mat ccmpred toxd/toxd.rr casprr
The call above converts the ``toxd.mat`` file, which is in ``ccmpred`` format, to the ``toxd.rr`` file in ``casprr`` format.

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/rst/script_convert_msa.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
File Format Conversion
----------------------

If you would like to convert a file from one format to another, you can do so using ConKit's provided script, which is called ``conkit.convert``.
If you would like to convert a file from one format to another, you can do so using ConKit's provided script, which is called ``conkit-convert``.

.. code-block:: bash
$> conkit.convert toxd/toxd.a3m a3m toxd/toxd.fasta fasta
$> conkit-convert toxd/toxd.a3m a3m toxd/toxd.fasta fasta
The call above converts the ``toxd.a3m`` file, which is in ``a3m`` format, to the ``toxd.fasta`` file in ``fasta`` format.

Expand Down
6 changes: 3 additions & 3 deletions docs/examples/rst/script_plot_chord.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Contact Map Chord Diagram Plotting
----------------------------------

If you would like to plot a contact map in Chord diagram style using ConKit without the overhead of using Python, you can simply use the ``conkit.plot`` script.
If you would like to plot a contact map in Chord diagram style using ConKit without the overhead of using Python, you can simply use the ``conkit-plot`` script.

.. code-block:: bash
$> conkit.plot chord toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
$> conkit-plot chord toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
The call above uses the contact prediction file ``toxd.mat`` file, which is in ``ccmpred`` format, and plots the following contact map stored in the file ``toxd/toxd.png``.

Expand Down Expand Up @@ -40,4 +40,4 @@ Each residue in the Chord plot corresponds to an amino acid in your sequence. Fo

The color coding of the full sequence used is the following:

:gln:`Q` :pro:`P` :arg:`R` :arg:`R` :lys:`K` :leu:`L` :cys:`C` :ile:`I` :leu:`L` :his:`H` :arg:`R` :asn:`N` :pro:`P` :gly:`G` :arg:`R` :cys:`C` :thr:`T` :tyr:`Y` :asp:`D` :lys:`K` :ile:`I` :pro:`P` :ala:`A` :phe:`F` :tyr:`Y` :tyr:`Y` :asn:`N` :gln:`Q` :lys:`K` :lys:`K` :lys:`K` Q :cys:`C` :glu:`E` :arg:`R` :phe:`F` :asp:`D` :trp:`W` :ser:`S` :gly:`G` :cys:`C` :gly:`G` :gly:`G` :asn:`N` :ser:`S` :asn:`N` :arg:`R` :phe:`F` :lys:`K` :thr:`T` :ile:`I` :glu:`E` :glu:`E` :cys:`C` :arg:`R` :arg:`R` :thr:`T` :cys:`C` :ile:`I` :gly:`G`
:gln:`Q` :pro:`P` :arg:`R` :arg:`R` :lys:`K` :leu:`L` :cys:`C` :ile:`I` :leu:`L` :his:`H` :arg:`R` :asn:`N` :pro:`P` :gly:`G` :arg:`R` :cys:`C` :thr:`T` :tyr:`Y` :asp:`D` :lys:`K` :ile:`I` :pro:`P` :ala:`A` :phe:`F` :tyr:`Y` :tyr:`Y` :asn:`N` :gln:`Q` :lys:`K` :lys:`K` :lys:`K` Q :cys:`C` :glu:`E` :arg:`R` :phe:`F` :asp:`D` :trp:`W` :ser:`S` :gly:`G` :cys:`C` :gly:`G` :gly:`G` :asn:`N` :ser:`S` :asn:`N` :arg:`R` :phe:`F` :lys:`K` :thr:`T` :ile:`I` :glu:`E` :glu:`E` :cys:`C` :arg:`R` :arg:`R` :thr:`T` :cys:`C` :ile:`I` :gly:`G`
10 changes: 5 additions & 5 deletions docs/examples/rst/script_plot_map.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
Contact Map Plotting
--------------------

If you would like to plot a contact map using ConKit without the overhead of using Python, you can simply use the ``conkit.plot`` script.
If you would like to plot a contact map using ConKit without the overhead of using Python, you can simply use the ``conkit-plot`` script.

.. code-block:: bash
$> conkit.plot cmap toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
$> conkit-plot cmap toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
The call above uses the contact prediction file ``toxd.mat`` file, which is in ``ccmpred`` format, and plots the following 2D contact map stored in the file ``toxd/toxd.png``

Expand All @@ -22,7 +22,7 @@ You can also add a reference structure to determine which contacts are true and

.. code-block:: bash
$> conkit.plot cmap -p toxd/toxd.pdb toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
$> conkit-plot cmap -p toxd/toxd.pdb toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
The call above produces a contact map plot looking like this. The gray points are the reference contacts, green show true positive contacts in your prediction and red false positive ones.
Expand All @@ -37,7 +37,7 @@ You could also add a second contact prediction file to the call to compare two m

.. code-block:: bash
$> conkit.plot cmap -e toxd/toxd.psicov -ef psicov -p toxd/toxd.pdb toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
$> conkit-plot cmap -e toxd/toxd.psicov -ef psicov -p toxd/toxd.pdb toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
The call above produces a contact map plot looking like this. The gray points are the reference contacts, green show true positive contacts in your prediction and red false positive ones. The top triangle is the second contact map from file ``toxd/toxd.psicov`` whereas the bottom one is from ``toxd/toxd.mat``.

Expand All @@ -51,7 +51,7 @@ Finally, you could also illustrate the confidence with which each contact was pr

.. code-block:: bash
$> conkit.plot cmap --confidence -e toxd/toxd.psicov -ef psicov -p toxd/toxd.pdb toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
$> conkit-plot cmap --confidence -e toxd/toxd.psicov -ef psicov -p toxd/toxd.pdb toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
The call above produces a contact map plot looking like this. All parameters and settings are identical to the previous map except the ``--confidence`` flag, which will show more confidently predicted contacts as larger markers.

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/rst/script_plot_peval.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Precision Evaluation Plotting

.. code-block:: bash
$> conkit.plot peval -j 0.1 -min 0 -max 5 toxd/toxd.pdb pdb toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
$> conkit-plot peval -j 0.1 -min 0 -max 5 toxd/toxd.pdb pdb toxd/toxd.fasta fasta toxd/toxd.mat ccmpred
Three command line flags above are important to note. The ``-min`` flag is the minimum factor for contact selection, i.e. ``L * min`` number of contacts. The ``-max`` flag is the maximum factor for contact selection, i.e. ``L * max`` number of contacts. The ``-j`` flag defines the stepwise increase inbetween ``-min`` and ``-max``.

Expand Down
4 changes: 2 additions & 2 deletions docs/examples/rst/script_plot_scov.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
Sequence Coverage Plotting
--------------------------

The ``scov`` subcommand of the ``conkit.plot`` script is used to plot the coverage plot of the multiple sequence alignment.
The ``scov`` subcommand of the ``conkit-plot`` script is used to plot the coverage plot of the multiple sequence alignment.

.. code-block:: bash
$> conkit.plot scov toxd/toxd.a3m a3m
$> conkit-plot scov toxd/toxd.a3m a3m
The following plot will be produced. Your alignment coverage is shown with the black line with each point corresponding to a residue in the alignment. The red and green lines give you indicators of how good your alignment is.

Expand Down
8 changes: 4 additions & 4 deletions docs/examples/rst/script_predict_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ Contact Prediction

External software is required to execute this script. For further information, refer to the :ref:`installation` page.

The script to run contact prediction using `HHblits <https://github.com/soedinglab/hh-suite>`_ to generate your sequence alignment and `CCMpred <https://github.com/soedinglab/CCMpred>`_ to predict the contacts is called ``conkit.predict``. You can run this script using two different modes.
The script to run contact prediction using `HHblits <https://github.com/soedinglab/hh-suite>`_ to generate your sequence alignment and `CCMpred <https://github.com/soedinglab/CCMpred>`_ to predict the contacts is called ``conkit-predict``. You can run this script using two different modes.

**1. Starting with a sequence**

.. code-block:: bash
$> conkit.predict seq <path/to/hhblits> <path/to/hhblits_database> <path/to/ccmpred> toxd/toxd.fasta fasta
$> conkit-predict seq <path/to/hhblits> <path/to/hhblits_database> <path/to/ccmpred> toxd/toxd.fasta fasta
The call above uses your sequence file ``toxd/toxd.fasta`` in ``fasta`` format to first generate a Multiple Sequence Alignment. It will then analyse your alignment identical to the ``conkit.msatool`` script. It will also sort out all the required conversions before executing CCMpred to run the contact prediction. Finally, it will analyse your contact prediciton and plot a contact map, just like the ``conkit.plot`` script does.
The call above uses your sequence file ``toxd/toxd.fasta`` in ``fasta`` format to first generate a Multiple Sequence Alignment. It will then analyse your alignment identical to the ``conkit-msatool`` script. It will also sort out all the required conversions before executing CCMpred to run the contact prediction. Finally, it will analyse your contact prediciton and plot a contact map, just like the ``conkit-plot`` script does.

**2. Starting with a Multiple Sequence Alignment**

.. code-block:: bash
$> conkit.predict aln <path/to/ccmpred> toxd/toxd.a3m a3m
$> conkit-predict aln <path/to/ccmpred> toxd/toxd.a3m a3m
This call performs identical operations to the full call under point 1, except that it skips the generation of the alignment. This might be particularly useful if you have limited disk space and cannot store the rather large sequence database that HHblits requires. You can generate your alignment using online servers, such as the `HHblits Server <https://toolkit.tuebingen.mpg.de/hhblits>`_ or the `Jackhmmer Server <https://www.ebi.ac.uk/Tools/hmmer/search/jackhmmer>`_. Both formats are accepted by ConKit, the keywords can be found in the :ref:`file_formats`.
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ def readme():
package_dir={'conkit': 'conkit'},
packages=find_packages(exclude="tests"),
scripts=[
'bin/conkit.plot', 'bin/conkit.msatool',
'bin/conkit.predict', 'bin/conkit.precision',
'bin/conkit.convert',
'bin/conkit-plot', 'bin/conkit-msatool',
'bin/conkit-predict', 'bin/conkit-precision',
'bin/conkit-convert',
],
platforms=['Linux', 'Mac OS-X', 'Unix', 'Windows'],
install_requires=['numpy >=1.8.2', 'scipy >=0.16.0', 'biopython >=1.64', 'matplotlib >=1.3.1'],
Expand Down

0 comments on commit 9104a9e

Please sign in to comment.