Comments (1)
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)
- StringIndexOutOfBoundsException at LiftoverVcf HOT 3
- Error: A JNI error has occurred, please check your installation and try again HOT 1
- MarkDuplicates: Instead of adding the read group of a read to the key, picard always adds "RG"
- java.lang.NegativeArraySizeException HOT 2
- genotypeConcordance irregular behavior in counting after applying filters HOT 3
- MarkDuplicates with single end data does not write the full report HOT 3
- Picard Build Failure HOT 6
- java environment not detected when using option OUTPUT in BuilBamIndex HOT 1
- Getting Segfault when running ReorderSam via GATK HOT 1
- How to control the number of threads HOT 1
- Edge case in LiftoverVcf causes cryptic string exception HOT 8
- TAGGING_POLICY=OpticalOnly tags everything HOT 4
- Issue Running Picard MarkDuplicates: File Compression Error with Snappy HOT 1
- about MarkDuplicates HOT 1
- Running picard in parallel issue HOT 3
- `--USE_END_IN_UNPAIRED_READS` and `--USE_UNPAIRED_CLIPPED_END` options for `picard MarkDuplicates` have no effect HOT 9
- MarkDuplicates SAM validation error HOT 6
- Optical duplicates HOT 4
- ValidateSamFile wrong NM tag computation HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from picard.