[Biojava-l] Iterating over alignment columns

Nathan S. Haigh n.haigh at sheffield.ac.uk
Tue Aug 8 05:50:47 UTC 2006


Apologies if this has come through more than once, I appear to be having
some problems getting posts through. Anyway, I'm returning to a project
i started having a look at a few months ago

and i still can't figure out how to do the following since i'm new to
Java and Biojava. It seems to me that this should be easy to do since it
is essentially why alignments are generated in the first instance - to
infer homology of residues (symbols) at the same position (column) in
the alignment.

I want to be able to iterate over all positions in an alignment and then
do something with the symbols at a given position, in my case calculate
the proportion of each symbol at that position.

I understand that i could loop over the length of the alignment, use an
index to represent the position of the column in the alignment and
generate a subalignment of length 1 for all labels. However, is this
efficient and how would i access the symbols so i can calculate the
proportions for each symbol at the position. I would really appreciate
some hand holding on this, as i'm strugling to climb the steep learning
curve of OOP, Java and Biojava :o(

Thanks
Nathan



More information about the Biojava-l mailing list