Hi,
I use pairwise align to get the following:
> alignment <-pairwiseAlignment(pattern = canonical.protein, subject=protein.extracted)
> alignment
Global PairwiseAlignedFixedSubject (1 of 1)
pattern: [448] DDWEIPDGQITVGQRIGSGSFGTVYKGKWHGDVAVKMLNVTAPTPQQLQAFKNEVGV...FMVGRGYLSPDLSKVRSNCPKAMKRLMAE CLKKKRDERPLFPQILASIELLARSLPK
subject: [1] DDWEIPDGQITVGQRIGSGSFGTVYKGKWHGDVAVKMLNVTAPTPQQLQAFKNEVGV...FMVGRGYLSPDLSKVRSNCPKAMKRLMAECLKKKRDERPLFPQILASIELLARSLPK
score: -912.3752
I can then use as.character(pattern(alignment)) and as.character(subject(alignment)) to get the full string sequence. However, how do I ge tthe number 448 and 1 out of the object as an integer?? Thanks!
crosspost: http://stackoverflow.com/questions/10872710/pull-alignment-character-position