view seqkit_stats.xml @ 2:d85bac8b166a draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/seqkit commit 202bb1229cb0b8e8040a87d140edb6fdf7654628
author iuc
date Thu, 03 Nov 2022 19:36:09 +0000
parents 191738d53912
children 812705bcf39c
line wrap: on
line source

<tool id="seqkit_stats" name="SeqKit statistics" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description>of FASTA/Q files</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code"><![CDATA[
#import re

#set input_identifier = re.sub('[^\s\w\-]', '_', str($input.element_identifier))
ln -s '${input}' '${input_identifier}' &&

seqkit stats 
'${input_identifier}'
$all
$basename
#if str($input.ext) in ['fastqsanger', 'fastqsanger.gz']:
    --fq-encoding sanger
#end if
$skip_err
$tabular
> '$output'
]]></command>
    <inputs>
        <param name="input" type="data" format="fasta,fasta.gz,fastqsanger,fastqsanger.gz" label="Input file"/>
        <param argument="--all" type="boolean" truevalue="--all" falsevalue="" checked="false" label="Output all statistics?" help="Includes quartiles of seq length, sum_gap, N50"/>
        <param argument="--basename" type="boolean" truevalue="--basename" falsevalue="" checked="false" label="Output base name of input file?"/>
        <param argument="--skip_err" type="boolean" truevalue="--skip-err" falsevalue="" checked="false" label="Skip errors?" help="Only show warning messages"/>
        <param argument="--tabular" type="boolean" truevalue="--tabular" falsevalue="" checked="true" label="Output machine-friendly tabular format?"/>
    </inputs>
    <outputs>
        <data name="output" format="txt">
            <change_format>
                <when input="tabular" value="--tabular" format="tabular"/>
            </change_format>
        </data>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="input" value="input1.fastq.gz" ftype="fastqsanger.gz"/>
            <param name="all" value="--all"/>
            <output name="output" file="stats_output1.tabular" ftype="tabular"/>
        </test>
        <test expect_num_outputs="1">
            <param name="input" value="input1.fasta.gz" ftype="fasta.gz"/>
            <param name="all" value="--all"/>
            <output name="output" file="stats_output2.tabular" ftype="tabular"/>
        </test>
    </tests>
    <help>
**What it does**

Outputs simple statistics of FASTA/Q files; number of sequences, sum / min / avg / max sequence lengths, Q1, Q2, Q3,
sum gap, N50, Q20(%), and Q30(%).
    </help>
    <expand macro="citations"/>
</tool>