There is a function inside GenomicRanges that maps from global positions to
read positions, considering the cigar. I have not exported it yet, because
I want the output (the mapping) to have a formal class, like RangesMapping.
Haven't had time to do that yet. Anyone want to pick it up for me? Also, I
think we should use a generic for this, perhaps map() that does this when
given a GRanges (of variants) and a GappedAlignments (reads).

Anyway, it is here:
GenomicRanges:::globalToQuery.

YMMV.

Michael

On Thu, Nov 3, 2011 at 10:54 AM, Alpesh Querer <alpeshq@gmail.com> wrote:

> Hi All,
>
> I want to know if there is a way to extract variant nucleotide(s) from
> reads
> that align to particular locations. This should also take care of the
> soft/hard clips, split alignments etc.
> I have a filtered BAM file with reads which cover my loci of interest.  For
> example an an insertion GAA
> exists in the reference at ch1:1234-1236. I want to tabulate all variant
> alleles at ch1:1234-1236.
>
> Thanks,
> Alpesh
>
>        [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>

	[[alternative HTML version deleted]]

