| 
5
 | 
     1 <tool id="samtools_flagstat" name="Flagstat" version="2.0">
 | 
| 
 | 
     2   <description>tabulate descriptive stats for BAM datset</description>
 | 
| 
 | 
     3   <macros>
 | 
| 
 | 
     4     <import>macros.xml</import>
 | 
| 
 | 
     5   </macros>
 | 
| 
 | 
     6   <expand macro="requirements"></expand>
 | 
| 
 | 
     7   <expand macro="stdio"></expand>
 | 
| 
 | 
     8   <expand macro="version_command"></expand>
 | 
| 
 | 
     9   <command>samtools flagstat "$input1" > "$output1"
 | 
| 
 | 
    10   </command>
 | 
| 
 | 
    11   <inputs>
 | 
| 
 | 
    12     <param name="input1" type="data" format="bam" label="BAM File to Convert" />
 | 
| 
 | 
    13   </inputs>
 | 
| 
 | 
    14   <outputs>
 | 
| 
 | 
    15     <data name="output1" format="txt" />
 | 
| 
 | 
    16   </outputs>
 | 
| 
 | 
    17   <tests>
 | 
| 
 | 
    18     <test>
 | 
| 
 | 
    19       <param name="input1" value="samtools_flagstat_input1.bam" ftype="bam" />
 | 
| 
 | 
    20       <output name="output1" file="samtools_flagstat_out1.txt" />
 | 
| 
 | 
    21     </test>
 | 
| 
 | 
    22   </tests>
 | 
| 
 | 
    23   <help>
 | 
| 
 | 
    24 
 | 
| 
 | 
    25 **What it does**
 | 
| 
 | 
    26 
 | 
| 
 | 
    27 Uses ``samtools flagstat`` command to print descriptive information for a BAM dataset. Here is an example of such information::
 | 
| 
 | 
    28 
 | 
| 
 | 
    29   200 + 0 in total (QC-passed reads + QC-failed reads)  
 | 
| 
 | 
    30   0 + 0 secondary
 | 
| 
 | 
    31   0 + 0 supplementary
 | 
| 
 | 
    32   0 + 0 duplicates
 | 
| 
 | 
    33   25 + 0 mapped (12.50%:nan%)
 | 
| 
 | 
    34   200 + 0 paired in sequencing
 | 
| 
 | 
    35   100 + 0 read1
 | 
| 
 | 
    36   100 + 0 read2
 | 
| 
 | 
    37   0 + 0 properly paired (0.00%:nan%)
 | 
| 
 | 
    38   0 + 0 with itself and mate mapped
 | 
| 
 | 
    39   25 + 0 singletons (12.50%:nan%)
 | 
| 
 | 
    40   0 + 0 with mate mapped to a different chr
 | 
| 
 | 
    41   0 + 0 with mate mapped to a different chr (mapQ>=5)
 | 
| 
 | 
    42   
 | 
| 
 | 
    43   </help>
 | 
| 
 | 
    44   <expand macro="citations"></expand>
 | 
| 
 | 
    45 </tool>
 |