annotate reads_subsampler.xml @ 3:504004e78363

"planemo upload for repository https://toolrepo.galaxytrakr.org/"
author jpayne
date Fri, 19 Feb 2021 14:57:58 -0500
parents aa4c9bb12501
children 3852b3edc8a4
rev   line source
jpayne@0 1 <tool id="reads_subsampler" name="Subsample FASTQ Reads" version="1.0.0" python_template_version="3.5">
jpayne@0 2 <description>to reduce excess genomic coverage</description>
jpayne@0 3 <requirements>
jpayne@1 4 <requirement type="package" version="3.7">python</requirement>
jpayne@0 5 </requirements>
jpayne@0 6 <command detect_errors="exit_code"><![CDATA[
jpayne@0 7 #if $reads.reads_select == 'collection'
jpayne@0 8 python3 ${__tool_directory__}/subsamplr.py '$reads.coll.forward' '$reads.coll.reverse' '$downsampled.forward' '$downsampled.reverse' $coverage $genome_size '$seed'
jpayne@0 9 #else
jpayne@0 10 #if $reverse
jpayne@0 11 python3 ${__tool_directory__}/subsamplr.py '$forward' '$reverse' $forward_out $reverse_out $coverage $genome_size '$seed'
jpayne@0 12 #else
jpayne@0 13 python3 ${__tool_directory__}/subsamplr.py '$forward' '$forward_out' $coverage $genome_size '$seed'
jpayne@0 14 #end if
jpayne@0 15 #end if
jpayne@0 16 ]]></command>
jpayne@0 17 <inputs>
jpayne@0 18 <conditional name="reads">
jpayne@0 19 <param name="reads_select" type="select" label="Paired-end collection, or two datasets from your history">
jpayne@0 20 <option value="collection">Paired collection from your history</option>
jpayne@0 21 <option value="history">Two FASTQ datasets from your history representing paired reads, forward and reverse</option>
jpayne@0 22 <option value="single">One FASTQ dataset representing single-end sequencing</option>
jpayne@0 23 </param>
jpayne@0 24 <when value="collection">
jpayne@0 25 <param label="Paired reads" name="coll" type="data_collection" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" collection_type="paired" />
jpayne@0 26 </when>
jpayne@0 27 <when value="history">
jpayne@0 28 <param label="Forward reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
jpayne@0 29 <param label="Reverse reads" type="data" name="reverse" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
jpayne@0 30 </when>
jpayne@0 31 <when value="single">
jpayne@0 32 <param label="Reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
jpayne@0 33 </when>
jpayne@0 34 </conditional>
jpayne@0 35 <param name="coverage" type="integer" label="Maximum Coverage" value="200" />
jpayne@0 36 <param name="genome_size" type="select" label="Assumed Genome Size">
jpayne@0 37 <option value="4500000">Salmonella, E. Coli (4500000)</option>
jpayne@0 38 <option value="2700000">Listeria (2700000)</option>
jpayne@0 39 <option value="29900">SARS-CoV-2 (29900)</option>
jpayne@0 40 </param>
jpayne@0 41 <param name="seed" type="text" value="ed2b99d842cddc1ac81d7c01a0bf0555" label="Random seed (you don't have to change this)"/>
jpayne@0 42 </inputs>
jpayne@0 43 <outputs>
jpayne@2 44 <data name="forward_out" label="${reads.forward.name}.downsampled" format_source="forward">
jpayne@0 45 <filter>reads['reads_select'] == "history" or reads['reads_select'] == "single"</filter>
jpayne@0 46 </data>
jpayne@3 47 <data name="reverse_out" label="${reads.reverse.name}.downsampled" format_source="reverse">
jpayne@0 48 <filter>reads['reads_select'] == "history"</filter>
jpayne@0 49 </data>
jpayne@0 50 <collection name="downsampled" type="paired" label="${reads.coll.name}" structured_like="reads|coll" format_source="reads|coll">
jpayne@0 51 <filter>reads['reads_select'] == "collection"</filter>
jpayne@0 52 <data name="forward" label="${reads.coll.forward.name}.downsampled" format_source="reads.coll.forward" />
jpayne@0 53 <data name="reverse" label="${reads.coll.reverse.name}.downsampled" format_source="reads.coll.reverse" />
jpayne@0 54 </collection>
jpayne@0 55 </outputs>
jpayne@0 56 <tests>
jpayne@0 57 <test>
jpayne@0 58 <conditional name="reads">
jpayne@0 59 <param name="reads_select" value="collection" />
jpayne@0 60 <param name="coll">
jpayne@0 61 <collection type="paired">
jpayne@0 62 <element name="forward" value="forward.fastq" ftype="fastqsanger" />
jpayne@0 63 <element name="reverse" value="reverse.fastq" ftype="fastqsanger" />
jpayne@0 64 </collection>
jpayne@0 65 </param>
jpayne@0 66 </conditional>
jpayne@0 67 <param name="coverage" value="20" />
jpayne@0 68 <param name="genome_size" value="29900" />
jpayne@0 69 <output_collection name="downsampled" type="paired">
jpayne@0 70 <element name="forward" file="forward_out.fastq" />
jpayne@0 71 <element name="reverse" file="reverse_out.fastq" />
jpayne@0 72 </output_collection>
jpayne@0 73 </test>
jpayne@0 74 <test>
jpayne@0 75 <conditional name="reads">
jpayne@0 76 <param name="reads_select" value="history" />
jpayne@0 77 <param name="forward" value="forward.fastq" />
jpayne@0 78 <param name="reverse" value="reverse.fastq" />
jpayne@0 79 </conditional>
jpayne@0 80 <param name="coverage" value="20" />
jpayne@0 81 <param name="genome_size" value="29900" />
jpayne@0 82 <output name="forward_out" value="forward_out.fastq" />
jpayne@0 83 <output name="reverse_out" value="reverse_out.fastq" />
jpayne@0 84 </test>
jpayne@0 85 <test>
jpayne@0 86 <conditional name="reads">
jpayne@0 87 <param name="reads_select" value="history" />
jpayne@0 88 <param name="forward" value="forward.fastq.gz" />
jpayne@0 89 <param name="reverse" value="reverse.fastq.gz" />
jpayne@0 90 </conditional>
jpayne@0 91 <param name="coverage" value="20" />
jpayne@0 92 <param name="genome_size" value="29900" />
jpayne@0 93 <output name="forward_out" value="forward_out.fastq.gz" decompress="true" />
jpayne@0 94 <output name="reverse_out" value="reverse_out.fastq.gz" decompress="true" />
jpayne@0 95 </test>
jpayne@0 96 <test>
jpayne@0 97 <conditional name="reads">
jpayne@0 98 <param name="reads_select" value="history" />
jpayne@0 99 <param name="forward" value="forward.fastq.bz2" />
jpayne@0 100 <param name="reverse" value="reverse.fastq.bz2" />
jpayne@0 101 </conditional>
jpayne@0 102 <param name="coverage" value="20" />
jpayne@0 103 <param name="genome_size" value="29900" />
jpayne@0 104 <output name="forward_out" value="forward_out.fastq.bz2" decompress="true" />
jpayne@0 105 <output name="reverse_out" value="reverse_out.fastq.bz2" decompress="true" />
jpayne@0 106 </test>
jpayne@0 107 </tests>
jpayne@0 108 <help><![CDATA[
jpayne@0 109 Randomly subsample single or paired-end FASTQ reads to target a certain genomic coverage depth.
jpayne@0 110 ]]></help>
jpayne@0 111 <citations />
jpayne@0 112 </tool>