Previous changeset 4:7c82cb2a90c4 (2018-08-08) Next changeset 6:a935cbdf1c0e (2018-08-23) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/fastp commit f3673fca1a180ada77fca93d871b3fd446f74498 |
modified:
fastp.xml macros.xml |
b |
diff -r 7c82cb2a90c4 -r 3e2551a37201 fastp.xml --- a/fastp.xml Wed Aug 08 08:49:26 2018 -0400 +++ b/fastp.xml Fri Aug 10 19:40:07 2018 -0400 |
[ |
b'@@ -1,4 +1,4 @@\n-<tool id="fastp" name="fastp" version="@WRAPPER_VERSION@.1">\n+<tool id="fastp" name="fastp" version="@WRAPPER_VERSION@.2">\n <description>- fast all-in-one preprocessing for FASTQ files</description>\n <macros>\n <import>macros.xml</import>\n@@ -12,18 +12,32 @@\n \n ## Link input files\n \n-#if $in1.is_of_type(\'fastq.gz\')\n- #set ext = \'.fastq.gz\'\n-#else\n- #set ext = \'.fastq\'\n-#end if\n+#set ext = \'.fastq\'\n \n-#set $in1_name = re.sub(\'[^\\w\\-\\s]\', \'_\', str($in1.element_identifier)) + $ext\n-ln -s \'$in1\' $in1_name &&\n+#if $single_paired.single_paired_selector == \'paired_collection\':\n+ #if $single_paired.paired_input.forward.is_of_type(\'fastq.gz\'):\n+ #set ext = \'.fastq.gz\'\n+ #end if\n+ #set $in1 = $single_paired.paired_input.forward\n+ #set $in2 = $single_paired.paired_input.reverse\n+ #set $in1_name = re.sub(\'[^\\w\\-\\s]\', \'_\', str($single_paired.paired_input.name)) + $ext\n+ #set $in2_name = re.sub(\'[^\\w\\-\\s]\', \'_\', str("%s_%s" % ($single_paired.paired_input.name, "R2"))) + $ext\n+ #set out1 = $output_paired_coll.forward\n+ #set out2 = $output_paired_coll.reverse\n+ ln -s \'$in1\' \'$in1_name\' &&\n+ ln -s \'$in2\' \'$in2_name\' &&\n+#else\n+ #if $in1.is_of_type(\'fastq.gz\')\n+ #set ext = \'.fastq.gz\'\n+ #end if\n \n-#if str($single_paired.single_paired_selector) == \'paired\':\n- #set $in2_name = re.sub(\'[^\\w\\-\\s]\', \'_\', str($in2.element_identifier)) + $ext\n- ln -s \'$in2\' $in2_name &&\n+ #set $in1_name = re.sub(\'[^\\w\\-\\s]\', \'_\', str($in1.element_identifier)) + $ext\n+ ln -s \'$in1\' \'$in1_name\' &&\n+\n+ #if str($single_paired.single_paired_selector) == \'paired\':\n+ #set $in2_name = re.sub(\'[^\\w\\-\\s]\', \'_\', str("%s_R2" % $in2.element_identifier)) + $ext\n+ ln -s \'$in2\' \'$in2_name\' &&\n+ #end if\n #end if\n \n \n@@ -38,11 +52,11 @@\n --phred64\n #end if\n \n--i $in1_name\n+-i \'$in1_name\'\n -o first${ext}\n \n-#if str($single_paired.single_paired_selector) == \'paired\':\n- -I $in2_name\n+#if str($single_paired.single_paired_selector).startswith(\'paired\'):\n+ -I \'$in2_name\'\n -O second${ext}\n #end if\n \n@@ -55,7 +69,7 @@\n --adapter_sequence \'$single_paired.adapter_trimming_options.adapter_sequence1\'\n #end if\n \n-#if str($single_paired.single_paired_selector) == \'paired\':\n+#if str($single_paired.single_paired_selector).startswith(\'paired\'):\n #if str($single_paired.adapter_trimming_options.adapter_sequence2):\n --adapter_sequence_r2 \'$single_paired.adapter_trimming_options.adapter_sequence2\'\n #end if\n@@ -72,7 +86,7 @@\n -t $single_paired.global_trimming_options.trim_tail1\n #end if\n \n-#if str($single_paired.single_paired_selector) == \'paired\':\n+#if str($single_paired.single_paired_selector).startswith(\'paired\'):\n #if str($single_paired.global_trimming_options.trim_front2):\n -F $single_paired.global_trimming_options.trim_front2\n #end if\n@@ -183,7 +197,7 @@\n &&\n \n mv first${ext} \'${out1}\'\n-#if str($single_paired.single_paired_selector) == \'paired\':\n+#if str($single_paired.single_paired_selector).startswith(\'paired\'):\n &&\n mv second${ext} \'${out2}\'\n #end if\n@@ -194,41 +208,27 @@\n <param name="single_paired_selector" type="select" label="Single-end or paired reads">\n <option value="single" selected="true">Single-end</option>\n <option value="paired">Paired</option>\n+ <option value="paired_collection">Paired Collection</option>\n </param>\n <when value="single">\n- <expand macro="in1" />\n- <section name="adapter_trimming_options" title="Adapter Trimming Options" expanded="False">\n- <param name="disable_adapter_trimming" argument="-A" type="boolean" truevalue="-A" falsevalue="" checked="false" label="Disable adapter trimming" help="Adapter trimming is enabled by default. If this option is specified, adapter trimming is disabled."/>\n- <expand macro="adapter_sequence1" />\n- '..b'se">\n- <param name="trim_front1" argument="-f" type="integer" optional="true" label="Trim front for input 1" help="Trimming how many bases in front for read1, default is 0."/>\n- <param name="trim_tail1" argument="-t" type="integer" optional="true" label="Trim tail for input 1" help="Trimming how many bases in tail for read1, default is 0."/>\n- <param name="trim_front2" argument="-F" type="integer" optional="true" label="Trim front for input 2" help="Trimming how many bases in front for read2. If it\'s not specified, it will follow read1\'s settings."/>\n- <param name="trim_tail2" argument="-T" type="integer" optional="true" label="Trim tail for input 2" help="Trimming how many bases in tail for read2. If it\'s not specified, it will follow read1\'s settings."/>\n- </section>\n+ <expand macro="in" read_number="1" argument="-i"/>\n+ <expand macro="in" read_number="2" argument="-I"/>\n+ <expand macro="adapter_trimming_options">\n+ <expand macro="adapter_sequence" read_number="2"/>\n+ </expand>\n+ <expand macro="global_trimming_options_paired" />\n+ </when>\n+ <when value="paired_collection">\n+ <param name="paired_input" type="data_collection" collection_type="paired" format="fastq,fastq.gz" label="Select paired collection(s)"/>\n+ <expand macro="adapter_trimming_options">\n+ <expand macro="adapter_sequence" read_number="2"/>\n+ </expand>\n+ <expand macro="global_trimming_options_paired" />\n </when>\n </conditional>\n \n@@ -312,10 +312,15 @@\n </inputs>\n \n <outputs>\n- <data name="out1" format_source="in1" label="${tool.name} on ${on_string}: Read 1 Output"/>\n+ <data name="out1" format_source="in1" label="${tool.name} on ${on_string}: Read 1 Output">\n+ <filter>single_paired[\'single_paired_selector\'] in ["single", "paired"]</filter>\n+ </data>\n <data name="out2" format_source="in2" label="${tool.name} on ${on_string}: Read 2 Output">\n <filter>single_paired[\'single_paired_selector\'] == "paired"</filter>\n </data>\n+ <collection name="output_paired_coll" type="paired" structured_like="paired_input" inherit_format="true" label="Paired-end output of ${tool.name} on ${on_string}">\n+ <filter>single_paired[\'single_paired_selector\'] == "paired_collection"</filter>\n+ </collection>\n <data name="report_html" format="html" from_work_dir="fastp.html" label="${tool.name} on ${on_string}: HTML Report">\n <filter>output_options[\'report_html\'] is True</filter>\n </data>\n@@ -336,6 +341,25 @@\n </assert_contents>\n </output>\n </test>\n+ <!-- Ensure paired collection works -->\n+ <test expect_num_outputs="3">\n+ <param name="single_paired_selector" value="paired_collection"/>\n+ <param name="paired_input">\n+ <collection type="paired">\n+ <element name="forward" value="bwa-mem-fastq1.fq" ftype="fastqsanger" />\n+ <element name="reverse" value="bwa-mem-fastq2.fq" ftype="fastqsanger" />\n+ </collection>\n+ </param>\n+ <output name="report_html">\n+ <assert_contents>\n+ <has_text text="fastp report"/>\n+ </assert_contents>\n+ </output>\n+ <output_collection name="output_paired_coll" type="paired">\n+ <element name="forward" value="out_bwa1.fq" ftype="fastqsanger"/>\n+ <element name="reverse" value="out_bwa2.fq" ftype="fastqsanger"/>\n+ </output_collection>\n+ </test>\n <!-- Ensure custom adapter works -->\n <test expect_num_outputs="2">\n <param name="in1" ftype="fastq" value="R1.fq"/>\n' |
b |
diff -r 7c82cb2a90c4 -r 3e2551a37201 macros.xml --- a/macros.xml Wed Aug 08 08:49:26 2018 -0400 +++ b/macros.xml Fri Aug 10 19:40:07 2018 -0400 |
b |
@@ -1,9 +1,35 @@ <macros> <token name="@WRAPPER_VERSION@">0.19.3</token> - <xml name="adapter_sequence1"> - <param name="adapter_sequence1" argument="--adapter_sequence" type="text" optional="true" label="Adapter sequence for input 1" - help="The adapter for read1. For SE data, if not specified, the adapter will be auto-detected. For PE data, this is used if R1/R2 are found not overlapped."> + <xml name="adapter_trimming_options"> + <section name="adapter_trimming_options" title="Adapter Trimming Options" expanded="False"> + <param name="disable_adapter_trimming" argument="-A" type="boolean" truevalue="-A" falsevalue="" checked="false" label="Disable adapter trimming" help="Adapter trimming is enabled by default. If this option is specified, adapter trimming is disabled."/> + <expand macro="adapter_sequence" read_number="1" /> + <yield /> + </section> + <section name="global_trimming_options" title="Global Trimming Options" expanded="False"> + <param name="trim_front1" argument="-f" type="integer" optional="true" label="Trim front for input 1" help="Trimming how many bases in front for read1, default is 0."/> + <param name="trim_tail1" argument="-t" type="integer" optional="true" label="Trim tail for input 1" help="Trimming how many bases in tail for read1, default is 0."/> + </section> + </xml> + + <xml name="global_trimming_options"> + <section name="global_trimming_options" title="Global trimming options" expanded="False"> + <param name="trim_front1" argument="-f" type="integer" optional="true" label="Trim front for input 1" help="Trimming how many bases in front for read1, default is 0."/> + <param name="trim_tail1" argument="-t" type="integer" optional="true" label="Trim tail for input 1" help="Trimming how many bases in tail for read1, default is 0."/> + <yield/> + </section> + </xml> + + <xml name="global_trimming_options_paired"> + <expand macro="global_trimming_options"> + <param name="trim_front2" argument="-F" type="integer" optional="true" label="Trim front for input 2" help="Trimming how many bases in front for read2. If it's not specified, it will follow read1's settings."/> + <param name="trim_tail2" argument="-T" type="integer" optional="true" label="Trim tail for input 2" help="Trimming how many bases in tail for read2. If it's not specified, it will follow read1's settings."/> + </expand> + </xml> + + <xml name="adapter_sequence" token_read_number="1"> + <param name="adapter_sequence@READ_NUMBER@" argument="--adapter_sequence@READ_NUMBER@" type="text" optional="true" label="Adapter sequence for input @READ_NUMBER@" help="The adapter for read@READ_NUMBER@. For SE data, if not specified, the adapter will be auto-detected. For PE data, this is used if R1/R2 are found not overlapped."> <sanitizer> <valid> <add value="A"/> @@ -14,9 +40,11 @@ </sanitizer> </param> </xml> - <xml name="in1"> - <param name="in1" argument="-i" type="data" format="fastq,fastq.gz" label="Input 1" help="Input FASTQ file #1"/> + + <xml name="in" token_read_number="1" token_argument="-i"> + <param name="in@READ_NUMBER@" argument="@ARGUMENT@" type="data" format="fastq,fastq.gz" label="Input @READ_NUMBER@" help="Input FASTQ file #@READ_NUMBER@"/> </xml> + <xml name="poly_g_min_len"> <param name="poly_g_min_len" argument="--poly_g_min_len" type="integer" optional="true" label="PolyG minimum length" help="The minimum length to detect polyG in the read tail. 10 by default."/> |