[BioC] pairwiseAlignment and issue mapping

Patrick Aboyoun paboyoun at fhcrc.org
Mon Aug 17 18:12:08 CEST 2009


Jim,
Table 3 (Functions for AlignedXString and QualityAlignedXString objects) 
in Biostrings' Pairwise Alignment vignette

http://bioconductor.org/packages/2.5/bioc/vignettes/Biostrings/inst/doc/Alignments.pdf

lists some helper functions that may be of use to you. A 
PairwiseAlignedFixedSubject object has two slots, one for the pattern 
and one for the subject, to house AlignedXStringSet objects These 
objects should contain the information you are looking for. In 
particular, I think

myalign <- pairwiseAlignment(...)
start(subject(myalign))

should do the trick.


Patrick


James Bullard wrote:
> Hi All,
>
> this should be an easy question and answer, it is mostly about the 
> best way to do this with the Bioconductor S4 classes. I have a 
> pairwise alignment: A and I want a function which maps from a position 
> in the original sequence (either subject: s, or pattern: p) to the 
> position in the aignment. Essentially, I want a function that looks like:
>
> subject  alignment
> 1        1
> 2        2
> 3        4
> 4        5
>
> alignmentPosition(i, which = c("subject", "pattern")), i in 
> 1:length(s) => j in 1:length(alignment)
>
> If I had just characters, it would be easy, but since I have objects 
> of type: PairwiseAlignedFixedSubject, I am slightly overwhelmed by the 
> class hierarchy, and the best way to do this.
>
> thanks, jim
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: 
> http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list