IndexOutOfBounds Exception when performing Pairwise Alignment

Hannes Brandstätter-Müller <[email protected]>
Newsgroups gmane.comp.java.bio.general
Message-ID <CAPXi2mkOhyrZkta3pq2LgyphuyZaCtKdaP-n4gNLGBL0yEeu5A@mail.gmail.com>
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
_______________________________________________
Biojava-l mailing list  -  [email protected]
http://lists.open-bio.org/mailman/listinfo/biojava-l
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.