From 9104a9e750e7ae01e36e2ec41f2e246da2f04e99 Mon Sep 17 00:00:00 2001 From: Felix Simkovic Date: Sun, 19 Feb 2017 11:40:49 +0000 Subject: [PATCH] scripts renamed to avoid name clashes on Windows --- bin/{conkit.convert => conkit-convert} | 0 bin/{conkit.msatool => conkit-msatool} | 0 bin/{conkit.plot => conkit-plot} | 4 +++- bin/{conkit.precision => conkit-precision} | 0 bin/{conkit.predict => conkit-predict} | 0 docs/Makefile | 14 +++++++------- docs/examples/rst/python_analyse_conpred.rst | 4 ++-- docs/examples/rst/script_analyse_msa.rst | 4 ++-- docs/examples/rst/script_convert_conpred.rst | 4 ++-- docs/examples/rst/script_convert_msa.rst | 4 ++-- docs/examples/rst/script_plot_chord.rst | 6 +++--- docs/examples/rst/script_plot_map.rst | 10 +++++----- docs/examples/rst/script_plot_peval.rst | 2 +- docs/examples/rst/script_plot_scov.rst | 4 ++-- docs/examples/rst/script_predict_pipeline.rst | 8 ++++---- setup.py | 6 +++--- 16 files changed, 36 insertions(+), 34 deletions(-) rename bin/{conkit.convert => conkit-convert} (100%) rename bin/{conkit.msatool => conkit-msatool} (100%) rename bin/{conkit.plot => conkit-plot} (98%) rename bin/{conkit.precision => conkit-precision} (100%) rename bin/{conkit.predict => conkit-predict} (100%) diff --git a/bin/conkit.convert b/bin/conkit-convert similarity index 100% rename from bin/conkit.convert rename to bin/conkit-convert diff --git a/bin/conkit.msatool b/bin/conkit-msatool similarity index 100% rename from bin/conkit.msatool rename to bin/conkit-msatool diff --git a/bin/conkit.plot b/bin/conkit-plot similarity index 98% rename from bin/conkit.plot rename to bin/conkit-plot index b65ce7ef..0cc5dc8b 100644 --- a/bin/conkit.plot +++ b/bin/conkit-plot @@ -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] diff --git a/bin/conkit.precision b/bin/conkit-precision similarity index 100% rename from bin/conkit.precision rename to bin/conkit-precision diff --git a/bin/conkit.predict b/bin/conkit-predict similarity index 100% rename from bin/conkit.predict rename to bin/conkit-predict diff --git a/docs/Makefile b/docs/Makefile index 168f21e3..cc739410 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 diff --git a/docs/examples/rst/python_analyse_conpred.rst b/docs/examples/rst/python_analyse_conpred.rst index bdec34c3..256f0bb5 100644 --- a/docs/examples/rst/python_analyse_conpred.rst +++ b/docs/examples/rst/python_analyse_conpred.rst @@ -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. @@ -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 diff --git a/docs/examples/rst/script_analyse_msa.rst b/docs/examples/rst/script_analyse_msa.rst index d2fa7953..54ae658f 100644 --- a/docs/examples/rst/script_analyse_msa.rst +++ b/docs/examples/rst/script_analyse_msa.rst @@ -6,11 +6,11 @@ Multiple Sequence Alignment Analysis You require the optional dependency `SciPy `_ 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: diff --git a/docs/examples/rst/script_convert_conpred.rst b/docs/examples/rst/script_convert_conpred.rst index 19d893c6..e16a4b74 100644 --- a/docs/examples/rst/script_convert_conpred.rst +++ b/docs/examples/rst/script_convert_conpred.rst @@ -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. diff --git a/docs/examples/rst/script_convert_msa.rst b/docs/examples/rst/script_convert_msa.rst index b31e1b16..9867c800 100644 --- a/docs/examples/rst/script_convert_msa.rst +++ b/docs/examples/rst/script_convert_msa.rst @@ -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. diff --git a/docs/examples/rst/script_plot_chord.rst b/docs/examples/rst/script_plot_chord.rst index e9f9a814..147261ef 100644 --- a/docs/examples/rst/script_plot_chord.rst +++ b/docs/examples/rst/script_plot_chord.rst @@ -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``. @@ -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` \ No newline at end of file +: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` diff --git a/docs/examples/rst/script_plot_map.rst b/docs/examples/rst/script_plot_map.rst index 804f6e0d..bf197d74 100644 --- a/docs/examples/rst/script_plot_map.rst +++ b/docs/examples/rst/script_plot_map.rst @@ -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`` @@ -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. @@ -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``. @@ -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. diff --git a/docs/examples/rst/script_plot_peval.rst b/docs/examples/rst/script_plot_peval.rst index 86de4ade..07983a7e 100644 --- a/docs/examples/rst/script_plot_peval.rst +++ b/docs/examples/rst/script_plot_peval.rst @@ -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``. diff --git a/docs/examples/rst/script_plot_scov.rst b/docs/examples/rst/script_plot_scov.rst index 001e6b91..734ff08b 100644 --- a/docs/examples/rst/script_plot_scov.rst +++ b/docs/examples/rst/script_plot_scov.rst @@ -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. diff --git a/docs/examples/rst/script_predict_pipeline.rst b/docs/examples/rst/script_predict_pipeline.rst index 1faa8aff..af84a178 100644 --- a/docs/examples/rst/script_predict_pipeline.rst +++ b/docs/examples/rst/script_predict_pipeline.rst @@ -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 `_ to generate your sequence alignment and `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 `_ to generate your sequence alignment and `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 toxd/toxd.fasta fasta + $> conkit-predict seq 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 toxd/toxd.a3m a3m + $> conkit-predict aln 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 `_ or the `Jackhmmer Server `_. Both formats are accepted by ConKit, the keywords can be found in the :ref:`file_formats`. diff --git a/setup.py b/setup.py index 7dfcd9d7..648b2e10 100644 --- a/setup.py +++ b/setup.py @@ -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'],