Coder Social home page Coder Social logo

Comments (4)

shiquan avatar shiquan commented on June 17, 2024

Sorry for the later reply. What aligner did you use? I think this difference comes from the aligner skip some reads in default. samtools view $bam | wc -l will output all the bam records including primary and secondary alignments. But in theory, secondary alignments should not be counted, because the primary alignments are already considered.

from bamdst.

ray1919 avatar ray1919 commented on June 17, 2024

I found "Fraction of Mapped Reads" different from samtools result. It is cause by "Raw Reads (All reads)" stats.

from bamdst.

shiquan avatar shiquan commented on June 17, 2024

@ray1919 Can you try to use samtools flagstat to confirm this. There might be some different due to secondary alignments.

from bamdst.

ray1919 avatar ray1919 commented on June 17, 2024

samtools flagstat

114102 + 0 in total (QC-passed reads + QC-failed reads)
81904 + 0 primary
0 + 0 secondary
32198 + 0 supplementary
0 + 0 duplicates
0 + 0 primary duplicates
110519 + 0 mapped (96.86% : N/A)
78321 + 0 primary mapped (95.63% : N/A)
81904 + 0 paired in sequencing
40318 + 0 read1
41586 + 0 read2
50248 + 0 properly paired (61.35% : N/A)
76756 + 0 with itself and mate mapped
1565 + 0 singletons (1.91% : N/A)
26178 + 0 with mate mapped to a different chr
4050 + 0 with mate mapped to a different chr (mapQ>=5)

bamdst report top 10 line:

## The file was created by bamdst
## Version : 1.0.9
## Files : PC00253-P1-591_dedup.bam 
                               [Total] Raw Reads (All reads)	114102
                                       [Total] QC Fail reads	0
                                        [Total] Raw Data(Mb)	11.95
                                        [Total] Paired Reads	81904
                                        [Total] Mapped Reads	78321
                            [Total] Fraction of Mapped Reads	68.64%
                                     [Total] Mapped Data(Mb)	10.10

bamdst:

$$[Total] Fraction of Mapped Reads = [Total] Mapped Reads / [Total] Raw Reads (All reads)$$

samtools:

primary mapped % = primary mapped / primary

They are somewhat different.

from bamdst.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.