Comments (4)
I don't believe the SAM flag differentiates between optical and non-optical duplicates. If the read is determined to be a duplicate, no matter the type, that flag will be set. The tagging policy adds additional SAM tags (the tag should be DT
) to reads so you could try performing your filtering based on these tags and see if it works.
from picard.
@kockan could you please elaborate on how to remove only optical duplicates using the tag that you mentioned? Thank you!
from picard.
Hmm, let's say you set TAGGING_POLICY=OpticalOnly
as before. Then, the value of the DT
tag should be SQ
for optical duplicates and due to your selection, the DT
tag shouldn't appear in any other reads, including library duplicates.
With this you might be able to do something like:
samtools view -e '![DT]' input.bam > DT.removed.bam
Best to check the samtools manual page (https://www.htslib.org/doc/samtools-view.html) to make sure you get the command-line right though, I haven't tested this myself.
from picard.
Thanks a lot @kockan!
from picard.
Related Issues (20)
- CollectHsMetrics returns negative percentages on PacBio data HOT 5
- Problem with Picard tool for Collecting RNASeqMetrics HOT 4
- Streaming from requester-pays buckets for CrosscheckFingerprints doesn't work in Terra HOT 2
- 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
- Issue Running Picard MarkDuplicates: File Compression Error with Snappy HOT 1
- about MarkDuplicates HOT 1
- UnMarkDuplicate 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
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.