Giter VIP home page Giter VIP logo

Comments (4)

huihuigogo avatar huihuigogo commented on August 17, 2024 1

After samtools view -F 4 ERR067664.sam | awk '$3=="NC_000962.3"' | wc -l is executed, the result is 2206287, which is consistent with the number of TB reads in the tsv file !
Thank you very much for your patient answer!

from clockwork.

martinghunt avatar martinghunt commented on August 17, 2024

Not sure right now why the difference of 1065. Clockwork just counts the number of reads matched to H37Rv, and that's what it reports in TB.

Your second question: this will be because of read pairs. If a read matches H37Rv, then the both reads of the pair are kept regardless of what the read's mate did (it could be unmapped or mapped to a contamination sequence). Either both reads of a pair are kept, or they are both removed. The surviving read pairs are what is written to the output fastq files - the total number of which will be the count in Reads_kept_after_remove_contam.

from clockwork.

huihuigogo avatar huihuigogo commented on August 17, 2024

Is my method of using samtools view -F 4 ERR067664.sam | grep NC_000962.3 | wc -l to obtain the number of reads matched to H37Rv consistent with your method? Is there something wrong with my statistical method?

Regarding the second question, I understand, thank you for your answer!

from clockwork.

martinghunt avatar martinghunt commented on August 17, 2024

grep NC_000962.3 will be looking for NC_000962.3 anywhere in the line, not just in column 3. This means it counts a read that is mapped to anything, if its mate is mapped to NC_000962.3.

Try awk '$3=="NC_000962.3"' instead of grep NC_000962.3

from clockwork.

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.