This page is outdated, please also see the man page.
How to run bamstat?
The bamstat mode of QTLtools requires two files as input:
- A BAM file containing the sequence data of a molecular assay.
- A BED file containing the reference annotation for this molecular assay
To illustrate how it works, we provide the 2 following example files:
- A RNA-seq BAM file on chr22 for sample HG00381: BAM / index
- An annotation BED file on chr22 derived from GENCODEv19: link
Then, you can run bamstat on these two files running the command:
QTLtools bamstat --bam HG00381.chr22.bam --bed gencode.v19.exon.chr22.bed.gz --filter-mapping-quality 150 --out HG00381.chr22.bamstat.txt
Note that we use the option --filter-mapping-quality 150 since it is the recommended value to remove bad quality reads in a BAM generated with the GEM mapper.
This command produces an output file HG00381.chr22.bamstat.txt as follows:
610860 489276 469678 26771 20179
The 5 columns give:
- A. The total number of sequencing reads in the BAM file (=610,860)
- B. The number of mapped sequencing reads passing the --filter-mapping-quality filter (=489,276)
- C. The number of mapped sequencing reads falling within the annotations specified with --bed (=469,678)
- D. The total number of annotations in the --bed file (=26,771)
- E. The number of annotations covered by at least one sequencing read (=20,179)
From this file, you can then compute the ratios B/A=80%, C/A=77% or E/D=75% to assess the quality of your sequence data.
Monday 11th July 2016