Previous changeset 15:ba3ec1b3e635 (2014-11-27) Next changeset 17:21d7e700fbd7 (2015-05-21) |
Commit message:
planemo upload for repository https://github.com/peterjc/pico_galaxy/tools/seq_rename commit b6a4aa926554f2973b537999ff53478117975064 |
modified:
tools/seq_rename/README.rst tools/seq_rename/seq_rename.py tools/seq_rename/seq_rename.xml |
b |
diff -r ba3ec1b3e635 -r e279ed332c8e tools/seq_rename/README.rst --- a/tools/seq_rename/README.rst Thu Nov 27 08:20:54 2014 -0500 +++ b/tools/seq_rename/README.rst Wed May 13 06:38:43 2015 -0400 |
b |
@@ -1,7 +1,7 @@ Galaxy tool to rename FASTA, QUAL, FASTQ or SFF sequences ========================================================= -This tool is copyright 2011-2014 by Peter Cock, The James Hutton Institute +This tool is copyright 2011-2015 by Peter Cock, The James Hutton Institute (formerly SCRI, Scottish Crop Research Institute), UK. All rights reserved. See the licence text below. @@ -75,6 +75,9 @@ - Tool definition now embeds citation information. - If white space is found in the requested tabular field then only the first word is used as the identifier (with a warning to stderr). +v0.0.7 - Use the ``format_source=...`` tag. + - Reorder XML elements (internal change only). + - Planemo for Tool Shed upload (``.shed.yml``, internal change only). ======= ====================================================================== @@ -87,21 +90,30 @@ Development has now moved to a dedicated GitHub repository: https://github.com/peterjc/pico_galaxy/tree/master/tools -For making the "Galaxy Tool Shed" http://toolshed.g2.bx.psu.edu/ tarball use -the following command from the Galaxy 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/pico_galaxy/tools/seq_rename/ + ... + +or:: - $ tar -czf seq_rename.tar.gz tools/seq_rename/README.rst tools/seq_rename/seq_rename.* tools/seq_rename/tool_dependencies.xml test-data/four_human_proteins.fasta test-data/four_human_proteins.rename.tabular test-data/four_human_proteins.rename.fasta + $ planemo shed_upload --shed_target toolshed --check_diff ~/repositories/pico_galaxy/tools/seq_rename/ + ... + +To just build and check the tar ball, use:: -Check this worked:: - - $ tar -tzf seq_rename.tar.gz + $ planemo shed_upload --tar_only ~/repositories/pico_galaxy/tools/seq_rename/ + ... + $ tar -tzf shed_upload.tar.gz + test-data/four_human_proteins.fasta + test-data/four_human_proteins.rename.fasta + test-data/four_human_proteins.rename.tabular tools/seq_rename/README.rst tools/seq_rename/seq_rename.py tools/seq_rename/seq_rename.xml tools/seq_rename/tool_dependencies.xml - test-data/four_human_proteins.fasta - test-data/four_human_proteins.rename.tabular - test-data/four_human_proteins.rename.fasta Licence (MIT) |
b |
diff -r ba3ec1b3e635 -r e279ed332c8e tools/seq_rename/seq_rename.py --- a/tools/seq_rename/seq_rename.py Thu Nov 27 08:20:54 2014 -0500 +++ b/tools/seq_rename/seq_rename.py Wed May 13 06:38:43 2015 -0400 |
[ |
@@ -27,7 +27,7 @@ print "v0.0.6" sys.exit(0) -def stop_err(msg, err=1): +def sys_exit(msg, err=1): sys.stderr.write(msg.rstrip() + "\n") sys.exit(err) @@ -35,7 +35,7 @@ try: tabular_file, old_col_arg, new_col_arg, in_file, seq_format, out_file = sys.argv[1:] except ValueError: - stop_err("Expected six arguments (tabular file, old col, new col, input file, format, output file), got %i:\n%s" % (len(sys.argv)-1, " ".join(sys.argv))) + sys_exit("Expected six arguments (tabular file, old col, new col, input file, format, output file), got %i:\n%s" % (len(sys.argv)-1, " ".join(sys.argv))) try: if old_col_arg.startswith("c"): @@ -43,16 +43,16 @@ else: old_column = int(old_col_arg)-1 except ValueError: - stop_err("Expected column number, got %s" % old_col_arg) + sys_exit("Expected column number, got %s" % old_col_arg) try: if old_col_arg.startswith("c"): new_column = int(new_col_arg[1:])-1 else: new_column = int(new_col_arg)-1 except ValueError: - stop_err("Expected column number, got %s" % new_col_arg) + sys_exit("Expected column number, got %s" % new_col_arg) if old_column == new_column: - stop_err("Old and new column arguments are the same!") + sys_exit("Old and new column arguments are the same!") def parse_ids(tabular_file, old_col, new_col): """Read tabular file and record all specified ID mappings. @@ -109,7 +109,7 @@ try: from Bio.SeqIO.SffIO import SffIterator, SffWriter except ImportError: - stop_err("Requires Biopython 1.54 or later") + sys_exit("Requires Biopython 1.54 or later") try: from Bio.SeqIO.SffIO import ReadRocheXmlManifest @@ -142,7 +142,7 @@ writer = fastqWriter(open(out_file, "w")) marker = "@" else: - stop_err("Unsupported file type %r" % seq_format) + sys_exit("Unsupported file type %r" % seq_format) #Now do the renaming count = 0 renamed = 0 |
b |
diff -r ba3ec1b3e635 -r e279ed332c8e tools/seq_rename/seq_rename.xml --- a/tools/seq_rename/seq_rename.xml Thu Nov 27 08:20:54 2014 -0500 +++ b/tools/seq_rename/seq_rename.xml Wed May 13 06:38:43 2015 -0400 |
b |
@@ -1,18 +1,18 @@ -<tool id="seq_rename" name="Rename sequences" version="0.0.6"> +<tool id="seq_rename" name="Rename sequences" version="0.0.7"> <description>with ID mapping from a tabular file</description> <requirements> <requirement type="package" version="1.62">biopython</requirement> <requirement type="python-module">Bio</requirement> </requirements> - <version_commmand interpreter="python">seq_rename.py --version</version_commmand> - <command interpreter="python"> -seq_rename.py $input_tabular $old_column $new_column $input_file $input_file.ext $output_file - </command> <stdio> <!-- Anything other than zero is an error --> <exit_code range="1:" /> <exit_code range=":-1" /> </stdio> + <version_commmand interpreter="python">seq_rename.py --version</version_commmand> + <command interpreter="python"> +seq_rename.py $input_tabular $old_column $new_column $input_file $input_file.ext $output_file + </command> <inputs> <param name="input_file" type="data" format="fasta,qual,fastq,sff" label="Sequence file" help="FASTA, QUAL, FASTQ, or SFF format." /> <param name="input_tabular" type="data" format="tabular" label="Tabular file containing sequence identifiers"/> @@ -20,7 +20,7 @@ <param name="new_column" type="data_column" data_ref="input_tabular" multiple="False" numerical="False" label="Column containing new sequence identifiers"/> </inputs> <outputs> - <data name="output_file" format="input" metadata_source="input_file" label="Renamed ${on_string}"/> + <data name="output_file" format_source="input_file" metadata_source="input_file" label="Renamed ${on_string}"/> </outputs> <tests> <test> |