import jalview.analysis.AlignSeq;
import jalview.api.DBRefEntryI;
+import jalview.util.Comparison;
import jalview.util.DBRefUtils;
import jalview.util.MapList;
import jalview.util.StringUtils;
{
if (seq == this)
{
- throw new Error(
+ throw new IllegalArgumentException(
"Implementation Error: self reference passed to SequenceI.setDatasetSequence");
}
if (seq != null && seq.getDatasetSequence() != null)
{
- throw new Error(
+ throw new IllegalArgumentException(
"Implementation error: cascading dataset sequences are not allowed.");
}
datasetSequence = seq;
private long _seqhash = 0;
+ /**
+ * Answers false if the sequence is more than 85% nucleotide (ACGTU), else
+ * true
+ */
@Override
public boolean isProtein()
{
if (_seqhash != sequence.hashCode())
{
_seqhash = sequence.hashCode();
- _isNa=jalview.util.Comparison.isNucleotide(new SequenceI[] { this });
+ _isNa = Comparison.isNucleotide(this);
}
return !_isNa;
};