Mercurial > repos > matthias > stacks2_sstacks
view stacks_sstacks.xml @ 0:2fb24beef45a draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit 98327d2948ae1ccb5aef5db9ab88605fd74a0de7-dirty
author | matthias |
---|---|
date | Thu, 29 Nov 2018 11:54:35 -0500 |
parents | |
children | 9a206f0fa740 |
line wrap: on
line source
<tool id="stacks2_sstacks" name="Stacks2: sstacks" version="@WRAPPER_VERSION@"> <description>match stacks to a catalog</description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements"/> <expand macro="stdio"/> <command><![CDATA[ #import re mkdir stacks_inputs stacks_outputs && ## TODO should there be only a single catalog? #set $catalog = "" #for $input_file in $input_cat #set $filename = str($input_file.element_identifier) #if not filename.endswith('.tsv') #set $filename = $filename + ".tsv" #end if ## TODO may be confused by catalog.calls from gstacks (maybe make .tsv not optional) #if re.search('catalog\.[a-z]+(\.tsv)?$', $filename) ln -s '${input_file}' 'stacks_inputs/$filename' && #if $filename.endswith('.tags.tsv') ##set catalog += " -c 'stacks_inputs/"+$filename[:-17] + "'" #set catalog += " -c 'stacks_inputs/'" #end if #end if #end for #set $samples = "" #for $input_file in $input_tags #set $filename = str($input_file.element_identifier) #if not filename.endswith('.tsv') #set $filename = $filename + ".tsv" #end if #if not re.search('catalog\.[a-z]+(\.tsv)?$', $filename) ln -s '${input_file}' 'stacks_inputs/$filename' && #if $filename.endswith('.tags.tsv') #set samples += " -s 'stacks_inputs/"+$filename[:-9] + "'" #end if #end if #end for sstacks -p \${GALAXY_SLOTS:-1} #if $popmap -P stacks_inputs -M '$popmap' #else $catalog $samples -o stacks_outputs #end if $x @GAP_OPTIONS_ONOFF@ @TEE_APPEND_LOG@ @CAT_LOG_TO_STDERR@ #if $popmap ## When using a popmap, stacks write to the input dir && mv stacks_inputs/*matches.tsv stacks_outputs/ #end if ]]></command> <inputs> <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" /> <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" /> <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" /> <param argument="-x" type="boolean" checked="false" truevalue="-x" falsevalue="" label="don't verify haplotype of matching locus" /> <expand macro="gap_options_onoff"/> <expand macro="in_log"/> </inputs> <outputs> <expand macro="out_log"/> <expand macro="sstacks_outputs_macro"/> </outputs> <tests> <!-- test w default parameters --> <test> <param name="input_cat"> <collection type="list"> <element name="catalog.alleles.tsv" ftype="tabular" value="cstacks/catalog.alleles.tsv" /> <element name="catalog.snps.tsv" ftype="tabular" value="cstacks/catalog.snps.tsv" /> <element name="catalog.tags.tsv" ftype="tabular" value="cstacks/catalog.tags.tsv" /> </collection> </param> <param name="input_tags"> <collection type="list"> <element name="PopA_01.alleles.tsv" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" /> <!-- TODO add test with results from full previous denovomap output also in cstacks <element name="PopA_01.matches.tsv" ftype="tabular" value="ustacks/PopA_01.matches.tsv" />--> <element name="PopA_01.snps.tsv" ftype="tabular" value="ustacks/PopA_01.snps.tsv" /> <element name="PopA_01.tags.tsv" ftype="tabular" value="ustacks/PopA_01.tags.tsv" /> <element name="PopA_02.alleles.tsv" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" /> <!-- <element name="PopA_02.matches.tsv" ftype="tabular" value="ustacks/PopA_02.matches.tsv" />--> <element name="PopA_02.snps.tsv" ftype="tabular" value="ustacks/PopA_02.snps.tsv" /> <element name="PopA_02.tags.tsv" ftype="tabular" value="ustacks/PopA_02.tags.tsv" /> </collection> </param> <param name="add_log" value="yes" /> <assert_command> <not_has_text text="-x" /> <not_has_text text="--disable-gapped" /> <not_has_text text="-M" /> </assert_command> <output name="output_log" ftype="txt" file="sstacks/sstacks.log"/> <output_collection name="matches" type="list"> <element name="PopA_01.matches" file="sstacks/PopA_01.matches.tsv" ftype="tabular" lines_diff="2"/> <element name="PopA_02.matches" file="sstacks/PopA_02.matches.tsv" ftype="tabular" lines_diff="2"/> </output_collection> </test> <!-- test w non default parameters and popmap--> <test> <param name="input_cat"> <collection type="list"> <element name="catalog.alleles.tsv" ftype="tabular" value="cstacks/catalog.alleles.tsv" /> <element name="catalog.snps.tsv" ftype="tabular" value="cstacks/catalog.snps.tsv" /> <element name="catalog.tags.tsv" ftype="tabular" value="cstacks/catalog.tags.tsv" /> </collection> </param> <param name="input_tags"> <collection type="list"> <element name="PopA_01.alleles.tsv" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" /> <!-- <element name="PopA_01.matches.tsv" ftype="tabular" value="ustacks/PopA_01.matches.tsv" />--> <element name="PopA_01.snps.tsv" ftype="tabular" value="ustacks/PopA_01.snps.tsv" /> <element name="PopA_01.tags.tsv" ftype="tabular" value="ustacks/PopA_01.tags.tsv" /> <element name="PopA_02.alleles.tsv" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" /> <!-- <element name="PopA_02.matches.tsv" ftype="tabular" value="ustacks/PopA_02.matches.tsv" />--> <element name="PopA_02.snps.tsv" ftype="tabular" value="ustacks/PopA_02.snps.tsv" /> <element name="PopA_02.tags.tsv" ftype="tabular" value="ustacks/PopA_02.tags.tsv" /> </collection> </param> <param name="gapped|use_gapped" value="yes" /> <param name="x" value="-x" /> <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv" /> <param name="add_log" value="yes" /> <assert_command> <has_text text="-x" /> <has_text text="--disable-gapped" /> <has_text text="-M" /> </assert_command> <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output> <output_collection name="matches" type="list" count="2"> <element name="PopA_01.matches"><assert_contents><has_text text="generated on " /></assert_contents></element> <element name="PopA_02.matches"><assert_contents><has_text text="generated on " /></assert_contents></element> </output_collection> </test> </tests> <help> <![CDATA[ .. class:: infomark **What it does** Sets of stacks constructed by the ustacks or pstacks programs can be searched against a catalog produced by cstacks. In the case of a genetic map, stacks from the progeny would be matched against the catalog to determine which progeny contain which parental alleles. -------- **Input files** Output from denovo_map, refmap or cstacks/ustacks/pstacks **Output files** - XXX.tags.tsv file: See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_ Notes: For the tags file, each stack will start in the file with a consensus sequence for the entire stack followed by the flags for that stack. Then, each individual read that was merged into that stack will follow. The next stack will start with another consensus sequence. - XXX.snps.tsv file: See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_ Notes: If a stack has two SNPs called within it, then there will be two lines in this file listing each one. - XXX.alleles.tsv file: See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_ - XXX.matches.tsv file: See `Stacks output description <http://catchenlab.life.illinois.edu/stacks/manual/#files>`_ Notes: Each line in this file records a match between a catalog locus and a locus in an individual, for a particular haplotype. The Batch ID plus the Catalog ID together represent a unique locus in the entire population, while the Sample ID and the Stack ID together represent a unique locus in an individual sample. @STACKS_INFOS@ ]]> </help> <expand macro="citation" /> </tool>