New versions of mpileup accept the -t DPR option, which will print the depth for each observed allele (and each sample).
petr On Tue, 2014-09-09 at 13:16 +0000, Tagliamonte,Massimiliano S wrote: > Thank you, Tom. > > I tried both your suggestions, but the result is the same. I'll try to > move all the input files to the same directory, to see if it makes the > difference for some reason. In the mean while, do you think I am using > the right approach to achieve my purpose - i.e. getting the coverage of > each individual allele-? > > Thanks, > Max > > ________________________________________ > From: Thomas W. Blackwell [tbla...@umich.edu] > Sent: Tuesday, September 09, 2014 9:06 AM > To: Tagliamonte,Massimiliano S > Cc: samtools-help@lists.sourceforge.net > Subject: Re: [Samtools-help] Intrasamle diversity and allele support > > Max - > > At a guess, the difficulty is from putting the output file last > on the command line. Traditionally, the region specifier has to > be the last field on the command line (and you can add as many > different region specifiers, space separated, as the command line > buffer will allow. Please try putting '-o alignment.test' > immediately after '-h' for example, or else immediately after > '-t reference.fasta.fai'. > > - tom blackwell - > > On Tue, 9 Sep 2014, Tagliamonte,Massimiliano S wrote: > > > Dear Samtools users, > > > > I am currently working with Samtools 0.1.19 and trying to carry out a SNP > > analysis on a haploid genome. As I am expecting some intrasample diversity, > > I would like to know the reads support for alleles within sample. I have > > obtained so far a multisample VCF file, and I would like to know the > > support for each allele at heterozygous SNP positions in each sample. I am > > a bit puzzled how to do this. > > > > As first step, I have tried to use Samtools view, in order to visualize the > > alignment in a single position. My command line is: > > samtools view -h -t reference.fasta.fai ../sample_1.bam chr1:40,000-40,020 > > -o alignment.test > > > > But I get the error: > > random alignment retrieval only works for indexed BAM files. > > The file sample_1.bam is indexed though, and the relative .bai file is in > > the same directory. > > > > Is there any way I can achieve my purpose by using Samtools? Please let me > > know if I need to add more information. > > > > Thanks for you help, > > Max > > > > > > > > > > > > Massimiliano S. Tagliamonte > > Graduate Student > > University of Florida > > College of Veterinary Medicine > > Department of Infectious Diseases and Pathology > > Mob. no. 352 328 9072 > > > > ------------------------------------------------------------------------------ > Want excitement? > Manually upgrade your production database. > When you want reliability, choose Perforce. > Perforce version control. Predictably reliable. > http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk > _______________________________________________ > Samtools-help mailing list > Samtools-help@lists.sourceforge.net > 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. ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Samtools-help mailing list Samtools-help@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/samtools-help