Mercurial > repos > iuc > stacks_sstacks
comparison stacks_sstacks.xml @ 5:59d244e79b8e 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:04 -0400 |
| parents | 47d7750df155 |
| children | 45cc649c9f8a |
comparison
equal
deleted
inserted
replaced
| 4:bfd4a2ed0e9b | 5:59d244e79b8e |
|---|---|
| 11 mkdir stacks_inputs stacks_outputs | 11 mkdir stacks_inputs stacks_outputs |
| 12 | 12 |
| 13 && | 13 && |
| 14 | 14 |
| 15 #set $catalog = "" | 15 #set $catalog = "" |
| 16 #for $input_file in $input_cat: | 16 #for $input_file in $input_cat |
| 17 #set $filename = str($input_file.element_identifier) | 17 #set $filename = str($input_file.element_identifier) |
| 18 #if not filename.endswith('.tsv'): | 18 #if not filename.endswith('.tsv') |
| 19 #set $filename = $filename + ".tsv" | 19 #set $filename = $filename + ".tsv" |
| 20 #end if | 20 #end if |
| 21 #if re.search('catalog\.[a-z]+(\.tsv)?$', $filename): | 21 #if re.search('catalog\.[a-z]+(\.tsv)?$', $filename) |
| 22 ln -s "${input_file}" "stacks_inputs/$filename" && | 22 ln -s '${input_file}' 'stacks_inputs/$filename' && |
| 23 | 23 |
| 24 #if $filename.endswith('.tags.tsv'): | 24 #if $filename.endswith('.tags.tsv') |
| 25 #set catalog += " -c \"stacks_inputs/"+$filename[:-17] + "\"" | 25 #set catalog += " -c 'stacks_inputs/"+$filename[:-17] + "'" |
| 26 #end if | 26 #end if |
| 27 #end if | 27 #end if |
| 28 #end for | 28 #end for |
| 29 | 29 |
| 30 #set $samples = "" | 30 #set $samples = "" |
| 31 #for $input_file in $input_tags: | 31 #for $input_file in $input_tags |
| 32 #set $filename = str($input_file.element_identifier) | 32 #set $filename = str($input_file.element_identifier) |
| 33 #if not filename.endswith('.tsv'): | 33 #if not filename.endswith('.tsv') |
| 34 #set $filename = $filename + ".tsv" | 34 #set $filename = $filename + ".tsv" |
| 35 #end if | 35 #end if |
| 36 #if not re.search('catalog\.[a-z]+(\.tsv)?$', $filename): | 36 #if not re.search('catalog\.[a-z]+(\.tsv)?$', $filename) |
| 37 ln -s "${input_file}" "stacks_inputs/$filename" && | 37 ln -s '${input_file}' 'stacks_inputs/$filename' && |
| 38 | 38 |
| 39 #if $filename.endswith('.tags.tsv'): | 39 #if $filename.endswith('.tags.tsv') |
| 40 #set samples += " -s \"stacks_inputs/"+$filename[:-9] + "\"" | 40 #set samples += " -s 'stacks_inputs/"+$filename[:-9] + "'" |
| 41 #end if | 41 #end if |
| 42 #end if | 42 #end if |
| 43 #end for | 43 #end for |
| 44 | 44 |
| 45 sstacks | 45 sstacks |
| 46 | |
| 47 -p \${GALAXY_SLOTS:-1} | |
| 48 | |
| 49 $catalog | |
| 50 | |
| 51 $samples | |
| 52 | 46 |
| 53 ## Batch description | 47 ## Batch description |
| 54 -b 1 | 48 -b 1 |
| 55 | 49 |
| 50 -p \${GALAXY_SLOTS:-1} | |
| 51 | |
| 52 #if $popmap | |
| 53 -P stacks_inputs -M '$popmap' | |
| 54 #else | |
| 55 $catalog | |
| 56 $samples | |
| 57 -o stacks_outputs | |
| 58 #end if | |
| 59 | |
| 56 $g | 60 $g |
| 57 | 61 |
| 58 $check_haplo | 62 $check_haplo |
| 59 | 63 |
| 60 $gapped | 64 $gapped |
| 61 | 65 |
| 62 -o stacks_outputs | 66 2>&1 | tee sstacks.log |
| 63 | 67 |
| 64 > sstacks.log 2>&1 | 68 #if $popmap |
| 69 ## When using a popmap, stacks write to the input dir | |
| 70 && mv stacks_inputs/*matches.tsv stacks_outputs/ | |
| 71 #end if | |
| 72 | |
| 73 && | |
| 74 | |
| 75 stacks_summary.py --stacks-prog sstacks --res-dir stacks_outputs --logfile sstacks.log --summary stacks_outputs/summary.html | |
| 65 ]]></command> | 76 ]]></command> |
| 66 | 77 |
| 67 <inputs> | 78 <inputs> |
| 68 <param name="input_cat" format="tabular,txt" type="data_collection" collection_type="list" label="Catalog files" help="output from a previous Stacks pipeline steps e.g. denovo_map, refmap or cstacks" /> | 79 <param name="input_cat" format="tabular,txt" type="data_collection" collection_type="list" label="Catalog files" help="output from a previous Stacks pipeline steps e.g. denovo_map, refmap or cstacks" /> |
| 69 <param name="input_tags" format="tabular,txt" type="data_collection" collection_type="list" label="Samples stacks" help="output from previous Stacks pipeline steps e.g. denovo_map, refmap or ustacks/pstacks" /> | 80 <param name="input_tags" format="tabular,txt" type="data_collection" collection_type="list" label="Samples stacks" help="output from previous Stacks pipeline steps e.g. denovo_map, refmap or ustacks/pstacks" /> |
| 70 | 81 |
| 82 <param name="popmap" type="data" format="tabular,txt" label="Population map" help="If set, matching will be done only for samples listed in this file" optional="true" argument="-M" /> | |
| 83 | |
| 71 <param name="g" argument="-g" type="boolean" checked="false" truevalue="-g" falsevalue="" label="Base catalog matching on genomic location, not sequence identity" /> | 84 <param name="g" argument="-g" type="boolean" checked="false" truevalue="-g" falsevalue="" label="Base catalog matching on genomic location, not sequence identity" /> |
| 72 | 85 |
| 73 <param name="check_haplo" argument="-x" type="boolean" checked="false" truevalue="-x" falsevalue="" label="Don't verify haplotype of matching locus" /> | 86 <param name="check_haplo" argument="-x" type="boolean" checked="false" truevalue="-x" falsevalue="" label="Don't verify haplotype of matching locus" /> |
| 74 | 87 |
| 75 <param name="gapped" argument="--gapped" type="boolean" checked="false" truevalue="--gapped" falsevalue="" label="Perform gapped alignments between stacks" /> | 88 <param name="gapped" argument="--gapped" type="boolean" checked="false" truevalue="--gapped" falsevalue="" label="Perform gapped alignments between stacks" /> |
| 76 </inputs> | 89 </inputs> |
| 77 | 90 |
| 78 <outputs> | 91 <outputs> |
| 79 <data format="txt" name="output_log" label="sstacks.log with ${tool.name} on ${on_string}" from_work_dir="sstacks.log" /> | 92 <data format="txt" name="output_log" label="sstacks.log with ${tool.name} on ${on_string}" from_work_dir="sstacks.log" /> |
| 93 | |
| 94 <data format="html" name="output_summary" label="Summary from ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/summary.html" /> | |
| 80 | 95 |
| 81 <collection name="matches" type="list" label="Matches to the catalog on ${on_string}"> | 96 <collection name="matches" type="list" label="Matches to the catalog on ${on_string}"> |
| 82 <discover_datasets pattern="(?P<name>.+\.matches)\.tsv$" ext="tabular" directory="stacks_outputs" /> | 97 <discover_datasets pattern="(?P<name>.+\.matches)\.tsv$" ext="tabular" directory="stacks_outputs" /> |
| 83 </collection> | 98 </collection> |
| 84 </outputs> | 99 </outputs> |
| 108 <output name="output_log"> | 123 <output name="output_log"> |
| 109 <assert_contents> | 124 <assert_contents> |
| 110 <has_text text="Outputing to file" /> | 125 <has_text text="Outputing to file" /> |
| 111 </assert_contents> | 126 </assert_contents> |
| 112 </output> | 127 </output> |
| 128 <output name="output_summary"> | |
| 129 <assert_contents> | |
| 130 <has_text text="Stacks Statistics" /> | |
| 131 </assert_contents> | |
| 132 </output> | |
| 113 | 133 |
| 114 <output_collection name="matches"> | 134 <output_collection name="matches"> |
| 115 <element name="PopA_01.matches"> | 135 <element name="PopA_01.matches"> |
| 116 <assert_contents> | 136 <assert_contents> |
| 117 <has_text text="generated on " /> | 137 <has_text text="generated on " /> |
| 144 <param name="check_haplo" value="true" /> | 164 <param name="check_haplo" value="true" /> |
| 145 | 165 |
| 146 <output name="output_log"> | 166 <output name="output_log"> |
| 147 <assert_contents> | 167 <assert_contents> |
| 148 <has_text text="Outputing to file" /> | 168 <has_text text="Outputing to file" /> |
| 169 </assert_contents> | |
| 170 </output> | |
| 171 <output name="output_summary"> | |
| 172 <assert_contents> | |
| 173 <has_text text="Stacks Statistics" /> | |
| 174 </assert_contents> | |
| 175 </output> | |
| 176 | |
| 177 <output_collection name="matches"> | |
| 178 <element name="PopA_01.matches"> | |
| 179 <assert_contents> | |
| 180 <has_text text="generated on " /> | |
| 181 </assert_contents> | |
| 182 </element> | |
| 183 </output_collection> | |
| 184 </test> | |
| 185 | |
| 186 <test> | |
| 187 <param name="input_cat"> | |
| 188 <collection type="list"> | |
| 189 <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" /> | |
| 190 <element name="batch_1.catalog.snps.tsv" ftype="tabular" value="genotypes/batch_1.catalog.snps.tsv" /> | |
| 191 <element name="batch_1.catalog.tags.tsv" ftype="tabular" value="genotypes/batch_1.catalog.tags.tsv" /> | |
| 192 </collection> | |
| 193 </param> | |
| 194 <param name="input_tags"> | |
| 195 <collection type="list"> | |
| 196 <element name="PopA_01.alleles.tsv" ftype="tabular" value="genotypes/PopA_01.alleles.tsv" /> | |
| 197 <element name="PopA_01.matches.tsv" ftype="tabular" value="genotypes/PopA_01.matches.tsv" /> | |
| 198 <element name="PopA_01.snps.tsv" ftype="tabular" value="genotypes/PopA_01.snps.tsv" /> | |
| 199 <element name="PopA_01.tags.tsv" ftype="tabular" value="genotypes/PopA_01.tags.tsv" /> | |
| 200 <element name="PopA_02.alleles.tsv" ftype="tabular" value="genotypes/PopA_02.alleles.tsv" /> | |
| 201 <element name="PopA_02.matches.tsv" ftype="tabular" value="genotypes/PopA_02.matches.tsv" /> | |
| 202 <element name="PopA_02.snps.tsv" ftype="tabular" value="genotypes/PopA_02.snps.tsv" /> | |
| 203 <element name="PopA_02.tags.tsv" ftype="tabular" value="genotypes/PopA_02.tags.tsv" /> | |
| 204 </collection> | |
| 205 </param> | |
| 206 | |
| 207 <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv" /> | |
| 208 | |
| 209 <output name="output_log"> | |
| 210 <assert_contents> | |
| 211 <has_text text="Outputing to file" /> | |
| 212 </assert_contents> | |
| 213 </output> | |
| 214 <output name="output_summary"> | |
| 215 <assert_contents> | |
| 216 <has_text text="Stacks Statistics" /> | |
| 149 </assert_contents> | 217 </assert_contents> |
| 150 </output> | 218 </output> |
| 151 | 219 |
| 152 <output_collection name="matches"> | 220 <output_collection name="matches"> |
| 153 <element name="PopA_01.matches"> | 221 <element name="PopA_01.matches"> |
