MultipleSequenceAlignment implements LightweightProfile<S, C> { @Override public List<C> getCompoundsAt(int alignmentIndex) { List<C> column = new ArrayList<C>(); for (S s : sequences) { column.add(s.getCompoundAt(alignmentIndex)); } return Collections.unmodifiableList(column); }  void addAlignedSequence(S sequence); boolean removeAlignedSequence(S sequence); @Override S getAlignedSequence(int listIndex); @Override List<S> getAlignedSequences(); @Override List<C> getCompoundsAt(int alignmentIndex); @Override CompoundSet<C> getCompoundSet(); @Override int getLength(); @Override int getSize(); @Override String toString(int width); @Override String toString(StringFormat format); @Override String toString();  }
@Test public void testGetCompoundsAt() { AminoAcidCompound aminoAcid = AminoAcidCompoundSet.getAminoAcidCompoundSet().getCompoundForString("N"); List<AminoAcidCompound> colProteins = new ArrayList<AminoAcidCompound>(); for (int i = 0; i < 8; i++) { colProteins.add(aminoAcid); } assertEquals(msaProteins.getCompoundsAt(3), colProteins); NucleotideCompound nucleotide = DNACompoundSet.getDNACompoundSet().getCompoundForString("C"); List<NucleotideCompound> colDNA = new ArrayList<NucleotideCompound>(); for (int i = 0; i < 7; i++) { colDNA.add(nucleotide); } assertEquals(msaDNA.getCompoundsAt(3), colDNA); }