public static final class SequenceSelection.SelectionInterval extends Object implements XMLSerializable.OldVersionCompatible
| Constructor and Description |
|---|
SequenceSelection.SelectionInterval(org.jdom.Element element) |
SequenceSelection.SelectionInterval(Interval residueInterval,
Interval sequenceInterval,
SequenceType sequenceType,
SequenceSelection.SequenceDocumentType sequenceDocumentType)
Constructs a rectangular selection (i.e.
|
SequenceSelection.SelectionInterval(Interval residueInterval,
SequenceDocument sequence)
Deprecated.
use
#SelectionInterval(SequenceIndex, com.biomatters.geneious.publicapi.utilities.Interval) instead |
SequenceSelection.SelectionInterval(int fromResidue,
int toResidue,
SequenceDocument sequence)
Deprecated.
use
#SelectionInterval(SequenceIndex, int, int) instead |
SequenceSelection.SelectionInterval(SequenceSelection.SequenceIndex sequenceIndex,
Interval residueInterval) |
SequenceSelection.SelectionInterval(SequenceSelection.SequenceIndex sequenceIndex,
int fromResidue,
int toResidue) |
@Deprecated public SequenceSelection.SelectionInterval(int fromResidue, int toResidue, SequenceDocument sequence)
#SelectionInterval(SequenceIndex, int, int) insteadfromResidue - 0-offset residue index where the interval starts, inclusivetoResidue - residue 0-offset index where the interval finishes, exclusive - may be less than fromResidue for reverse directionsequence - the sequence in which the residues are selected, must not be nullpublic SequenceSelection.SelectionInterval(SequenceSelection.SequenceIndex sequenceIndex, int fromResidue, int toResidue)
sequenceIndex - the index of the sequence in which the residues are selected.fromResidue - 0-offset residue index where the interval starts, inclusivetoResidue - residue 0-offset index where the interval finishes, exclusive - may be less than fromResidue for reverse direction. May be Integer.MAX_VALUE to represent selecting the entire sequence.
If Interval.getMaxExclusive() is greater than the sequence length, if a single sequence is selected which is circular then the selected is treated as wrapped back to the start of the sequence.
in other cases the selection is truncated to the sequence length.public SequenceSelection.SelectionInterval(Interval residueInterval, Interval sequenceInterval, SequenceType sequenceType, SequenceSelection.SequenceDocumentType sequenceDocumentType)
residueInterval - the range of residues. Interval.getMaxExclusive() may be Integer.MAX_VALUE to represent selecting the entire sequence.
If Interval.getMaxExclusive() is greater than the sequence length, if a single sequence is selected which is circular then the selected is treated as wrapped back to the start of the sequence.
in other cases the selection is truncated to the sequence length.sequenceInterval - the range of sequencessequenceType - the type of sequence (nucleotide or amino acid) selectedsequenceDocumentType - the type of documents (aligned or unaligned) the sequences are selected in.@Deprecated public SequenceSelection.SelectionInterval(Interval residueInterval, SequenceDocument sequence)
#SelectionInterval(SequenceIndex, com.biomatters.geneious.publicapi.utilities.Interval) insteadresidueInterval - the residues selected for the given sequence. Interval.getMaxExclusive() may be Integer.MAX_VALUE to represent selecting the entire sequencesequence - the sequence in which the residues are selected, must not be nullpublic SequenceSelection.SelectionInterval(SequenceSelection.SequenceIndex sequenceIndex, Interval residueInterval)
sequenceIndex - the index of the sequence in which the residues are selected. May be -1 for the consensus sequence (if it exists)residueInterval - the residues selected for the given sequence. Interval.getMaxExclusive() may be Integer.MAX_VALUE to represent selecting the entire sequencepublic SequenceSelection.SelectionInterval(org.jdom.Element element)
throws XMLSerializationException
element - an element returned from a previous call to toXML()XMLSerializationException - if XML does not conform to our unpublished specificationpublic int getFromResidue()
public int getToResidue()
@Deprecated public SequenceDocument getSequence()
getSequenceIndex() and SequenceSelection.SequenceIndex.getSequence(java.util.List) instead.public SequenceSelection.SequenceIndex getSequenceIndex()
SequenceSelection.getIntervals(true).
For SelectionIntervals returned from getIntervals(false) use getSequencesRange() or getSequenceIndices() instead.IllegalStateException - If this is a selection for multiple sequences (created via getIntervals(false))public List<SequenceSelection.SequenceIndex> getSequenceIndices()
public Interval getSequencesRange()
public SequenceType getSequenceType()
public SequenceSelection.SequenceDocumentType getSequenceDocumentType()
public int getMinResidue()
public int getMaxResidue()
public Interval getResidueInterval()
public org.jdom.Element toXML()
#SelectionInterval(org.jdom.Element)public Geneious.MajorVersion getVersionSupport(XMLSerializable.VersionSupportType versionType)
XMLSerializable.OldVersionCompatibleXMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener)
or the most recent version in which the XML returned from XMLSerializable.OldVersionCompatible.toXML(com.biomatters.geneious.publicapi.plugin.Geneious.MajorVersion, jebl.util.ProgressListener) last changed.getVersionSupport in interface XMLSerializable.OldVersionCompatibleversionType - specifies which version property to returnpublic org.jdom.Element toXML(Geneious.MajorVersion version, ProgressListener progressListener)
XMLSerializable.OldVersionCompatibleXMLSerializable.toXML() for a more
detailed description of what it means to serialize to XML.
All classes that implement this method must also implement XMLSerializable.toXML() and should delegate back to
this method using Geneious.getMajorVersion() and ProgressListener.EMPTY as parameters.toXML in interface XMLSerializable.OldVersionCompatibleversion - the major version of Geneious to serialize to XML for. For example "6.0" but not "6.0.0". This must be a version
returned greater or equal to a version returned from
getVersionSupport(VersionSupportType.OldestVersionSerializableTo)
and must never be greater than the current version (Geneious.getMajorVersion())progressListener - for reporting progress and cancelling