Mercurial > repos > iuc > read_it_and_keep
diff read-it-and-keep.xml @ 0:554aa2a63f04 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/read-it-and-keep commit 4b41e2742ba5f9c957e13a188ca49e60e16ae13b"
author | iuc |
---|---|
date | Fri, 28 Jan 2022 18:47:34 +0000 |
parents | |
children | 1563b58905f4 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/read-it-and-keep.xml Fri Jan 28 18:47:34 2022 +0000 @@ -0,0 +1,162 @@ +<tool id="read_it_and_keep" name="Read It and Keep" version="@TOOL_VERSION@+galaxy0" profile="20.09"> + <macros> + <token name="@FASTQ_FORMATS@">fastq,fastq.gz,fastqsanger,fastqsanger.gz</token> + <token name="@TOOL_VERSION@">0.1.0</token> + </macros> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">read-it-and-keep</requirement> + <requirement type="package">python</requirement> + </requirements> + <command detect_errors="exit_code"><![CDATA[ + #if $ref_source.source == "history" + ln -s '$ref_source.ref_fasta' ref${trim_reference}.fasta && + #elif $ref_source.source == "builtin" + ln -s '$ref_source.ref_fasta_builtin.path' ref${trim_reference}.fasta && + #end if + #if $trim_reference + python '$__tool_directory__/trim_reference.py' ref${trim_reference}.fasta ref.fasta && + #end if + #if $reads.read_type == "paired" + ln -s '$reads.read1' read1.fastq && + ln -s '$reads.read2' read2.fastq && + #elif $reads.read_type == 'paired_collection' + ln -s '$reads.paired_reads.forward' read1.fastq && + ln -s '$reads.paired_reads.reverse' read2.fastq && + #elif $reads.read_type == 'single' + ln -s '$reads.single_read1' read1.fastq && + #end if + readItAndKeep + --tech $sequencing_tech + --ref_fasta ref.fasta + --min_map_length $adv.min_map_length + --min_map_length_pc $adv.min_map_length_pc + --reads1 read1.fastq + #if $reads.read_type != "single" + --reads2 read2.fastq + #end if + -o output + #if $reads.read_type == 'single' + && mv output.reads.fastq.gz output.reads_1.fastq.gz + #end if + ]]></command> + <inputs> + <conditional name="reads"> + <param type="select" label="Read type" name="read_type"> + <option value="paired" selected="true">Paired end</option> + <option value="paired_collection">Paired collection</option> + <option value="single">Single ended</option> + </param> + <when value="paired"> + <param type="data" format="@FASTQ_FORMATS@" name="read1" label="Read1" /> + <param type="data" format="@FASTQ_FORMATS@" name="read2" label="Read2" /> + </when> + <when value="paired_collection"> + <param type="data_collection" collection_type="paired" format="@FASTQ_FORMATS@" name="paired_reads" label="Reads" /> + </when> + <when value="single"> + <param type="data" format="@FASTQ_FORMATS@" name="single_read1" label="Read1" /> + </when> + </conditional> + <conditional name="ref_source"> + <param type="select" label="Reference genome source" name="source"> + <option value="history" selected="true">History</option> + <option value="builtin">Built-in</option> + </param> + <when value="history"> + <param type="data" format="fasta" name="ref_fasta" label="Reference genome" /> + </when> + <when value="builtin"> + <param type="select" name="ref_fasta_builtin" label="Reference genome"> + <options from_data_table="all_fasta" /> + </param> + </when> + </conditional> + <param type="boolean" name="trim_reference" label="Trim trailing As from the reference sequence" checked="true" truevalue="_untrimmed" falsevalue="" help="Remove all As at the end of the reference sequence to ensure that the reference has no poly-A tail (see Note in the general help section below)" /> + <param type="select" argument="--tech" name="sequencing_tech" label="Sequencing technology"> + <option value="illumina">Illumina</option> + <option value="ont">Oxford Nanopore</option> + </param> + <section name="adv" title="Advanced options"> + <param argument="--min_map_length" type="integer" min="0" value="50" label="Shortest match required to keep a read (in bp)" /> + <param argument="--min_map_length_pc" type="float" min="0.0" max="100.0" value="50.0" label="Minimum length of match required to keep a read (as percentage of read length" /> + </section> + </inputs> + <outputs> + <data name="output_reads1" format="fastqsanger.gz" label="Filtered reads ${on_string} - reads1" from_work_dir="output.reads_1.fastq.gz"> + <filter>reads["read_type"] == "single" or reads["read_type"] == "paired"</filter> + </data> + <data name="output_reads2" format="fastqsanger.gz" label="Filtered reads ${on_string} - reads2" from_work_dir="output.reads_2.fastq.gz"> + <filter>reads["read_type"] == "paired"</filter> + </data> + <collection type="paired" format="fastqsanger.gz" name="output_collection" label="Filtered reads ${on_string}"> + <filter>reads["read_type"] == "paired_collection"</filter> + <data name="forward" format="fastqsanger.gz" from_work_dir="output.reads_1.fastq.gz" /> + <data name="reverse" format="fastqsanger.gz" from_work_dir="output.reads_2.fastq.gz" /> + </collection> + </outputs> + <tests> + <test expect_num_outputs="2"> + <conditional name="reads"> + <param name="read_type" value="paired" /> + <param name="read1" value="test1.fastq.gz" ftype="fastqsanger.gz" /> + <param name="read2" value="test2.fastq.gz" ftype="fastqsanger.gz" /> + </conditional> + <conditional name="ref_source"> + <param name="source" value="history" /> + <param name="ref_fasta" value="reference.fasta" ftype="fasta" /> + </conditional> + <param name="sequencing_tech" value="illumina" /> + <output name="output_reads1" value="output_test1.fastq.gz" /> + <output name="output_reads2" value="output_test2.fastq.gz" /> + </test> + <test expect_num_outputs="3"> + <conditional name="reads"> + <param name="read_type" value="paired_collection" /> + <param name="paired_reads"> + <collection type="paired"> + <element name="forward" value="test1.fastq.gz" ftype="fastqsanger.gz" /> + <element name="reverse" value="test2.fastq.gz" ftype="fastqsanger.gz" /> + </collection> + </param> + </conditional> + <conditional name="ref_source"> + <param name="source" value="history" /> + <param name="ref_fasta" value="reference.fasta" ftype="fasta" /> + </conditional> + <param name="sequencing_tech" value="illumina" /> + <output_collection name="output_collection"> + <element name="forward" value="output_test1.fastq.gz" /> + <element name="reverse" value="output_test2.fastq.gz" /> + </output_collection> + </test> + <test expect_num_outputs="1"> + <conditional name="reads"> + <param name="read_type" value="single" /> + <param name="single_read1" value="test3.fastq.gz" ftype="fastqsanger.gz"/> + </conditional> + <conditional name="ref_source"> + <param name="source" value="history" /> + <param name="ref_fasta" value="reference.fasta" ftype="fasta" /> + </conditional> + <param name="sequencing_tech" value="ont" /> + <output name="output_reads1" value="output_test3.fastq.gz" /> + </test> + </tests> + <help><![CDATA[ +ReadItAndKeep +------------- + +ReadItAndKeep is a tool for filtering viral sequence data to remove host reads, developed for cleaning +SARS-CoV-2 sequencing data. It maps reads against the SARS-CoV-2 viral genome (with the poly-A tail removed) +and only keeps those that map well. + +**Note**: If the reference genome supplied contains a poly-A tail, reads that contain part of a poly-A tail will map +to the refence, no matter what species they originate from. If you are not sure if the reference you are using has had +trailing A's trimmed, enable the `Trim trailing As` option. + +Input can be either Illumina or Oxford Nanopore reads. + ]]></help> + <citations> + <citation type="doi">10.1101/2022.01.21.477194</citation> + </citations> +</tool>