Mercurial > repos > iuc > stacks2_tsv2bam
diff stacks_tsv2bam.xml @ 0:1b270fc77c81 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit b395fa36fa826e26085820ba3a9faacaeddcb460
author | iuc |
---|---|
date | Mon, 01 Jul 2019 10:59:53 -0400 |
parents | |
children | 8c2617661c49 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/stacks_tsv2bam.xml Mon Jul 01 10:59:53 2019 -0400 @@ -0,0 +1,254 @@ +<tool id="stacks2_tsv2bam" name="Stacks2: tsv2bam" profile="@PROFILE@" version="@STACKS_VERSION@+galaxy@WRAPPER_VERSION@"> + <description>Sort reads by RAD locus</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"/> + <expand macro="version_cmd"/> + <command detect_errors="aggressive"><![CDATA[ +@FASTQ_INPUT_FUNCTIONS@ + +mkdir stacks_inputs stacks_outputs && + +@LINK_STACKS_INPUT@ +@LINK_CAT_INPUT@ +@LINK_MATCHES_INPUT@ + +## link fastq files into stacks_inputs/ +#set $paired_reads=False +#for $sample in $input_type.fqinputs: + #if not $sample: + #continue + #end if + #set $paired_reads=True + #set ($link_cmd, $data_path, $name, $inputype) = $fastq_input_foo($sample, "reverse", ".2") + $link_cmd +#end for + +tsv2bam +-P stacks_inputs +#if $popmap + -M '$popmap' +#else + #for $sample in $samples + -s '$sample' + #end for +#end if +#if $paired_reads + --pe-reads-dir stacks_inputs +#end if +-t \${GALAXY_SLOTS:-1} +## tsv2bam writes to stdout and creates a log file +## - make stdout stderr +## - move the additional log file +2>&1 + +#if $output_log + && mv stacks_inputs/tsv2bam.log $output_log +#end if +&& mv stacks_inputs/*matches.bam stacks_outputs +]]></command> + + <inputs> + <expand macro="input_stacks_macro"/> + <expand macro="input_cat_macro"/> + <expand macro="input_matches_macro"/> + <!-- TODO add BAM? --> + <expand macro="fastq_input" fastq_optional="true" se_option="reverse reads" help="Paired end data or reverse reads. If a paired list is provided only the reverse reads are used in tsv2bam. Leave selection empty if you analyse single end data."/> + <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" /> + <expand macro="in_log"/> + </inputs> + + <outputs> + <expand macro="out_log"/> + <expand macro="tsv2bam_outputs_macro"/> + </outputs> + + <tests> + <!-- test wo paired end data --> + <test> + <param name="input_cat"> + <collection type="list"> + <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" /> + <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" /> + <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" /> + </collection> + </param> + <param name="input_stacks"> + <collection type="list"> + <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" /> + <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" /> + <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" /> + <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" /> + <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" /> + <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" /> + </collection> + </param> + <param name="input_matches"> + <collection type="list"> + <element name="PopA_01.matches" ftype="tabular" value="sstacks/PopA_01.matches.tsv" /> + <element name="PopA_02.matches" ftype="tabular" value="sstacks/PopA_02.matches.tsv" /> + </collection> + </param> + <param name="add_log" value="yes" /> + <output name="output_log" ftype="txt" file="tsv2bam/tsv2bam.log" lines_diff="14"/> + <output_collection name="bams" type="list" count="2"> + <element name="PopA_01.matches" file="tsv2bam/PopA_01.matches.bam" ftype="bam"/> + <element name="PopA_02.matches" file="tsv2bam/PopA_02.matches.bam" ftype="bam"/> + </output_collection> + </test> + <!-- test w popmap, w reverse reads as multiple selection --> + <test> + <param name="input_cat"> + <collection type="list"> + <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" /> + <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" /> + <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" /> + </collection> + </param> + <param name="input_stacks"> + <collection type="list"> + <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" /> + <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" /> + <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" /> + <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" /> + <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" /> + <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" /> + </collection> + </param> + <param name="input_matches"> + <collection type="list"> + <element name="PopA_01.matches" ftype="tabular" value="sstacks/PopA_01.matches.tsv" /> + <element name="PopA_02.matches" ftype="tabular" value="sstacks/PopA_02.matches.tsv" /> + </collection> + </param> + <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv" /> + <param name="input_type|input_type_select" value="single"/> + <param name="input_type|fqinputs" value="demultiplexed/PopA_01.2.fq,demultiplexed/PopA_02.2.fq" ftype="fastqsanger" /> + <param name="add_log" value="yes" /> + <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output> + <output_collection name="bams" type="list" count="2"/> + </test> + <!-- test w reverse reads as list --> + <test> + <param name="input_cat"> + <collection type="list"> + <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" /> + <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" /> + <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" /> + </collection> + </param> + <param name="input_stacks"> + <collection type="list"> + <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" /> + <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" /> + <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" /> + <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" /> + <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" /> + <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" /> + </collection> + </param> + <param name="input_matches"> + <collection type="list"> + <element name="PopA_01.matches" ftype="tabular" value="sstacks/PopA_01.matches.tsv" /> + <element name="PopA_02.matches" ftype="tabular" value="sstacks/PopA_02.matches.tsv" /> + </collection> + </param> + <param name="input_type|input_type_select" value="paired"/> + <param name="input_type|fqinputs"> + <collection type="list"> + <element name="PopA_01" value="demultiplexed/PopA_01.2.fq" ftype="fastqsanger" /> + <element name="PopA_02" value="demultiplexed/PopA_02.2.fq" ftype="fastqsanger"/> + </collection> + </param> + <param name="add_log" value="yes" /> + <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output> + <output_collection name="bams" type="list" count="2"/> + </test> + <!-- test w paired reads as paired dataset list --> + <test> + <param name="input_cat"> + <collection type="list"> + <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" /> + <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" /> + <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" /> + </collection> + </param> + <param name="input_stacks"> + <collection type="list"> + <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" /> + <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" /> + <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" /> + <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" /> + <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" /> + <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" /> + </collection> + </param> + <param name="input_matches"> + <collection type="list"> + <element name="PopA_01.matches" ftype="tabular" value="sstacks/PopA_01.matches.tsv" /> + <element name="PopA_02.matches" ftype="tabular" value="sstacks/PopA_02.matches.tsv" /> + </collection> + </param> + <param name="input_type|input_type_select" value="paired"/> + <param name="input_type|fqinputs"> + <collection type="list:paired"> + <element name="PopA_01"> + <collection type="paired"> + <element name="forward" value="demultiplexed/PopA_01.1.fq" ftype="fastqsanger" /> + <element name="reverse" value="demultiplexed/PopA_01.2.fq" ftype="fastqsanger"/> + </collection> + </element> + <element name="PopA_02"> + <collection type="paired"> + <element name="forward" value="demultiplexed/PopA_02.1.fq" ftype="fastqsanger" /> + <element name="reverse" value="demultiplexed/PopA_02.2.fq" ftype="fastqsanger"/> + </collection> + </element> + </collection> + </param> + <param name="add_log" value="yes" /> + <output name="output_log"><assert_contents><has_text text="done." /></assert_contents></output> + <output_collection name="bams" type="list" count="2"/> + </test> + </tests> + + <help> +<![CDATA[ +.. class:: infomark + +**What it does** + +The unique stacks program will take as input a set of short-read sequences and align them into exactly-matching stacks. Comparing the stacks it will form a set of loci and detect SNPs at each locus using a maximum likelihood framework + +-------- + +**Input files** + +FASTQ, FASTA + +**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>`_ + +@STACKS_INFOS@ +]]> + </help> + <expand macro="citation" /> +</tool>