view dorado_trimming.xml @ 0:1957f881bdf4 draft

planemo upload for repository https://github.com/usegalaxy-au/tools-au/tree/master/tools/dorado commit 8f48f7ee85162eeaa9c0247c7bb7d699f84d6ca7
author galaxy-australia
date Mon, 04 Nov 2024 03:27:55 +0000
parents
children 7ff7680fa713
line wrap: on
line source

<tool id="dorado_trimming" name="Dorado adapter and primer trimming" version="@VERSION@+galaxy0" python_template_version="3.5" profile="24.1">
    <description>for Oxford Nanopore (ONT) DNA reads</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="xrefs"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[

ln -s '$reads' ./reads

&&

dorado trim
--verbose
--threads "\${GALAXY_SLOTS}"
#if $no_trim_primers
    --no-trim-primers
#end if
#if $primer_sequences
    --primer-sequences '$primer_sequences'
#end if
reads
> trimmed.bam

&& 

dorado summary
trimmed.bam
> summary.tsv


        ]]></command>
    <inputs>
        <param name="reads" type="data" format="bam,fastqsanger,unsorted.bam" label="Existing, basecalled DNA dataset" help="Note: this tool does not support trimming adaptors from RNA reads. These need to be removed during basecalling."/>
        <param argument="--no-trim-primers" type="boolean" label="Don't trim primers" help="This option can be used to prevent the trimming of primer sequences. In this case only adapter sequences will be trimmed."/>
        <param argument="--primer-sequences" type="data" format="fasta" optional="true" label="Custom primer sequences" help="You can specify an alternative set of primer sequences to search for when trimming by adding a FASTA file containing the primer sequences you want to search for. The record names of the sequences do not matter. Note that if you use this option the normal primer sequences built-in to the dorado software will not be searched for."/>
    </inputs>
    <outputs>
        <data format="unsorted.bam" name="out_bam" label="Reads from ${on_string} trimmed by the ${tool.name} tool" from_work_dir="trimmed.bam"/>
        <data format="tsv" name="out_tsv" label="${tool.name} sequencing summary for ${on_string}" from_work_dir="summary.tsv"/>
    </outputs>
    <tests>
        <test expect_num_outputs="2">
            <param name="reads" value="FAL00375_473bf0ed_0.ten_reads.bam"/>
            <output name="out_bam" ftype="unsorted.bam" file="dorado_trimming_test1.bam"/>
            <output name="out_tsv" ftype="tsv" file="dorado_trimming_test1.tsv"/>
        </test>
        <test expect_num_outputs="2">
            <param name="reads" value="FAL00375_473bf0ed_0.ten_reads.bam"/>
            <param name="no_trim_primers" value="True"/>
            <output name="out_bam" ftype="unsorted.bam" file="dorado_trimming_test2.bam"/>
            <output name="out_tsv" ftype="tsv" file="dorado_trimming_test2.tsv"/>
        </test>
        <test expect_num_outputs="2">
            <param name="reads" value="lsk109_single_read.fastqsanger.gz" ftype="fastqsanger.gz"/>
            <param name="primer_sequences" value="custom_primers.fasta.gz" ftype="fasta.gz"/>
            <output name="out_bam" ftype="unsorted.bam" file="dorado_trimming_test3.bam"/>
            <output name="out_tsv" ftype="tsv" file="dorado_trimming_test3.tsv"/>
        </test>
    </tests>
    <help><![CDATA[
Detect and remove any adapter and/or primer sequences from the beginning
and end of DNA reads using Oxford Nanopore’s open source
`Dorado <https://github.com/nanoporetech/dorado/>`__ basecaller.

This tool scans existing, basecalled datasets for adapter and/or primer
sequences at either end, and trims any such found sequences.

**If you have raw (un-basecalled) data, you can trim them during
basecalling with the Dorado tool on Galaxy**.

Note that if you intend to demultiplex the reads later, trimming
adapters and primers may result in some portions of the flanking regions
of the barcodes being removed, which could interfere with correct
demultiplexing.

The **Don't trim primers** option can be used to prevent the trimming of
primer sequences. In this case only adapter sequences will be trimmed.

The output of will always be unaligned records, regardless of whether
the input is aligned/sorted or not.

Custom primer trimming
----------------------

The software automatically searches for primer sequences used in Oxford
Nanopore kits. However, you can specify an alternative set of primer
sequences to search by adding a FASTA file of primer sequences in the
**Custom primer sequences** option. The record names of the sequences do
not matter. Note that if you use this option the normal primer sequences
built-in to the dorado software will not be searched for.

RNA adapter trimming
--------------------

Adapters for RNA002 and RNA004 kits are automatically trimmed during
basecalling. However, unlike in DNA, the RNA adapter cannot be trimmed
post-basecalling.
            ]]></help>
    <expand macro="citation"/>
</tool>