Previous changeset 1:bb07615a5b6a (2015-11-11) Next changeset 3:7861f3b10c68 (2019-11-01) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tool_collections/galaxy_sequence_utils/fastq_manipulation commit f2582539542b33240234e8ea6093e25d0aee9b6a |
modified:
fastq_manipulation.xml |
added:
test-data/sanger_full_range_as_rna.fastqsanger.bz2 test-data/sanger_full_range_as_rna.fastqsanger.gz |
removed:
fastq_manipulation.py tool_dependencies.xml |
b |
diff -r bb07615a5b6a -r 4ac14b275aca fastq_manipulation.py --- a/fastq_manipulation.py Wed Nov 11 12:41:10 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
[ |
@@ -1,37 +0,0 @@ -#Dan Blankenberg -import sys, os, shutil -import imp -from galaxy_utils.sequence.fastq import fastqReader, fastqWriter - -def main(): - #Read command line arguments - input_filename = sys.argv[1] - script_filename = sys.argv[2] - output_filename = sys.argv[3] - additional_files_path = sys.argv[4] - input_type = sys.argv[5] or 'sanger' - - #Save script file for debuging/verification info later - os.mkdir( additional_files_path ) - shutil.copy( script_filename, os.path.join( additional_files_path, 'debug.txt' ) ) - - fastq_manipulator = imp.load_module( 'fastq_manipulator', open( script_filename ), script_filename, ( '', 'r', imp.PY_SOURCE ) ) - - out = fastqWriter( open( output_filename, 'wb' ), format = input_type ) - - i = None - reads_manipulated = 0 - for i, fastq_read in enumerate( fastqReader( open( input_filename ), format = input_type ) ): - new_read = fastq_manipulator.match_and_manipulate_read( fastq_read ) - if new_read: - out.write( new_read ) - if new_read != fastq_read: - reads_manipulated += 1 - out.close() - if i is None: - print "Your file contains no valid FASTQ reads." - else: - print 'Manipulated %s of %s reads (%.2f%%).' % ( reads_manipulated, i + 1, float( reads_manipulated ) / float( i + 1 ) * 100.0 ) - -if __name__ == "__main__": - main() |
b |
diff -r bb07615a5b6a -r 4ac14b275aca fastq_manipulation.xml --- a/fastq_manipulation.xml Wed Nov 11 12:41:10 2015 -0500 +++ b/fastq_manipulation.xml Sat Sep 30 14:58:21 2017 -0400 |
[ |
b'@@ -1,199 +1,54 @@\n-<tool id="fastq_manipulation" name="Manipulate FASTQ" version="1.0.1">\n- <options sanitize="False" /> <!-- This tool uses a file to rely all parameter information (actually a dynamically generated python module), we can safely not sanitize any parameters -->\n- <requirements>\n- <requirement type="package" version="1.0.0">galaxy_sequence_utils</requirement>\n- </requirements>\n- <description>reads on various attributes</description>\n- <command interpreter="python">fastq_manipulation.py $input_file $fastq_manipulation_file $output_file $output_file.files_path \'${input_file.extension[len( \'fastq\' ):]}\'</command>\n- <inputs>\n- <!-- This tool is purposely over-engineered (e.g. Single option conditionals) to allow easy enhancement with workflow/rerun compatibility -->\n- <page>\n- <param name="input_file" type="data" format="fastqsanger,fastqcssanger" label="FASTQ File" help="Requires groomed data: if your data does not appear here try using the FASTQ groomer."/>\n- <!-- Match Reads -->\n- <repeat name="match_blocks" title="Match Reads">\n- <conditional name="match_type">\n- <param name="match_type_selector" type="select" label="Match Reads by">\n- <option value="identifier">Name/Identifier</option>\n- <option value="sequence">Sequence Content</option>\n- <option value="quality">Quality Score Content</option>\n- </param>\n- <when value="identifier">\n- <conditional name="match">\n- <param name="match_selector" type="select" label="Identifier Match Type">\n- <option value="regex">Regular Expression</option>\n- </param>\n- <when value="regex">\n- <param type="text" name="match_by" label="Match by" value=".*" />\n- </when>\n- </conditional>\n- </when>\n- <when value="sequence">\n- <conditional name="match">\n- <param name="match_selector" type="select" label="Sequence Match Type">\n- <option value="regex">Regular Expression</option>\n- </param>\n- <when value="regex">\n- <param type="text" name="match_by" label="Match by" value=".*" />\n- </when>\n- </conditional>\n- </when>\n- <when value="quality">\n- <conditional name="match">\n- <param name="match_selector" type="select" label="Quality Match Type">\n- <option value="regex">Regular Expression</option>\n- </param>\n- <when value="regex">\n- <param type="text" name="match_by" label="Match by" value=".*" />\n- </when>\n- </conditional>\n- </when>\n- </conditional>\n- </repeat>\n- <!-- Manipulate Matched Reads -->\n- <repeat name="manipulate_blocks" title="Manipulate Reads">\n- <conditional name="manipulation_type">\n- <param name="manipulation_type_selector" type="select" label="Manipulate Reads on">\n- <option value="identifier">Name/Identifier</option>\n- <option value="sequence">Sequence Content</option>\n- <option value="quality">Quality Score Content</option>\n- <option value="miscellaneous">Miscellaneous Actions</option>\n- </param>\n- <when value="identifier">\n- <conditional name="manipulation">\n- <param name="manipulation_selector" type="select" label="Identifier Manipulation Type">\n- <option value="translate">String Translate</option>\n- </param>\n- <when value="translate">\n- <param name="from" type="text" label="From" value="" />\n- <param name="to" type="text" label="To" value="" />\n- </when>\n- </conditional>\n- </when>\n- <when value="sequence">\n- <conditional name="manipulation">\n- <param name="manipulation_sel'..b'pulation_selector" value="dna_to_rna" />\n+ <output name="output_file" file="sanger_full_range_as_rna.fastqsanger" ftype="fastqsanger" />\n+ </test>\n+ <!-- match all and RNA to DNA-->\n+ <test>\n+ <param name="input_file" value="sanger_full_range_as_rna.fastqsanger" ftype="fastqsanger" />\n+ <param name="match_type_selector" value="identifier" />\n+ <param name="match_selector" value="regex" />\n+ <param name="match_by" value=".*" />\n+ <param name="manipulation_type_selector" value="sequence" />\n+ <param name="manipulation_selector" value="rna_to_dna" />\n+ <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger" />\n+ </test>\n+ <!-- match all and RNA to DNA (gz compressed) -->\n+ <test>\n+ <param name="input_file" value="sanger_full_range_as_rna.fastqsanger.gz" ftype="fastqsanger.gz" />\n+ <param name="match_type_selector" value="identifier" />\n+ <param name="match_selector" value="regex" />\n+ <param name="match_by" value=".*" />\n+ <param name="manipulation_type_selector" value="sequence" />\n+ <param name="manipulation_selector" value="rna_to_dna" />\n+ <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger.gz" decompress="true" />\n+ </test>\n+ <!-- match all and RNA to DNA (bz2 compressed) -->\n+ <test>\n+ <param name="input_file" value="sanger_full_range_as_rna.fastqsanger.bz2" ftype="fastqsanger.bz2" />\n+ <param name="match_type_selector" value="identifier" />\n+ <param name="match_selector" value="regex" />\n+ <param name="match_by" value=".*" />\n+ <param name="manipulation_type_selector" value="sequence" />\n+ <param name="manipulation_selector" value="rna_to_dna" />\n+ <output name="output_file" file="sanger_full_range_original_sanger.fastqsanger" ftype="fastqsanger.bz2" decompress="true" />\n+ </test>\n+ </tests>\n+ <help><![CDATA[\n This tool allows you to build complex manipulations to be applied to each matching read in a FASTQ file. A read must match all matching directives in order for it to be manipulated; if a read does not match, it is output in a non-modified manner. All reads matching will have each of the specified manipulations performed upon them, in the order specified.\n \n Regular Expression Matches are made using re.search, see http://docs.python.org/library/re.html for more information.\n@@ -407,7 +416,6 @@\n \n Only color space reads can have adapter bases substituted.\n \n-\n -----\n \n **Example**\n@@ -416,12 +424,11 @@\n \n Steps:\n \n-1. Click **Add new Match Reads** and leave the matching options set to the default (Matching by sequence name/identifier using the regular expression "\\*."; thereby matching all reads). \n-2. Click **Add new Manipulate Reads**, change **Manipulate Reads on** to "Sequence Content", set **Sequence Manipulation Type** to "Change Adapter Base" and set **New Adapter** to "" (an empty text field). \n+1. Click **Add new Match Reads** and leave the matching options set to the default (Matching by sequence name/identifier using the regular expression "\\*."; thereby matching all reads).\n+2. Click **Add new Manipulate Reads**, change **Manipulate Reads on** to "Sequence Content", set **Sequence Manipulation Type** to "Change Adapter Base" and set **New Adapter** to "" (an empty text field).\n 3. Click **Add new Manipulate Reads**, change **Manipulate Reads on** to "Sequence Content", set **Sequence Manipulation Type** to "String Translate" and set **From** to "0123." and **To** to "ACGTN".\n 4. Click Execute. The new history item will contained double-encoded psuedo-nucleotide space reads.\n-\n-</help>\n+ ]]></help>\n <citations>\n <citation type="doi">10.1093/bioinformatics/btq281</citation>\n </citations>\n' |
b |
diff -r bb07615a5b6a -r 4ac14b275aca test-data/sanger_full_range_as_rna.fastqsanger.bz2 |
b |
Binary file test-data/sanger_full_range_as_rna.fastqsanger.bz2 has changed |
b |
diff -r bb07615a5b6a -r 4ac14b275aca test-data/sanger_full_range_as_rna.fastqsanger.gz |
b |
Binary file test-data/sanger_full_range_as_rna.fastqsanger.gz has changed |
b |
diff -r bb07615a5b6a -r 4ac14b275aca tool_dependencies.xml --- a/tool_dependencies.xml Wed Nov 11 12:41:10 2015 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 |
b |
@@ -1,6 +0,0 @@ -<?xml version="1.0"?> -<tool_dependency> - <package name="galaxy_sequence_utils" version="1.0.0"> - <repository changeset_revision="0643676ad5f7" name="package_galaxy_utils_1_0" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" /> - </package> -</tool_dependency> |