view seqtk_sample.xml @ 9:4b494533146a draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seqtk commit 2f75805e2e6cfa2af15076e6f4929b87631360a6
author iuc
date Sat, 09 Dec 2023 11:14:21 +0000
parents 3da72230c066
children
line wrap: on
line source

<?xml version="1.0"?>
<tool id="seqtk_sample" name="seqtk_sample" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.05">
    <description>random subsample of fasta or fastq sequences</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <command><![CDATA[
seqtk sample
-s $s
$advanced.single_pass_mode
'$in_file'
$subsample_size
@CONDITIONAL_GZIP_OUT@
    ]]></command>
    <inputs>
        <expand macro="in_faq" />
        <param argument="-s" type="integer" value="4" label="RNG seed" help="The seed used for the random number generator. Manually specifying a number here is useful for reproducing the same subsampling in different runs (e.g. read 1 and read 2)" />
        <param name="subsample_size" type="float" value="100" label="Subsample (decimal fraction or number)" help="Use an integer > 1 to select a specific number of reads. Use a decimal (e.g. 0.5) to select a fraction of reads"/>
        <section name="advanced" title="Advanced options" expanded="false">
            <param name="single_pass_mode" type="boolean" truevalue="" falsevalue="-2" checked="false" label="Enable 1-pass mode" help="Use this if the number of reads you want to sample is small enough to fit into memory. If you're not sure, don't use this."/>
        </section>
    </inputs>
    <outputs>
        <data name="default" format_source="in_file" label="${tool.name} on ${on_string}: Subsample of reads"/>
    </outputs>
    <tests>
        <test>
            <param name="in_file" value="seqtk_sample.fa"/>
            <param name="subsample_size" value="4"/>
            <param name="s" value="4"/>
            <param name="advanced|single_pass_mode" value="True"/>
            <output name="default" file="seqtk_sample.out" ftype="fasta"/>
        </test>
        <test>
            <param name="in_file" value="seqtk_sample.fa.gz" ftype="fasta.gz"/>
            <param name="subsample_size" value="4"/>
            <param name="s" value="4"/>
            <param name="advanced|single_pass_mode" value='True'/>
            <output name="default" file="seqtk_sample.out.gz" ftype="fasta.gz"/>
        </test>
        <test>
            <param name="in_file" value="seqtk_sample.fa.gz" ftype="fasta.gz"/>
            <param name="subsample_size" value="4"/>
            <param name="s" value="4"/>
            <param name="advanced|single_pass_mode" value='False'/>
            <output name="default" file="seqtk_sample.lowmem.gz" ftype="fasta.gz"/>
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Takes a random subsample of FASTA or FASTQ sequences. The RNG is seedable to allow for reproducible results, and defaults to `4 <http://xkcd.com/221/>`__.

The subsample size can be a decimal fraction <=1, where 1 implies 100% of the reads should be used. If a number >1 is provided, that many reads will be taken from the dataset.

Two pass sampling mode reads the input file once to build a list of reads to output then again to output the reads. It is twice as slow, but uses much less RAM. It is only in effect when an integer number of reads (not a fraction) is specified as subsample size.

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