Mercurial > repos > matthias > stacks2_tsv2bam
diff macros_process.xml @ 4:60c1c4d7d2c1 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit 4e87a14a5479800df9675c1cbcdbe1b11f63653b-dirty
author | matthias |
---|---|
date | Wed, 27 Feb 2019 09:53:30 -0500 |
parents | c3a4fb832c18 |
children |
line wrap: on
line diff
--- a/macros_process.xml Fri Jan 04 03:33:00 2019 -0500 +++ b/macros_process.xml Wed Feb 27 09:53:30 2019 -0500 @@ -3,60 +3,10 @@ <!-- macros and tokens for process_radtags and process_short_reads --> <macros> - <!-- fastq input for process_radtags/shortreads--> - <xml name="process_inputs"> - <conditional name="input_type"> - <param name="options_type_selector" type="select" label="Single-end or paired-end reads files"> - <option value="single" selected="True">Single-end files</option> - <option value="paired">Paired-end files</option> - </param> - <when value="single"> - <param name="fqinputs" argument="-f" format="fastqsanger,fastqsanger.gz" multiple="true" type="data" label="singles-end reads infile(s)" help="input files" /> - <param name="barcode_encoding" type="select" label="Barcode location"> - <expand macro="barcode_encoding_single" type="Barcode" /> - </param> - </when> - <when value="paired"> - <param name="fqinputs" type="data_collection" collection_type="list:paired" label="paired-end reads infile(s)" format="fastqsanger,fastqsanger.gz"/> - <param name="barcode_encoding" type="select" label="Barcode location"> - <expand macro="barcode_encoding_pair" type="Barcode" /> - </param> - </when> - </conditional> - <param name="barcode" argument="-b" type="data" format="tabular,txt" label="Barcode file" /> - </xml> - <token name="@FASTQ_INPUT_PREPROC@"><![CDATA[ - #for $input in $input_type.fqinputs: - #if $input_type.options_type_selector == "single" - #set $isfq=$input.is_of_type('fastqsanger') - #set $name=$clean_ext($input.element_identifier) - #else: - #set $isfq=$input.forward.is_of_type('fastqsanger') - ## TODO if https://github.com/galaxyproject/galaxy/pull/7031 is - ## backported use element_identifier consistently and fix release in <tool>? - #set $name=$clean_ext($input.name) - #end if - - #if $isfq: - #set $ext = "fastq" - #set inputype = "fastq" - #else - #set $ext = "fastq.gz" - #set inputype = "gzfastq" - #end if - - #if $input_type.options_type_selector == "single" - ln -s '$input' 'stacks_inputs/${name}.${ext}' && - #else: - ## procrad needs _R[12]_ in the file name, so we add an add 0 - ln -s '$input.forward' 'stacks_inputs/${name}_R1_0.${ext}' && - ln -s '$input.reverse' 'stacks_inputs/${name}_R2_0.${ext}' && - #end if - #end for - ]]></token> + <token name="@PROCESS_IOOPTIONS@"><![CDATA[ -p stacks_inputs/ - #if $input_type.options_type_selector == "paired" + #if $input_type.input_type_select == "paired" --paired #end if -i $inputype @@ -89,26 +39,26 @@ <xml name="process_outputs"> <collection name="demultiplexed" type="list" label="${tool.name} on ${on_string} Demultiplexed reads"> - <filter>input_type['options_type_selector'] == "single"</filter> + <filter>input_type['input_type_select'] == "single"</filter> <expand macro="discover_faqgz_output_macro" pattern="(?P<name>.+)" dir="stacks_outputs"/> </collection> <collection name="demultiplexed_paired" type="list:paired" label="${tool.name} on ${on_string} Demultiplexed reads"> - <filter>input_type['options_type_selector'] == "paired"</filter> + <filter>input_type['input_type_select'] == "paired"</filter> <expand macro="discover_faqgz_output_macro" pattern="(?P<identifier_0>.+)\.(?P<identifier_1>[^.]+)" dir="stacks_outputs"/> </collection> <collection name="remaining" type="list:paired" label="${tool.name} on ${on_string} Remaining orphan reads"> - <filter>input_type['options_type_selector'] == "paired"</filter> + <filter>input_type['input_type_select'] == "paired"</filter> <expand macro="discover_faqgz_output_macro" pattern="(?P<identifier_0>.+)\.rem\.(?P<identifier_1>[^.]+)" dir="stacks_outputs/remaining"/> </collection> <!-- note irrespective of -y output is always named fastq and are never zipped --> <collection name="discarded" type="list" label="${tool.name} on ${on_string} Discarded reads"> - <filter>capture is True and input_type['options_type_selector'] == "single"</filter> + <filter>capture is True and input_type['input_type_select'] == "single"</filter> <expand macro="discover_faq_output_macro" pattern="(?P<name>.*)" dir="stacks_outputs/discarded"/> </collection> <collection name="discarded_paired" type="list:paired" label="${tool.name} on ${on_string} Discarded reads"> - <filter>capture is True and input_type['options_type_selector'] == "paired"</filter> + <filter>capture is True and input_type['input_type_select'] == "paired"</filter> <expand macro="discover_faq_output_macro" pattern="(?P<identifier_0>.+)\.(?P<identifier_1>[^.]+)" dir="stacks_outputs/discarded"/> </collection> </xml> @@ -116,7 +66,7 @@ <!-- FASTQ filtering options --> <xml name="process_filter"> <conditional name="filter_cond" > - <param name="filter_select" type="select" label="do quality filtering"> + <param name="filter_select" type="select" label="Do quality filtering"> <option value="yes">Yes</option> <option value="no" selected="true">No</option> </param> @@ -125,10 +75,10 @@ <param name="score" type="integer" value="10" min="0" max="40" argument="-s" label="Set the score limit. If the average score within the sliding window drops below this value, the read is discarded" /> <param name="remove" type="boolean" checked="false" truevalue="-c" falsevalue="" argument="-c" label="Clean data, remove any read with an uncalled base" /> <param name="discard" type="boolean" checked="false" truevalue="-q" falsevalue="" argument="-q" label="Discard reads with low quality scores"/> - <param argument="--filter_illumina" type="boolean" checked="false" truevalue="--filter_illumina" falsevalue="" label="discard reads that have been marked by Illumina's chastity/purity filter as failing" /> + <param argument="--filter_illumina" type="boolean" checked="false" truevalue="--filter_illumina" falsevalue="" label="Discard reads that have been marked by Illumina's chastity/purity filter as failing" /> </when> <when value="no"> - <param argument="--len_limit" type="integer" value="" optional="true" label="minimum sequence length" help="useful if your data has already been trimmed"/> + <param argument="--len_limit" type="integer" value="" optional="true" label="Minimum sequence length" help="useful if your data has already been trimmed"/> </when> </conditional> <param name="capture" type="boolean" checked="false" truevalue="-D" falsevalue="" argument="-D" label="Capture discarded reads to a file" /> @@ -153,7 +103,7 @@ && mv stacks_outputs/*discards stacks_outputs/discarded/ ## fix the _R[12]_0 that was added for preparing the input - #if $input_type.options_type_selector == 'paired': + #if $input_type.input_type_select == 'paired': && find stacks_outputs/discarded/ -type f | while read file; do mv "\$file" "\$(echo \$file | sed 's/_R1_0/.1/; s/_R2_0/.2/;')"; done #end if ## also remove the gz which is added by procrad (but its uncompressed) @@ -167,20 +117,18 @@ #end if #end if ## prepare paired read output for processing in galaxy - #if $input_type.options_type_selector == 'paired': + #if $input_type.input_type_select == 'paired': && mkdir stacks_outputs/remaining && find stacks_outputs -iregex ".*\.rem\.[12]\.f[aq]\(\.gz\)?" | while read file; do mv "\$file" stacks_outputs/remaining/; done && find stacks_outputs/ -iregex ".*.f[aq]\(\.gz\)?" | while read file; do mv "\$file" "\$(echo \$file | sed 's/\.1\./.forward./; s/\.2\./.reverse./')"; done #end if ]]></token> - - <!-- adapter trimming options --> <xml name="process_adapter"> - <param argument="--adapter_1" type="text" value="" optional="true" label="adaptor sequence that may occur on the first read" /> - <param argument="--adapter_2" type="text" value="" optional="true" label="adaptor sequence that may occur on the paired-read" /> - <param argument="--adapter_mm" type="integer" value="" optional="true" label="number of mismatches allowed in the adapter sequence"/> + <param argument="--adapter_1" type="text" value="" optional="true" label="Adaptor sequence that may occur on the first read" /> + <param argument="--adapter_2" type="text" value="" optional="true" label="Adaptor sequence that may occur on the paired-read" /> + <param argument="--adapter_mm" type="integer" value="" optional="true" label="Number of mismatches allowed in the adapter sequence"/> </xml> <token name="@PROCESS_ADAPTER@"><![CDATA[ ## Adapter options @@ -202,9 +150,9 @@ <option value="-r">yes</option> <option value="" selected="true">no</option> </param> - <when value="-r"> - <param argument="--barcode_dist_1" type="integer" value="" optional="true" label="number of allowed mismatches when rescuing first read barcodes" help="(default 1)"/> - <param argument="--barcode_dist_2" type="integer" value="" optional="true" label="number of allowed mismatches when rescuing paired read barcodes" help="(default value for single end barcodes)"/> + <when value="-r"> + <param argument="--barcode_dist_1" type="integer" value="" optional="true" label="Number of allowed mismatches when rescuing first read barcodes" help="(default 1)"/> + <param argument="--barcode_dist_2" type="integer" value="" optional="true" label="Number of allowed mismatches when rescuing paired read barcodes" help="(default value for single end barcodes)"/> </when> <when value=""/> </conditional> @@ -221,7 +169,7 @@ #end if ]]></token> - <!-- advanced options that are shared --> + <!-- advanced options that are shared --> <xml name="common_advanced"> <param name="truncate" type="integer" value="" optional="True" argument="-t" label="Truncate final read length to this value" /> <param argument="--retain_header" type="boolean" checked="false" truevalue="--retain_header" falsevalue="" label="Retain unmodified FASTQ headers in the output" />