Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sambamba -F "not duplicate" processed bam still have duplicated marked by sambamba markdup #477

Closed
piyushjo15 opened this issue May 8, 2021 · 2 comments

Comments

@piyushjo15
Copy link

Hi,
I was following a ChIP-seq tutorial where they have mentioned to use sambamba to remove multimapped, unmapped and duplicate reads from bam file using below code
sambamba view -h -f bam -F "[XS] == null and not unmapped and not duplicate" in.bam > out.bam

The out.bam I checked for duplicates using sambamba markdup
sambamba markdup out.bam out2.bam
Surprisingly I see that out2.bam bas marked duplicates, but weren't those reads filtered out in the first step?
Am I misunderstanding something?
Thanks,
Piyush

@piyushjo15 piyushjo15 reopened this May 18, 2021
@piyushjo15
Copy link
Author

Hi,

I had posted this issue over here earlier but then I thought since it is a support issue rather than bug, I posted it on google groups.
I also found that F flag to remove duplicate via "not duplicate" works after I have marked duplicates. Initially I thought the flag will mark and then remove duplicate but that's not the case.

Thanks
Piyush

@pjotrp pjotrp closed this as completed May 22, 2021
@luoxun-xl
Copy link

Hi,

I had posted this issue over here earlier but then I thought since it is a support issue rather than bug, I posted it on google groups. I also found that F flag to remove duplicate via "not duplicate" works after I have marked duplicates. Initially I thought the flag will mark and then remove duplicate but that's not the case.

Thanks Piyush

Hi, before I also used sambamba view -h -f bam -F "[XS] == null and not unmapped and not duplicate" in.bam > out.bam for ChIP-seq filtering, so now how do you filter bam file in ChIP-seq?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants