Hi Petr,

Thanks very much for your email!

Just to clarify 

1. does pileup ignore reads with the flags UNMAP,SECONDARY,QCFAIL,DUP by 
default or only when --ff, --excl-flags STR|INT is specified?

2. I see the option -A, --count-orphans. If you don't set this then I 
understand anomalous read pairs are skipped in variant calling. If mpileup 
isn't reading the flags about mate status then how does it know which are 
anomalous read pairs?

I use the following mpileup command after sorting the filtered bam file with 
samtools: samtools mpileup -BAd 10000000 
With this command, is it ok to use my custom approach of filtering the bam 
files? The UNMAP,SECONDARY,QCFAIL,DUP should not be altered, the only thing 
that changes is the status of the mate. By specifying -A then presumably I am 
telling mpileup to ignore the status of the mate?

Thanks,

Alison

---

Dr Alison Wright

Postdoctoral Research Associate
University College London
Department of Genetics, Evolution and Environment
The Darwin Building
Gower Street
London WC1E 6BT

​www.ucl.ac.uk/mank-group/

________________________________________
From: Petr Danecek <[email protected]>
Sent: 20 November 2015 08:09
To: Wright, Alison
Cc: [email protected]
Subject: Re: [Samtools-help] Uniquely mapping reads in mpileup

Hi Alison,

mpileup ignores reads with the flags UNMAP,SECONDARY,QCFAIL,DUP. The
status of the mate is not checked by default.

Best wishes,
Petr

On Wed, 2015-11-18 at 10:36 +0000, Wright, Alison wrote:
> I wish to call SNPs using SAMtools mpileup function.
>
> I first map my Illumina paired end reads to the reference using Bowtie
> and then I have custom scripts that filter out non-uniquely mapping
> reads. To do this I rely on the absence of XS to indicate a uniquely
> mapped read.
>
>
>
> However, this creates a potential problem as the SAM flags are often
> no longer meaningful.
>
> Eg. Originally I have two reads that are paired and both map
>
> Forward read flag 83
>
> Reverse read flag 163
>
> If Forward read is not uniquely mapping then I remove this from the
> sam file, leaving Reverse read intact. The flag of Reverse read is not
> changed and therefore now falsely indicates it has a mapped pair. This
> isn’t a problem if my downstream programs do not use the flag.
>
>
>
> Therefore, I wanted to check, does the mpileup function read/use the
> flags in the sam file?
>
>
>
> If so, is there another way to only use uniquely mapping reads to call
> SNPs.
>
>
>
> Thanks very much
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Samtools-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/samtools-help




--
 The Wellcome Trust Sanger Institute is operated by Genome Research
 Limited, a charity registered in England with number 1021457 and a
 company registered in England with number 2742969, whose registered
 office is 215 Euston Road, London, NW1 2BE.
------------------------------------------------------------------------------
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to