How to retrieve indices from bioalignments?

I am wondering how I can get sequence indices from a BioAlignments.jl alignment. The pairalign function returns an object from which I can get the sequences of the aligned region and the score. And while the function prints out the starting indices of the aligned region, I don’t know how to access those values.

using BioAlignments
using BioSequences
scoremodel = AffineGapScoreModel(EDNAFULL, gap_open=-5, gap_extend=-1);
my_alignment = pairalign(LocalAlignment(),dna"ATATTAGGTATTGATTATTGTACGCGGCCCGGC" , dna"TTGATTATTGT", scoremodel)
alignment(my_alignment)
1 Like

Got an answer via stack overflow thanks to Przemyslaw Szufel

https://stackoverflow.com/questions/63991548/how-do-i-retrieve-the-sequence-indices-of-an-aligned-region-from-a-bioalignments

3 Likes