view samtools_idxstats.xml @ 5:fd87401a3da6 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_idxstats commit 558d30ff047fe2f62658e8b57e27ebe8db77ede1"
author iuc
date Fri, 06 Sep 2019 11:21:38 -0400
parents 56838051b673
children 9a12e8643fc5
line wrap: on
line source

<tool id="samtools_idxstats" name="Samtools idxstats" version="2.0.3">
    <description>reports stats of the BAM index file</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements"/>
    <expand macro="stdio"/>
    <expand macro="version_command"/>
    <command><![CDATA[
@ADDTHREADS@
@PREPARE_IDX@
samtools idxstats -@ \$addthreads infile  > '${output}'
    ]]></command>
    <inputs>
        <param name="input" type="data" format="bam,cram" label="BAM file" />
    </inputs>
    <outputs>
        <data format="tabular" name="output" label="${tool.name} on ${on_string}" />
    </outputs>
    <tests>
        <!-- test from https://github.com/samtools/samtools/blob/9ce8c64493f7ea3fa69bc5c1ac980b1a8e3dcf1f/test/test.pl#L2556 -->
        <test>
            <param name="input" value="test_input_1_a.bam" ftype="bam" />
            <output name="output" file="test_input_1_a.bam.expected" compare="diff" ftype="tabular" />
        </test>
        <!-- test from original tool -->
	<test>
            <param name="input" value="phiX.bam" ftype="bam" />
            <output name="output" file="samtools_idxstats_out.tabular" compare="diff" ftype="tabular" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

Runs the ``samtools idxstats`` command. It retrieves and prints stats in the index file.

Input is a sorted and indexed BAM file, the output is tabular with
four columns (one row per reference sequence plus a final line for
unmapped reads)::

 Column Description
 ------ -----------------------------
      1 Reference sequence identifier
      2 Reference sequence length
      3 Number of mapped reads
      4 Number of placed but unmapped reads
           (typically unmapped partners of mapped reads)

------

**Example** output from a *de novo* assembly::

 contig_1   170035  98397     0
 contig_2   403835 199564     0
 contig_3   553102 288189     0
 ...           ...    ...   ...
 contig_603    653     50     0
 contig_604    214      6     0
 \*              0      0 50320

In this example there were 604 contigs, each with one line in the output table,
plus the final row (labelled with an asterisk) representing 50320 unmapped reads.
In this BAM file, the final column was otherwise zero.


The results of samtools ixdstats can be visualized with MultiQC.

------

Peter J.A. Cock (2013), `Galaxy wrapper <https://github.com/peterjc/pico_galaxy/tree/master/tools/samtools_idxstats>`_ for the samtools idxstats command
    ]]></help>
    <expand macro="citations"/>
</tool>