Mercurial > repos > iuc > stacks_ustacks
comparison stacks_ustacks.xml @ 6:35a41f8e1c41 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit dc23703c260d004a28fe24a2a7c00cb4371bc32e
| author | iuc |
|---|---|
| date | Thu, 27 Apr 2017 04:14:18 -0400 |
| parents | 74a205bb4d66 |
| children | e10c08abf18f |
comparison
equal
deleted
inserted
replaced
| 5:901728c2661d | 6:35a41f8e1c41 |
|---|---|
| 4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <expand macro="requirements"/> | 6 <expand macro="requirements"/> |
| 7 <expand macro="stdio"/> | 7 <expand macro="stdio"/> |
| 8 <command><![CDATA[ | 8 <command><![CDATA[ |
| 9 #from os.path import splitext | 9 |
| 10 #import re | 10 @CLEAN_EXT@ |
| 11 | 11 |
| 12 mkdir stacks_inputs stacks_outputs | 12 mkdir stacks_inputs stacks_outputs |
| 13 | 13 |
| 14 && | 14 && |
| 15 | 15 |
| 16 #if $sample.is_of_type('fastqsanger'): | 16 #if $sample.is_of_type('fastqsanger') |
| 17 #set $data_path = splitext($sample.element_identifier)[0] | 17 #set $data_path = "stacks_inputs/" + $clean_ext($sample.element_identifier) + ".fq" |
| 18 #set $data_path = re.sub(r'\.1$', '', $data_path) | |
| 19 #set $data_path = "stacks_inputs/" + $data_path + ".fq" | |
| 20 #set inputype = "fastq" | 18 #set inputype = "fastq" |
| 21 #else: | 19 #else if $sample.is_of_type('fastqsanger.gz') |
| 22 #set $data_path = splitext($sample.element_identifier)[0] | 20 #set $data_path = "stacks_inputs/" + $clean_ext($sample.element_identifier) + ".fq.gz" |
| 23 #set $data_path = re.sub(r'\.1$', '', $data_path) | 21 #set inputype = "gzfastq" |
| 24 #set $data_path = "stacks_inputs/" + $data_path + ".fa" | 22 #else |
| 23 #set $data_path = "stacks_inputs/" + $clean_ext($sample.element_identifier) + ".fa" | |
| 25 #set inputype = "fasta" | 24 #set inputype = "fasta" |
| 26 #end if | 25 #end if |
| 27 | 26 |
| 28 ln -s "${sample}" "${data_path}" | 27 ln -s '${sample}' '${data_path}' |
| 29 | 28 |
| 30 && | 29 && |
| 31 | 30 |
| 32 ustacks | 31 ustacks |
| 33 | 32 |
| 44 -M $M | 43 -M $M |
| 45 $R | 44 $R |
| 46 $H | 45 $H |
| 47 | 46 |
| 48 ## Assembly | 47 ## Assembly |
| 49 $assembly_options.r | 48 $assembly_options.keep_high_cov |
| 50 $assembly_options.d | 49 $assembly_options.d |
| 51 --max_locus_stacks $assembly_options.max_locus_stacks | 50 --max_locus_stacks $assembly_options.max_locus_stacks |
| 52 #if str($assembly_options.k_len): | 51 #if str($assembly_options.k_len) |
| 53 --k_len $assembly_options.k_len | 52 --k_len $assembly_options.k_len |
| 54 #end if | 53 #end if |
| 55 | 54 |
| 56 #if $gapped.use_gapped: | 55 #if $gapped.use_gapped == "yes" |
| 57 --gapped | 56 --gapped |
| 58 --max_gaps $gapped.max_gaps | 57 --max_gaps $gapped.max_gaps |
| 59 --min_aln_len $gapped.min_aln_len | 58 --min_aln_len $gapped.min_aln_len |
| 60 #end if | 59 #end if |
| 61 | 60 |
| 62 ## snp_model | 61 ## snp_model |
| 63 #if str( $snp_options.select_model.model_type) == "bounded": | 62 #if str( $snp_options.select_model.model_type) == "bounded" |
| 64 --model_type bounded | 63 --model_type bounded |
| 65 --bound_low $snp_options.select_model.bound_low | 64 --bound_low $snp_options.select_model.bound_low |
| 66 --bound_high $snp_options.select_model.bound_high | 65 --bound_high $snp_options.select_model.bound_high |
| 67 --alpha $snp_options.select_model.alpha | 66 --alpha $snp_options.select_model.alpha |
| 68 #else if str( $snp_options.select_model.model_type) == "snp": | 67 #else if str( $snp_options.select_model.model_type) == "snp" |
| 69 --model_type snp | 68 --model_type snp |
| 70 --alpha $snp_options.select_model.alpha | 69 --alpha $snp_options.select_model.alpha |
| 71 #else | 70 #else |
| 72 --model_type fixed | 71 --model_type fixed |
| 73 --bc_err_freq $bc_err_freq | 72 --bc_err_freq $bc_err_freq |
| 74 #end if | 73 #end if |
| 75 | 74 |
| 76 -o stacks_outputs | 75 -o stacks_outputs |
| 77 | 76 |
| 78 > ustacks.log 2>&1 | 77 2>&1 | tee ustacks.log |
| 78 | |
| 79 ## If input is in gz format, stacks will output gzipped files (no option to control this) | |
| 80 #if $sample.is_of_type('fastqsanger.gz') | |
| 81 && gunzip stacks_outputs/*.gz | |
| 82 #end if | |
| 83 | |
| 84 && | |
| 85 | |
| 86 stacks_summary.py --stacks-prog ustacks --res-dir stacks_outputs --logfile ustacks.log --summary stacks_outputs/summary.html | |
| 79 ]]></command> | 87 ]]></command> |
| 80 | 88 |
| 81 <inputs> | 89 <inputs> |
| 82 <param name="sample" argument="-f" format="fastqsanger,fasta" type="data" label="Input short reads from an individual" /> | 90 <param name="sample" argument="-f" format="fastqsanger,fastqsanger.gz,fasta" type="data" label="Input short reads from an individual" /> |
| 83 | 91 |
| 84 <param name="m" argument="-m" type="integer" value="2" label="Minimum depth of coverage required to create a stack"/> | 92 <param name="m" argument="-m" type="integer" value="2" label="Minimum depth of coverage required to create a stack"/> |
| 85 <param name="M" argument="-M" type="integer" value="2" label="Maximum distance (in nucleotides) allowed between stacks"/> | 93 <param name="M" argument="-M" type="integer" value="2" label="Maximum distance (in nucleotides) allowed between stacks"/> |
| 86 <param name="R" argument="-R" type="boolean" checked="false" truevalue="-R" falsevalue="" label="Retain unused reads" /> | 94 <param name="R" argument="-R" type="boolean" checked="false" truevalue="-R" falsevalue="" label="Retain unused reads" /> |
| 87 <param name="H" argument="-H" type="boolean" checked="false" truevalue="-H" falsevalue="" label="Disable calling haplotypes from secondary reads" /> | 95 <param name="H" argument="-H" type="boolean" checked="false" truevalue="-H" falsevalue="" label="Disable calling haplotypes from secondary reads" /> |
| 88 | 96 |
| 89 <section name="assembly_options" title="SNP Model Options (ustacks options)" expanded="True"> | 97 <section name="assembly_options" title="SNP Model Options (ustacks options)" expanded="True"> |
| 90 <param name="r" argument="-r" type="boolean" checked="false" truevalue="-r" falsevalue="" label="Enable the Removal algorithm, to drop highly-repetitive stacks (and nearby errors) from the algorithm" /> | 98 <param name="keep_high_cov" argument="--keep_high_cov" type="boolean" checked="false" truevalue="--keep-high-cov" falsevalue="" label="Disable the algorithm that removes highly-repetitive stacks and nearby errors. " /> |
| 91 <param name="d" argument="-d" type="boolean" checked="false" truevalue="-d" falsevalue="" label="Enable the Deleveraging algorithm, used for resolving over merged tags" /> | 99 <param name="d" argument="-d" type="boolean" checked="false" truevalue="-d" falsevalue="" label="Enable the Deleveraging algorithm, used for resolving over merged tags" /> |
| 92 <param name="max_locus_stacks" argument="--max_locus_stacks" type="integer" value="3" label="Maximum number of stacks at a single de novo locus"/> | 100 <param name="max_locus_stacks" argument="--max_locus_stacks" type="integer" value="3" label="Maximum number of stacks at a single de novo locus"/> |
| 93 <param name="k_len" argument="--k_len" type="integer" value="" optional="true" label="K-mer size for matching between alleles and loci (automatically calculated by default)"/> | 101 <param name="k_len" argument="--k_len" type="integer" value="" optional="true" label="K-mer size for matching between alleles and loci (automatically calculated by default)"/> |
| 94 </section> | 102 </section> |
| 95 | 103 |
| 96 <conditional name="gapped"> | 104 <conditional name="gapped"> |
| 97 <param name="use_gapped" argument="--gapped" type="boolean" checked="false" label="Perform gapped alignments between stacks" /> | 105 <param name="use_gapped" argument="--gapped" type="select" label="Perform gapped alignments between stacks"> |
| 98 <when value="false"></when> | 106 <option value="no" selected="true">No</option> |
| 99 <when value="true"> | 107 <option value="yes">Yes</option> |
| 108 </param> | |
| 109 <when value="no"/> | |
| 110 <when value="yes"> | |
| 100 <param name="max_gaps" argument="--max_gaps" type="integer" value="2" label="Number of gaps allowed between stacks before merging"/> | 111 <param name="max_gaps" argument="--max_gaps" type="integer" value="2" label="Number of gaps allowed between stacks before merging"/> |
| 101 <param name="min_aln_len" argument="--min_aln_len" type="float" value="0.8" min="0.0" max="1.0" label="Minimum length of aligned sequence in a gapped alignment"/> | 112 <param name="min_aln_len" argument="--min_aln_len" type="float" value="0.8" min="0.0" max="1.0" label="Minimum length of aligned sequence in a gapped alignment"/> |
| 102 </when> | 113 </when> |
| 103 </conditional> | 114 </conditional> |
| 104 | 115 |
| 108 </section> | 119 </section> |
| 109 </inputs> | 120 </inputs> |
| 110 | 121 |
| 111 <outputs> | 122 <outputs> |
| 112 <data format="txt" name="output_log" label="ustacks.log with ${tool.name} on ${on_string}" from_work_dir="ustacks.log" /> | 123 <data format="txt" name="output_log" label="ustacks.log with ${tool.name} on ${on_string}" from_work_dir="ustacks.log" /> |
| 124 | |
| 125 <data format="html" name="output_summary" label="Summary from ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/summary.html" /> | |
| 113 | 126 |
| 114 <collection name="tabs" type="list" label="Stacks from ${on_string}"> | 127 <collection name="tabs" type="list" label="Stacks from ${on_string}"> |
| 115 <discover_datasets pattern="(?P<name>.+\.tags)\.tsv$" ext="tabular" directory="stacks_outputs" /> | 128 <discover_datasets pattern="(?P<name>.+\.tags)\.tsv$" ext="tabular" directory="stacks_outputs" /> |
| 116 <discover_datasets pattern="(?P<name>.+\.snps)\.tsv$" ext="tabular" directory="stacks_outputs" /> | 129 <discover_datasets pattern="(?P<name>.+\.snps)\.tsv$" ext="tabular" directory="stacks_outputs" /> |
| 117 <discover_datasets pattern="(?P<name>.+\.alleles)\.tsv$" ext="tabular" directory="stacks_outputs" /> | 130 <discover_datasets pattern="(?P<name>.+\.alleles)\.tsv$" ext="tabular" directory="stacks_outputs" /> |
| 126 <output name="output_log"> | 139 <output name="output_log"> |
| 127 <assert_contents> | 140 <assert_contents> |
| 128 <has_text text="done." /> | 141 <has_text text="done." /> |
| 129 </assert_contents> | 142 </assert_contents> |
| 130 </output> | 143 </output> |
| 144 <output name="output_summary"> | |
| 145 <assert_contents> | |
| 146 <has_text text="Stacks Statistics" /> | |
| 147 </assert_contents> | |
| 148 </output> | |
| 149 | |
| 150 <output_collection name="tabs"> | |
| 151 <element name="PopA_01.tags"> | |
| 152 <assert_contents> | |
| 153 <has_text text="generated on " /> | |
| 154 </assert_contents> | |
| 155 </element> | |
| 156 <element name="PopA_01.snps"> | |
| 157 <assert_contents> | |
| 158 <has_text text="generated on " /> | |
| 159 </assert_contents> | |
| 160 </element> | |
| 161 <element name="PopA_01.alleles"> | |
| 162 <assert_contents> | |
| 163 <has_text text="generated on " /> | |
| 164 </assert_contents> | |
| 165 </element> | |
| 166 <element name="PopA_01.models"> | |
| 167 <assert_contents> | |
| 168 <has_text text="generated on " /> | |
| 169 </assert_contents> | |
| 170 </element> | |
| 171 </output_collection> | |
| 172 </test> | |
| 173 <test> | |
| 174 <param name="sample" value="demultiplexed/PopA_01.1.fq.gzip" ftype="fastqsanger.gz" /> | |
| 175 | |
| 176 <output name="output_log"> | |
| 177 <assert_contents> | |
| 178 <has_text text="done." /> | |
| 179 </assert_contents> | |
| 180 </output> | |
| 181 <output name="output_summary"> | |
| 182 <assert_contents> | |
| 183 <has_text text="Stacks Statistics" /> | |
| 184 </assert_contents> | |
| 185 </output> | |
| 131 | 186 |
| 132 <output_collection name="tabs"> | 187 <output_collection name="tabs"> |
| 133 <element name="PopA_01.tags"> | 188 <element name="PopA_01.tags"> |
| 134 <assert_contents> | 189 <assert_contents> |
| 135 <has_text text="generated on " /> | 190 <has_text text="generated on " /> |
