Extract quality scores from aligned BAM files
1
1
Entering edit mode
4.6 years ago
elb ▴ 260

Hi guys, maybe someone already asked the same but I looked around without success. I have a list of bam files resulting from bwa-mem. I would like to extract the list of scores (quality) of each bam in order to look at the quality of each sample (in order to do some statistics). I also would like to know the min and max of the scores for each bam. I tried to use samtools pileup but it generates a file with a lot of information I do not want and also I don't know how to extract the list of scores. Can anyone help me please?

Thank you in advance

ChIP-Seq • 3.2k views
ADD COMMENT
0
Entering edit mode

You are talking about mapping quality?

ADD REPLY
0
Entering edit mode

Yes MAPQ number. Eg: 60

ADD REPLY
1
Entering edit mode

Those should be in column 5. A combination of samtools view with cutting that column out should give you that info. Find the min and max after sorting the file. Should all be possible with (awk, cut, sort, uniq).

ADD REPLY
1
Entering edit mode
4.6 years ago
ATpoint 85k

From all the quality assessments you can make in ChIP-seq MAPQ is probably the one that is least meaningful. You should take all reads that are above a reasonable threshold like 20 and then call peaks, check fractions of reads per peaks and produce bigwigs to check data on a browser track. This is way more meaningful than any NGS statistics that are related to mapping quality.

ADD COMMENT

Login before adding your answer.

Traffic: 2634 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6