Code Monkey home page Code Monkey logo

Comments (1)

kockan avatar kockan commented on August 17, 2024

There are many ways to do that. If you are confident in your abilities with unix tools such as awk and sed you can try out one-liners such as the ones here: https://www.biostars.org/p/117220/ and here: https://www.biostars.org/p/139875/

Note that the second answer in first link above (the one that uses awk) only clears the SAM flag bit that marks the read as a duplicate and will not remove the duplicate type tag if it was originally written. This should be fine for most downstream tools but if those tags exist and you would like to remove them, try out the answer in the second link but replace the tag with DT for duplicate type.

If, like me, you get a slight feeling of uneasiness every time you edit a SAM/BAM file manually, you could look into the GATK tool UnmarkDuplicates (https://gatk.broadinstitute.org/hc/en-us/articles/21905124739483-UnmarkDuplicates) which clears the duplication status bit of the SAM flag. Once again, if you also have duplicate type tags and want to clear them as well, https://fulcrumgenomics.github.io/fgbio/tools/latest/RemoveSamTags.html might be useful for you.

from picard.

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.