Bcftools Mpileup Removes Marked Duplicates?
1
1
Entering edit mode
12.7 years ago
Angel ▴ 220

Hey,

My question is does samtools mpileup automatically removed duplicates from test.marked.bam output from Picard/MarkDuplicates? Because I am not following any other step to remove duplicates.

I used Picard Tools to create: test.marked.bam

Then I use "samtools mpileup -uf test.marked.bam | bcftools view -bvcg -> test.marked.bcf "

and

"bcftools view test.marked.bcf | vcfutils.pl varfilter -D1000 >test.marked.vcf"

Thanks very much

exome picard duplicates bcftools mpileup • 6.1k views
ADD COMMENT
3
Entering edit mode

Mpileup skips reads marked as duplicates.

ADD REPLY
0
Entering edit mode

Cool, thanks very much.

ADD REPLY
0
Entering edit mode
12.7 years ago
Swbarnes2 ★ 1.6k

I don't think that it would. Use "samtools view -bF 1024 marked.bam > my_filtered.bam" to be sure.

ADD COMMENT
2
Entering edit mode

1024 is the flag for "PCR or optical duplicates". That should be how Picard marked them, so getting rid of reads with that flag should get rid of the duplicates.

Picard has a setting in MarkDuplicates where instead of marking duplicates, it gets rid of them. You could always rerun Picard that way.

ADD REPLY
0
Entering edit mode

Hi swbarnes2,

So I am running the command you mentioned. I looked up -F means skipping the alignments with 1024 buts present in integer.

So then the abvious question is what should I expect out of this command and if I am not removing duplicates by marking them, how should I remove the duplicates before calling variants? Thanks again.

ADD REPLY
0
Entering edit mode

Yes I agree. And will compare the two bam files. I just discovered the removal option recently.

ADD REPLY

Login before adding your answer.

Traffic: 2133 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6