view presto_partition.xml @ 3:620f3b0a1430 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/presto commit d52e3c9c53dd358e14e65a3a083e7d5c102f8697"
author iuc
date Sat, 25 Sep 2021 18:34:18 +0000
parents 824d24bfe8dd
children 1f3ae16f3655
line wrap: on
line source

<tool id="presto_partition" name="pRESTO Partition" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>Partition a file in two</description>
    <expand macro="bio_tools"/>
    <macros>
        <import>presto_macros.xml</import>
    </macros>
    
    <expand macro="requirements"/>
    
    <version_command>SplitSeq.py --version</version_command>
    <command detect_errors="exit_code"><![CDATA[
        ln -s '$fastq_in' in.fastq &&
        SplitSeq.py group
          -s in.fastq
          -f '$field'
          --num '$threshold'
          --outname=tmp_group &&
        mv './tmp_group_under-${threshold}.fastq' '$lower_out' &&
        mv './tmp_group_atleast-${threshold}.fastq' '$upper_out'
    ]]></command>

    <inputs>
        <param argument="-s" name="fastq_in" type="data" format="fastq" label="Input FASTQ file" help="FASTQ file of sequences with barcodes/UMIs in an annotation."/>
        <param argument="-f" name="field" type="text" value="" label="Annotation Field" help="Name of the numeric annotation field to partition by."/>
        <param argument="--num" name="threshold" type="integer" value="0" label="Threshold" help="Numeric threshold. File will be partitions be into n &lt; threshold and n &gt;= threshold."/>
    </inputs>

    <outputs>
        <data name="lower_out" format="fastq" label="Sequences with $field &lt; $threshold"/>
        <data name="upper_out" format="fastq" label="Sequences with $field &gt;= $threshold"/>
    </outputs>
    
    <tests>
        <test>
            <param  name="fastq_in" value="presto_splitseq_partition_test_in.fastq"/>
            <param  name="field" value="CONSCOUNT"/>
            <param  name="threshold" value="3"/>
            <output name="lower_out" file="presto_splitseq_partition_test_out_under.fastq" sort="true"/>
            <output name="upper_out" file="presto_splitseq_partition_test_out_atleast.fastq" sort="true"/>
        </test>
    </tests>
    
    <help><![CDATA[
Uses pRESTO SplitSeq.py group to partition a file of sequences into two files. The input file is split based on a numeric
annotation field to yield one file which contains all sequences with the field value less than the provided threshold and
a second file with all sequences with the field value greater than or equal to the threshold.

See the `pRESTO online help <@PRESTO_BASE_URL@/en/stable>`_ for more information.

@HELP_NOTE@
    ]]></help>
    <expand macro="citations" />
</tool>