changeset 14:b46c041afbe4 draft

planemo upload for repository https://github.com/peterjc/galaxy_blast/tools/blastxml_to_top_descr commit 87df4063e559fe6a4db806a52d657404c2ad766c
author peterjc
date Fri, 15 May 2015 05:56:41 -0400
parents 796dc2ff8e8e
children 60d0c6c1a71f
files test-data/blastp_four_human_vs_rhodopsin.xml tools/blastxml_to_top_descr/README.rst tools/blastxml_to_top_descr/blastxml_to_top_descr.py tools/blastxml_to_top_descr/blastxml_to_top_descr.xml tools/blastxml_to_top_descr/repository_dependencies.xml
diffstat 5 files changed, 48 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/test-data/blastp_four_human_vs_rhodopsin.xml	Wed Jul 30 05:38:46 2014 -0400
+++ b/test-data/blastp_four_human_vs_rhodopsin.xml	Fri May 15 05:56:41 2015 -0400
@@ -2,7 +2,7 @@
 <!DOCTYPE BlastOutput PUBLIC "-//NCBI//NCBI BlastOutput/EN" "http://www.ncbi.nlm.nih.gov/dtd/NCBI_BlastOutput.dtd">
 <BlastOutput>
   <BlastOutput_program>blastp</BlastOutput_program>
-  <BlastOutput_version>BLASTP 2.2.29+</BlastOutput_version>
+  <BlastOutput_version>BLASTP 2.2.30+</BlastOutput_version>
   <BlastOutput_reference>Stephen F. Altschul, Thomas L. Madden, Alejandro A. Sch&amp;auml;ffer, Jinghui Zhang, Zheng Zhang, Webb Miller, and David J. Lipman (1997), &quot;Gapped BLAST and PSI-BLAST: a new generation of protein database search programs&quot;, Nucleic Acids Res. 25:3389-3402.</BlastOutput_reference>
   <BlastOutput_db></BlastOutput_db>
   <BlastOutput_query-ID>sp|Q9BS26|ERP44_HUMAN</BlastOutput_query-ID>
--- a/tools/blastxml_to_top_descr/README.rst	Wed Jul 30 05:38:46 2014 -0400
+++ b/tools/blastxml_to_top_descr/README.rst	Fri May 15 05:56:41 2015 -0400
@@ -1,7 +1,7 @@
-Galaxy tool to extract top BLAST hit descriptions from BLAST XML
+OBGalaxy tool to extract top BLAST hit descriptions from BLAST XML
 ================================================================
 
-This tool is copyright 2012-2013 by Peter Cock, The James Hutton Institute
+This tool is copyright 2012-2015 by Peter Cock, The James Hutton Institute
 (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved.
 See the licence text below.
 
@@ -12,38 +12,39 @@
 It is available from the Galaxy Tool Shed at:
 http://toolshed.g2.bx.psu.edu/view/peterjc/blastxml_to_top_descr
 
-This requires the 'blast_datatypes' repository from the Galaxy Tool Shed
-to provide the 'blastxml' file format definition.
+This requires the ``blast_datatypes`` repository from the Galaxy Tool Shed
+to provide the ``blastxml`` file format definition.
 
 
 Automated Installation
 ======================
 
 This should be straightforward, Galaxy should automatically install the
-'blast_datatypes' dependency.
+``blast_datatypes`` dependency.
 
 
 Manual Installation
 ===================
 
-If you haven't done so before, first install the 'blast_datatypes' repository.
+If you haven't done so before, first install the ``blast_datatypes`` repository.
 
 There are just two files to install (if doing this manually):
 
-* blastxml_to_top_descr.py (the Python script)
-* blastxml_to_top_descr.xml (the Galaxy tool definition)
+- ``blastxml_to_top_descr.py`` (the Python script)
+- ``blastxml_to_top_descr.xml`` (the Galaxy tool definition)
 
-The suggested location is in the Galaxy folder tools/ncbi_blast_plus next to
-the NCBI BLAST+ tool wrappers.
+The suggested location is in the Galaxy folder ``tools/ncbi_blast_plus/``
+next to the NCBI BLAST+ tool wrappers.
 
-You will also need to modify the tools_conf.xml file to tell Galaxy to offer
+You will also need to modify the ``tools_conf.xml`` file to tell Galaxy to offer
 the tool. e.g. next to the NCBI BLAST+ tools. Simply add the line::
 
     <tool file="ncbi_blast_plus/blastxml_to_top_descr.xml" />
 
-To run the tool's tests, also add this line to tools_conf.xml.sample then::
+If you wish to run the unit tests, alsomove/copy the ``test-data/`` files
+under Galaxy's ``test-data/`` folder. Then::
 
-    $ sh run_functional_tests.sh -id blastxml_to_top_descr
+    $ sh run_tests.sh -id blastxml_to_top_descr
 
 
 History
@@ -54,13 +55,13 @@
 ------- ----------------------------------------------------------------------
 v0.0.1  - Initial version.
 v0.0.2  - Since BLAST+ was moved out of the Galaxy core, now have a dependency
-          on the 'blast_datatypes' repository in the Tool Shed.
+          on the ``blast_datatypes`` repository in the Tool Shed.
 v0.0.3  - Include the test files required to run the unit tests
 v0.0.4  - Quote filenames in case they contain spaces (internal change)
 v0.0.5  - Include number of queries with BLAST matches in stdout (peek text)
 v0.0.6  - Check for errors via the script's return code (internal change)
 v0.0.7  - Link to Tool Shed added to help text and this documentation.
-        - Tweak dependency on blast_datatypes to also work on Test Tool Shed
+        - Tweak dependency on ``blast_datatypes`` to also work on Test Tool Shed
         - Adopt standard MIT License.
 v0.0.8  - Development moved to GitHub, https://github.com/peterjc/galaxy_blast
 v0.0.9  - Updated citation information (Cock et al. 2013).
@@ -70,6 +71,8 @@
         - Support BLAST XML with multiple ``<Iteration>`` blocks per query.
         - Support the default 25 column extended tabular BLAST output.
 v0.1.1  - Embed citation information in the tool XML (new Galaxy feature).
+v0.1.2  - Reorder XML elements (internal change only).
+        - Planemo for Tool Shed upload (``.shed.yml``, internal change only).
 ======= ======================================================================
 
 
@@ -89,22 +92,31 @@
 As of July 2013, development is continuing on a dedicated GitHub repository:
 https://github.com/peterjc/galaxy_blast
 
-For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball use
-the following command from the GitHub repository root folder::
+For pushing a release to the test or main "Galaxy Tool Shed", use the following
+Planemo commands (which requires you have set your Tool Shed access details in
+``~/.planemo.yml`` and that you have access rights on the Tool Shed)::
+
+    $ planemo shed_upload --shed_target testtoolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
+    ...
+
+or::
 
-    $ tar -czf blastxml_to_top_descr.tar.gz tools/blastxml_to_top_descr/README.rst tools/blastxml_to_top_descr/blastxml_to_top_descr.* tools/blastxml_to_top_descr/repository_dependencies.xml test-data/blastp_four_human_vs_rhodopsin.xml test-data/blastp_four_human_vs_rhodopsin_top3.tabular test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular
+    $ planemo shed_upload --shed_target toolshed --check_diff ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
+    ...
+
+To just build and check the tar ball, use::
 
-Check this worked::
-
-    $ tar -tzf blastxml_to_top_descr.tar.gz
+    $ planemo shed_upload --tar_only  ~/repositories/galaxy_blast/tools/blastxml_to_top_descr/
+    ...
+    $ tar -tzf shed_upload.tar.gz 
+    test-data/blastp_four_human_vs_rhodopsin.xml
+    test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular
+    test-data/blastp_four_human_vs_rhodopsin_top3.tabular
+    test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular
     tools/blastxml_to_top_descr/README.rst
     tools/blastxml_to_top_descr/blastxml_to_top_descr.py
     tools/blastxml_to_top_descr/blastxml_to_top_descr.xml
     tools/blastxml_to_top_descr/repository_dependencies.xml
-    test-data/blastp_four_human_vs_rhodopsin.xml
-    test-data/blastp_four_human_vs_rhodopsin_top3.tabular
-    test-data/blastp_four_human_vs_rhodopsin_converted_ext.tabular
-    test-data/blastp_four_human_vs_rhodopsin_top3_positive.tabular
 
 
 Licence (MIT)
--- a/tools/blastxml_to_top_descr/blastxml_to_top_descr.py	Wed Jul 30 05:38:46 2014 -0400
+++ b/tools/blastxml_to_top_descr/blastxml_to_top_descr.py	Fri May 15 05:56:41 2015 -0400
@@ -12,7 +12,7 @@
 from optparse import OptionParser
 
 if "-v" in sys.argv or "--version" in sys.argv:
-    print "v0.1.0"
+    print "v0.1.1"
     sys.exit(0)
 
 if sys.version_info[:2] >= ( 2, 5 ):
@@ -105,8 +105,8 @@
     """
     current_query = None
     current_hits = []
-    with open(in_file) as input:
-        for line in input:
+    with open(in_file) as input_handle:
+        for line in input_handle:
             parts = line.rstrip("\n").split("\t")
             query = parts[qseqid]
             descr = "%s %s" % (parts[sseqid], parts[salltitles])
@@ -157,8 +157,6 @@
     assert not re_default_subject_id.match("Subject_12a")
     assert not re_default_subject_id.match("TheSubject_1")
 
-    count = 0
-    pos_count = 0
     current_query = None
     hit_descrs = []
     for event, elem in context:
--- a/tools/blastxml_to_top_descr/blastxml_to_top_descr.xml	Wed Jul 30 05:38:46 2014 -0400
+++ b/tools/blastxml_to_top_descr/blastxml_to_top_descr.xml	Fri May 15 05:56:41 2015 -0400
@@ -1,5 +1,10 @@
-<tool id="blastxml_to_top_descr" name="BLAST top hit descriptions" version="0.1.1">
+<tool id="blastxml_to_top_descr" name="BLAST top hit descriptions" version="0.1.2">
     <description>Make a table from BLAST output</description>
+    <stdio>
+        <!-- Assume anything other than zero is an error -->
+        <exit_code range="1:" />
+        <exit_code range=":-1" />
+    </stdio>
     <version_command interpreter="python">blastxml_to_top_descr.py --version</version_command>
     <command interpreter="python">
 blastxml_to_top_descr.py
@@ -13,11 +18,6 @@
 -t ${topN}
 "${in_file}"
     </command>
-    <stdio>
-        <!-- Assume anything other than zero is an error -->
-        <exit_code range="1:" />
-        <exit_code range=":-1" />
-    </stdio>
     <inputs>
         <conditional name="input">
             <param name="in_format" type="select" label="Input format">
@@ -48,8 +48,6 @@
     <outputs>
         <data name="tabular_file" format="tabular" label="Top $topN descriptions from $input.in_file.name" />
     </outputs>
-    <requirements>
-    </requirements>
     <tests>
         <test>
             <param name="in_format" value="blastxml" />
--- a/tools/blastxml_to_top_descr/repository_dependencies.xml	Wed Jul 30 05:38:46 2014 -0400
+++ b/tools/blastxml_to_top_descr/repository_dependencies.xml	Fri May 15 05:56:41 2015 -0400
@@ -1,4 +1,4 @@
 <?xml version="1.0"?>
 <repositories description="Requires BLAST XML and database datatype definitions.">
-<repository changeset_revision="939a600f45e9" name="blast_datatypes" owner="devteam" toolshed="https://testtoolshed.g2.bx.psu.edu" />
+<repository changeset_revision="da92fef90117" name="blast_datatypes" owner="devteam" toolshed="https://testtoolshed.g2.bx.psu.edu" />
 </repositories>