[Biojava-l] aligning sequences with ambiguous bases
Mark Chapman
chapman at cs.wisc.edu
Tue Mar 29 08:06:48 UTC 2011
Hi Wim,
The use of ambiguous nucleotides requires you to use the AmbiguityDNACompoundSet
when you create your DNASequence, which means any:
new DNASequence(<yourString>)
changes to:
new DNASequence(<yourString>, AmbiguityDNACompoundSet.getDNACompoundSet())
I hope that helps,
Mark
On 3/28/2011 9:46 AM, Wim De Smet wrote:
> Hi
>
> (sorry if you get 2 copies, I sent this to -request by mistake)
>
> Apologies if this has come up before, a quick search didn't turn anything up.
>
> I'm attempting to do a pairwise alignment between two DNA sequences using
> biojava 3. When I try to construct a DNASequence from a string that contains an
> ambiguous base though (in this case 'y'), I get the following stacktrace.
>
> Exception in thread "main" org.biojava3.core.exceptions.CompoundNotFoundError:
> Compound not found for: Cannot find compound for: y
> at
> org.biojava3.core.sequence.storage.ArrayListSequenceReader.setContents(ArrayListSequenceReader.java:196)
>
> at
> org.biojava3.core.sequence.template.AbstractSequence.<init>(AbstractSequence.java:88)
>
> at org.biojava3.core.sequence.DNASequence.<init>(DNASequence.java:64)
>
> Should I attempt to mask them somehow? What's the best way to deal with these?
>
> cheers
> Wim
More information about the Biojava-l
mailing list