count reads (.sam) mapped to scaffolds with non-standard headers
1
0
Entering edit mode
3.9 years ago
rakshy • 0

Hi!

I have .sam files generated by bbmap. I was mapping paired reads to a set of scaffolds that have non-standard names (I have these names, they are a bundle of assembly generated names and spike-in names). Now I need to extract the number of reads that were mapped to each of the scaffolds. BBmap gives me only coverage information per scaffold. But I also want to try working with a number of reads mapped to each scaffold. How can I extract this information?

sam samtools counts bbmap • 1.1k views
ADD COMMENT
0
Entering edit mode

Remember to use

covstats=<file>         Per-scaffold coverage info.

to get that information when you are mapping with BBMap next.

ADD REPLY
0
Entering edit mode

I actually have these files (covstats) but they contain scaffold coverage information, not the number of reads per scaffold. Or am I mistaking something? (I need both, I'm testing different normalization strategies and need coverage info, the total number of reads mapped per sample, and number of reads mapped per scaffold)

ADD REPLY
1
Entering edit mode
3.9 years ago
ATpoint 82k
samtools sort -o out.bam in.bam
samtools index out.bam
samtools idxstats out.bam
ADD COMMENT
0
Entering edit mode

cool! that worked! thank you very much!

ADD REPLY

Login before adding your answer.

Traffic: 1720 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