From: Heng Li <lh...@sa...> - 2009-07-28 09:13:02
|
I am afraid that parsing the CIGAR is the only solution. In Perl, you can do something like this: @t = split("\t"); $_ = $t[5]; $end = $t[3]-1; s/(\d+)[SMI]/$end+=$1/eg; print $end, "\n"; Heng On Mon, Jul 27, 2009 at 03:19:47PM +0100, Adam Reid wrote: > Hi there, > > Does anyone know of a simpler way to identify the rightmost position > of the alignment between > the query and the reference than parsing the cigar string in a SAM/BAM > file? > > Adam Reid > > > -- > 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. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Samtools-help mailing list > Sam...@li... > 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. |