view obiclean.xml @ 6:fea356c8cd06 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/obitools commit b017355279c18334e66ea8c0c0d7727fbd2876f7
author iuc
date Thu, 13 Nov 2025 10:22:44 +0000
parents c78f86dd30c1
children
line wrap: on
line source

<tool id="obi_clean" name="obiclean" version="@TOOL_VERSION@" profile="@PROFILE@">
    <description>tags a set of sequences for PCR/sequencing errors identification</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>

    <command><![CDATA[
        @GUNZIP_INPUT@
        obiclean
        --without-progress-bar
        #if $distance
            -d '$distance'
        #end if
        #if $key
            -s '$key'
        #end if
        #if $ratio
            -r '$ratio'
        #end if
        ${head}
        @INPUT_FORMAT@
        @OUT_FORMAT@
        input 
        @GZIP_OUTPUT@
        >'$output'
        @GENERATE_GALAXY_JSON@
    ]]></command>
    <inputs>
        <param name="input" type="data" format="@INPUT_FORMATS@" label="Input sequences file"/>
        <param name="distance" type="integer" value="1" optional="true" label="Maximum numbers of differences between two variant sequences (default: 1)"/>
        <param name="key" type="text" optional="true" label="Specify an attribute containing sample definition"/>
        <param name="ratio" optional="true" type="float" value="1" label="Threshold ratio between counts (rare/abundant counts) of two sequence records so that the less abundant one is a variant of the more abundant (default: 1, i.e. all less abundant sequences are variants)"/>
        <param name="head" type="boolean" checked="false" truevalue="-H" falsevalue="" label="Do you want to select only sequences with the head status in a least one sample?"/>
        <expand macro="input_format_options_macro"/>
        <expand macro="out_format_macro"/>
    </inputs>
    <outputs>
        <data format="auto" name="output"/>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="input" value="output_obiannotate.fasta" />
            <param name="head" value="True"/>
            <output name="output" file="output_obiclean_simple.fasta" ftype="fasta"/>
        </test>
        <test expect_num_outputs="1">
            <param name="input" value="output_obiannotate.fasta.gz" />
            <param name="key" value="merged_sample"/>
            <param name="ratio" value="0.05"/>
            <param name="head" value="False"/>
            <output name="output" file="output_obiclean_advanced.fasta.gz" ftype="fasta.gz" decompress="true"/>
        </test>
    </tests>
    <help><![CDATA[

.. class:: infomark

**What it does**

obiclean is a command that classifies sequence records either as head, internal or singleton.

For that purpose, two pieces of information are used:

- sequence record counts
- sequence similarities

S1 a sequence record is considered as a variant of S2 another sequence record if and only if:

- count of S1 divided by count of S2 is lesser than the ratio R. R default value is set to 1, and can be adjusted between 0 and 1 with the -r option.
- both sequences are related to one another (they can align with some differences, the maximum number of differences can be specified by the -d option).

Considering S a sequence record, the following properties hold for S tagged as:

**head:**
- there exists at least one sequence record in the dataset that is a variant of S
- there exists no sequence record in the dataset such that S is a variant of this sequence record

**internal:**
- there exists at least one sequence record in the dataset such that S is a variant of this sequence record

**singleton:**
- there exists no sequence record in the dataset that is a variant of S
- there exists no sequence record in the dataset such that S is a variant of this sequence record

By default, tagging is done once for the whole dataset, but it can also be done sample by sample by specifying the -s option. In such a case, the counts are extracted from the sample information.

Finally, each sequence record is annotated with three new attributes head, internal and singleton. The attribute values are the numbers of samples in which the sequence record has been classified in this manner.

@OBITOOLS_LINK@

        ]]>
    </help>
    <expand macro="citation"/>
    </tool>