[Biojava-l] IndexOutOfBounds Exception when performing Pairwise Alignment
Hannes Brandstätter-Müller
biojava at hannes.oib.com
Thu Dec 1 12:59:10 UTC 2011
What am I doing wrong? I get:
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index:
0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at org.biojava3.alignment.SimpleAlignedSequence.setLocation(SimpleAlignedSequence.java:362)
at org.biojava3.alignment.SimpleAlignedSequence.<init>(SimpleAlignedSequence.java:88)
at org.biojava3.alignment.SimpleProfile.<init>(SimpleProfile.java:118)
at org.biojava3.alignment.SimpleSequencePair.<init>(SimpleSequencePair.java:86)
at org.biojava3.alignment.SmithWaterman.setProfile(SmithWaterman.java:71)
at org.biojava3.alignment.template.AbstractMatrixAligner.align(AbstractMatrixAligner.java:342)
at org.biojava3.alignment.template.AbstractPairwiseSequenceAligner.getPair(AbstractPairwiseSequenceAligner.java:112)
at org.biojava3.alignment.Alignments.getPairwiseAlignment(Alignments.java:208)
when calling Alignments.getPairwiseAlignment(dnaSequence, target,
PairwiseSequenceAlignerType.LOCAL, new SimpleGapPenalty(), matrix);
where matrix = new SimpleSubstitutionMatrix<NucleotideCompound>();,
sequence and target are both DNASequence
Possible causes I can think of: target might contain IUB-Codes (not
just ACGTU, but also RYKM...)
Hannes
More information about the Biojava-l
mailing list