view mapping_quality_stats.xml @ 2:ce2d8f611a51 draft default tip

planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/mapping_quality_stats commit 2661225fdd0f533d4dc8e2561ea559fcc00b9128
author artbio
date Sat, 10 Feb 2024 01:32:48 +0000
parents 7883d97fa479
children
line wrap: on
line source

<tool id="mapqstatistics" name="Mapping Quality Stats" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <description></description>
    <macros>
        <token name="@TOOL_VERSION@">0.22.0</token>
        <token name="@VERSION_SUFFIX@">0</token>
        <token name="@PROFILE@">23.0</token>
    </macros>
    <requirements>
        <requirement type="package" version="1.7.4">r-optparse</requirement>
        <requirement type="package" version="3.4.4">r-ggplot2</requirement>
        <requirement type="package" version="@TOOL_VERSION@">pysam</requirement>
    </requirements>
  <stdio>
      <exit_code range="1:" level="fatal" description="Tool exception" />
  </stdio>
  <command detect_errors="exit_code"><![CDATA[
    ln -f -s $input.metadata.bam_index input.bam.bai &&
    ln -s $input input.bam &&
    python $__tool_directory__/mapping_quality_stats.py
        -bam input.bam
        -o $table &&
    Rscript $__tool_directory__/mapping_quality_stats.r
        -i '$table'
        -o $plot
  ]]></command>
<inputs>
    <param name="input" type="data" format="bam" label="Select a bam file to analyze"/>
</inputs>

 <outputs>
   <data format="tabular" name="table" label="Distribution table" />
   <data format="pdf" name="plot" label="Distribution of MAPQs" />
</outputs>

    <tests>
        <test>
            <param name="input" value="sample.bam" ftype="bam"/>
            <output file="distribution.tab" name="table" />
            <output file="distribution.pdf" name="plot" />
        </test>
    </tests>


<help>

**What it does**

Collects the values of mapping quality (MAPQ) in a BAM files
Shows the data as a table and a barplot

**Inputs**

A bam alignment files which must be sorted

**Output**

A data frame of MAPQ counts

A pdf barplot generated by R and ggplot2

</help>

<citations>
    <citation type="doi">10.1093/bioinformatics/btp352</citation>
</citations>
</tool>