annotate reads_subsampler.xml @ 5:3852b3edc8a4 tip

"planemo upload for repository https://toolrepo.galaxytrakr.org/"
author jpayne
date Fri, 19 Feb 2021 17:51:59 -0500
parents 504004e78363
children
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@5 9 #elif $reads.reads_select == 'single'
jpayne@5 10 python3 ${__tool_directory__}/subsamplr.py '$forward' '$forward_out' $coverage $genome_size '$seed'
jpayne@5 11 #else
jpayne@5 12 python3 ${__tool_directory__}/subsamplr.py '$forward' '$reverse' $forward_out $reverse_out $coverage $genome_size '$seed'
jpayne@0 13 #end if
jpayne@0 14 ]]></command>
jpayne@0 15 <inputs>
jpayne@0 16 <conditional name="reads">
jpayne@0 17 <param name="reads_select" type="select" label="Paired-end collection, or two datasets from your history">
jpayne@0 18 <option value="collection">Paired collection from your history</option>
jpayne@0 19 <option value="history">Two FASTQ datasets from your history representing paired reads, forward and reverse</option>
jpayne@0 20 <option value="single">One FASTQ dataset representing single-end sequencing</option>
jpayne@0 21 </param>
jpayne@0 22 <when value="collection">
jpayne@0 23 <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 24 </when>
jpayne@0 25 <when value="history">
jpayne@0 26 <param label="Forward reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
jpayne@0 27 <param label="Reverse reads" type="data" name="reverse" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
jpayne@0 28 </when>
jpayne@0 29 <when value="single">
jpayne@0 30 <param label="Reads" type="data" name="forward" format="fastq,fastqsanger,fastq.gz,fastqsanger.gz,fastq.bz2,fastqsanger.bz2" />
jpayne@0 31 </when>
jpayne@0 32 </conditional>
jpayne@0 33 <param name="coverage" type="integer" label="Maximum Coverage" value="200" />
jpayne@0 34 <param name="genome_size" type="select" label="Assumed Genome Size">
jpayne@5 35 <option value="5000000">Salmonella, E. Coli, Vibrio p. (5000000)</option>
jpayne@5 36 <option value="4000000">Vibrio cholerae (4000000)</option>
jpayne@0 37 <option value="2700000">Listeria (2700000)</option>
jpayne@5 38 <option value="1600000">Campylobacter (1600000)</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@5 59 <param name="reads_select" value="single" />
jpayne@5 60 <param name="forward" value="forward.fastq" />
jpayne@5 61 </conditional>
jpayne@5 62 <param name="coverage" value="20" />
jpayne@5 63 <param name="genome_size" value="29900" />
jpayne@5 64 <output name="forward_out" value="forward_out.fastq" />
jpayne@5 65 </test>
jpayne@5 66 <test>
jpayne@5 67 <conditional name="reads">
jpayne@0 68 <param name="reads_select" value="collection" />
jpayne@0 69 <param name="coll">
jpayne@0 70 <collection type="paired">
jpayne@0 71 <element name="forward" value="forward.fastq" ftype="fastqsanger" />
jpayne@0 72 <element name="reverse" value="reverse.fastq" ftype="fastqsanger" />
jpayne@0 73 </collection>
jpayne@0 74 </param>
jpayne@0 75 </conditional>
jpayne@0 76 <param name="coverage" value="20" />
jpayne@0 77 <param name="genome_size" value="29900" />
jpayne@0 78 <output_collection name="downsampled" type="paired">
jpayne@0 79 <element name="forward" file="forward_out.fastq" />
jpayne@0 80 <element name="reverse" file="reverse_out.fastq" />
jpayne@0 81 </output_collection>
jpayne@0 82 </test>
jpayne@0 83 <test>
jpayne@0 84 <conditional name="reads">
jpayne@0 85 <param name="reads_select" value="history" />
jpayne@0 86 <param name="forward" value="forward.fastq" />
jpayne@0 87 <param name="reverse" value="reverse.fastq" />
jpayne@0 88 </conditional>
jpayne@0 89 <param name="coverage" value="20" />
jpayne@0 90 <param name="genome_size" value="29900" />
jpayne@0 91 <output name="forward_out" value="forward_out.fastq" />
jpayne@0 92 <output name="reverse_out" value="reverse_out.fastq" />
jpayne@0 93 </test>
jpayne@0 94 <test>
jpayne@0 95 <conditional name="reads">
jpayne@0 96 <param name="reads_select" value="history" />
jpayne@0 97 <param name="forward" value="forward.fastq.gz" />
jpayne@0 98 <param name="reverse" value="reverse.fastq.gz" />
jpayne@0 99 </conditional>
jpayne@0 100 <param name="coverage" value="20" />
jpayne@0 101 <param name="genome_size" value="29900" />
jpayne@0 102 <output name="forward_out" value="forward_out.fastq.gz" decompress="true" />
jpayne@0 103 <output name="reverse_out" value="reverse_out.fastq.gz" decompress="true" />
jpayne@0 104 </test>
jpayne@0 105 <test>
jpayne@0 106 <conditional name="reads">
jpayne@0 107 <param name="reads_select" value="history" />
jpayne@0 108 <param name="forward" value="forward.fastq.bz2" />
jpayne@0 109 <param name="reverse" value="reverse.fastq.bz2" />
jpayne@0 110 </conditional>
jpayne@0 111 <param name="coverage" value="20" />
jpayne@0 112 <param name="genome_size" value="29900" />
jpayne@0 113 <output name="forward_out" value="forward_out.fastq.bz2" decompress="true" />
jpayne@0 114 <output name="reverse_out" value="reverse_out.fastq.bz2" decompress="true" />
jpayne@0 115 </test>
jpayne@0 116 </tests>
jpayne@0 117 <help><![CDATA[
jpayne@0 118 Randomly subsample single or paired-end FASTQ reads to target a certain genomic coverage depth.
jpayne@0 119 ]]></help>
jpayne@0 120 <citations />
jpayne@0 121 </tool>