Class SequenceViewerExtension.SequenceAnnotationWrapper
java.lang.Object
com.biomatters.geneious.publicapi.plugin.SequenceViewerExtension.SequenceAnnotationWrapper
- Enclosing class:
SequenceViewerExtension
Wraps a
SequenceAnnotation and provides extra information about the location (sequence, track) of the annotation.
Plugins should not extend this class. Only the sequence viewer should extend it
and it will provide implementations to sequence viewer extensions.
For test cases, plugins may wish to use PropertyRetrieverAndEditor.forSequences
or PropertyRetrieverAndEditor.forAlignment to obtain
a PropertyRetrieverAndEditor, and call PropertyRetrieverAndEditor.getVisibleAnnotations
to obtain SequenceAnnotationWrappers.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionforAnnotation(SequenceAnnotation annotation, int sequenceIndex, int trackIndex, boolean isSelected) Wraps aSequenceAnnotationand provides extra information about the location (sequence, track) of the annotation.abstract SequenceAnnotationIntervalgetInterval(int intervalIndex) abstract List<SequenceAnnotationInterval> abstract intabstract List<SequenceAnnotationQualifier> getQualifierValue(String name) abstract SequenceAnnotationabstract intabstract intabstract StringgetType()abstract boolean
-
Constructor Details
-
SequenceAnnotationWrapper
public SequenceAnnotationWrapper()
-
-
Method Details
-
getSequenceAnnotation
- Returns:
- the annotation wrapped by this wrapper
-
getSequenceIndex
public abstract int getSequenceIndex()- Returns:
- the 0-based index of the sequence this annotation is on. May be -1 for consensus annotations.
-
isSelected
public abstract boolean isSelected()- Returns:
- true if this annotation is selected
-
getTrackIndex
public abstract int getTrackIndex()- Returns:
- the index of the track (if any) this annotation is on. -1 for no track. This index can be used with
SequenceViewerExtension.PropertyRetrieverAndEditor.getTrackName(int, int)
-
getQualifiers
- Returns:
- the annotation qualifiers. Equivalent to
getSequenceAnnotation().getQualifiers()but more efficient
-
getIntervals
- Returns:
- the annotation intervals. Equivalent to
getSequenceAnnotation().getIntervals()but more efficient
-
getNumberOfIntervals
public abstract int getNumberOfIntervals()- Returns:
- the number of annotation intervals. Equivalent to
getSequenceAnnotation().getNumberOfIntervals()but more efficient - Since:
- API 4.810 (Geneious 8.1.0)
-
getInterval
- Returns:
- one of the annotation intervals. Equivalent to
getSequenceAnnotation().getInterval(...)} but more efficient - Since:
- API 4.810 (Geneious 8.1.0)
-
getType
- Returns:
- the annotation type of this annotation. Equivalent to
getSequenceAnnotation().getType()but more efficient
-
getQualifierValue
- Returns:
- the value of one qualifier. Equivalent to
getSequenceAnnotation().getQualifierValue(...)} but more efficient - Since:
- API 4.900 (Geneious 9.0.0)
-
forAnnotation
public static SequenceViewerExtension.SequenceAnnotationWrapper forAnnotation(SequenceAnnotation annotation, int sequenceIndex, int trackIndex, boolean isSelected) Wraps aSequenceAnnotationand provides extra information about the location (sequence, track) of the annotation.- Parameters:
annotation- the annotation to wrap.sequenceIndex- the 0-based index of the sequence this annotation is on. May be -1 for consensus annotations.trackIndex- the 0-based index of the track. May be -1 for no track.isSelected- true if this annotation is selected.- Returns:
- the wrapped
SequenceAnnotation - Since:
- API 4.900 (Geneious 9.0.0)
-