1
0
Entering edit mode
16 months 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 • 511 views
0
Entering edit mode

Remember to use

covstats=<file>         Per-scaffold coverage info.


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

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)

1
Entering edit mode
16 months ago
ATpoint 55k
samtools sort -o out.bam in.bam
samtools index out.bam
samtools idxstats out.bam

0
Entering edit mode

cool! that worked! thank you very much!