Class SequenceAnnotationQualifier


  • public final class SequenceAnnotationQualifier
    extends java.lang.Object
    A named item of information (i.e. a key-value pair of Strings) on a SequenceAnnotation. In the sequence viewer, this information is shown in the box that pops up when the mouse hovers over the annotation. Instances of this class are immutable and may therefore freely be shared without making defensive copies.
    • Field Detail

      • GENETIC_CODE_NAME

        public static final java.lang.String GENETIC_CODE_NAME
        Name to use for SequenceAnnotationQualifiers that specify a genetic code
        See Also:
        Constant Field Values
      • EXTRACTED_REGION_ORIGINAL_CIRCULAR_SEQUENCE_LENGTH

        public static final java.lang.String EXTRACTED_REGION_ORIGINAL_CIRCULAR_SEQUENCE_LENGTH
        Name to use for a SequenceAnnotationQualifier to specify that the SequenceAnnotation represents an extraction (annotations of type SequenceAnnotation.TYPE_EXTRACTED_REGION from a circular sequence, in which case, this qualifier contains the length of the original circular sequence.
        See Also:
        Constant Field Values
      • TRANSLATED_REGION_INTERVALS_NAME

        @Deprecated
        public static final java.lang.String TRANSLATED_REGION_INTERVALS_NAME
        Deprecated.
        these are no longer created
        Name to use for a SequenceAnnotationQualifier to specify that the SequenceAnnotation represents a translation.
        See Also:
        Constant Field Values
      • RECOGNITION_PATTERN

        public static final java.lang.String RECOGNITION_PATTERN
        Name to use for SequenceAnnotationQualifiers that specify the recognition pattern of a restriction enzyme. The corresponding value must be in rebase format, e.g. "(4/8)" indicates a cut 4 and 8 bases from the recognition sequence start, respectively, in the sense and antisense strand
        See Also:
        Constant Field Values
      • NCBI_TRANSL_TABLE

        public static final java.lang.String NCBI_TRANSL_TABLE
        Qualifier name used by NCBI for the translation table number of a CDS
        See Also:
        Constant Field Values
      • NCBI_TRANSL_EXCEPT

        public static final java.lang.String NCBI_TRANSL_EXCEPT
        Qualifier name used by NCBI for exceptions to standard translation
        Since:
        API 4.1011 (Geneious 10.1.1)
        See Also:
        Constant Field Values
      • NCBI_AUTOMATIC_TRANSLATION

        public static final java.lang.String NCBI_AUTOMATIC_TRANSLATION
        The qualifier name that NCBI uses to provide the translation of a SequenceAnnotation.TYPE_CDS annotation, taking into account qualifiers that Geneious may not. For example NCBI_TRANSL_EXCEPT
        Since:
        API 4.1011 (Geneious 10.1.1)
        See Also:
        Constant Field Values
      • VARIANT_ID

        public static final java.lang.String VARIANT_ID
        Qualifier used to represent the database ID of a variant (for example the value may be a dbSNP ID of the form rs1234). If the value is a recognised format then getDisplayedValue(boolean) may hyperlink to the appropriate database
        Since:
        API 4.600 (Geneious 6.0.0)
        See Also:
        Constant Field Values
      • VARIANT_CHANGE

        public static final java.lang.String VARIANT_CHANGE
        Qualifier used to represent how a SequenceAnnotation.TYPE_POLYMORPHISM has changed from its original value.

        For substitution style variants, this should be of the form "A"+VARIANT_CHANGE_ARROW+"TT" to represent a change from A to TT.
        For insertion style variants, this should be of the form "+AA" to represent an insertion of AA.
        For deletion style variants, this should be of the form "-GC" to represent a deletion of GC.
        For tandem repeat style variants, this may instead be of the form "(GT)5"+VARIANT_CHANGE_ARROW+"(GT)7" to represent an increase from 5 copies of GT to 7 copies of GT.
        Since:
        API 4.615 (Geneious 6.1.5)
        See Also:
        Constant Field Values
      • VARIANT_NO_CHANGE

        public static final java.lang.String VARIANT_NO_CHANGE
        Qualifier value representing a change with no actual change to bases. This is sometimes added to sequences when parsing VCF files.
        Since:
        API 4.202300 (Genious 2023.0.0)
        See Also:
        Constant Field Values
      • VARIANT_CHANGE_ARROW

        public static final java.lang.String VARIANT_CHANGE_ARROW
        Used to represent the separating arrow between the original and variant sequence for a VARIANT_CHANGE qualifier.
        Since:
        API 4.615 (Geneious 6.1.5)
        See Also:
        Constant Field Values
      • VARIANT_REFERENCE_NUCLEOTIDES

        public static final java.lang.String VARIANT_REFERENCE_NUCLEOTIDES
        Qualifier used to represent what the reference sequence was over the interval covered by the annotation
        Since:
        API 4.615 (Geneious 6.1.5)
        See Also:
        Constant Field Values
      • VARIANT_REFERENCE_AMINO_ACIDS

        public static final java.lang.String VARIANT_REFERENCE_AMINO_ACIDS
        Qualifier used to represent what the reference sequence was over the interval covered by the annotation
        Since:
        API 4.900 (Geneious 9.0.0)
        See Also:
        Constant Field Values
      • COLOR

        public static final java.lang.String COLOR
        Qualifier name used to override the color of an individual annotation. The qualifier value should be an html style hex color (e.g. #FF0000 for red or #00FF00 for green)
        Since:
        API 4.60 (Geneious 5.6.0)
        See Also:
        Constant Field Values
      • ALL_LOCATIONS

        public static final java.lang.String ALL_LOCATIONS
        The name of the qualifier used to display all matching locations for repeat annotations. The value should be formatted as a semicolon separated list of positions, where each position may be prefixed by a name and a colon. Each position should be suffixed by a + or - to indicate the strand. For a value that meets these requirements, the sequence viewer will create clickable hyperlinks to jump to the each position.
        Since:
        API 4.900 (Geneious 9.0.0)
        See Also:
        Constant Field Values
      • JUNCTION_SOURCE

        public static final java.lang.String JUNCTION_SOURCE
        The name of the qualifier used to display the source location of a variant junction. The value should be formatted as a numeric 1-based index of a location in the sequence, suffixed by a + or - to indicate the strand. The value may be prefixed by a name and a colon to indicate a sequence other than the current sequence. For a value that meets these requirements, the sequence viewer will create a clickable hyperlink to jump to the position.
        Since:
        API 4.900 (Geneious 9.0.0)
        See Also:
        JUNCTION_DESTINATION, SequenceAnnotation.TYPE_JUNCTION, Constant Field Values
      • JUNCTION_DESTINATION

        public static final java.lang.String JUNCTION_DESTINATION
        The name of the qualifier used to display the destination location of a variant junction. The value should be formatted as a numeric 1-based index of a location in the sequence, suffixed by a + or - to indicate the strand. The value may be prefixed by a name and a colon to indicate a sequence other than the current sequence. For a value that meets these requirements, the sequence viewer will create a clickable hyperlink to jump to the position.
        Since:
        API 4.900 (Geneious 9.0.0)
        See Also:
        JUNCTION_SOURCE, SequenceAnnotation.TYPE_JUNCTION, Constant Field Values
      • HIDDEN_PREFIX

        public static final java.lang.String HIDDEN_PREFIX
        Qualifiers that have a name that begins with this prefix will be hidden from the user interface
        See Also:
        Constant Field Values
      • HIDDEN_QUALIFIER_EXCLUDE_FROM_ANNOTATION_RESULT_COUNTER

        public static final java.lang.String HIDDEN_QUALIFIER_EXCLUDE_FROM_ANNOTATION_RESULT_COUNTER
        Qualifier name used to determine whether the annotation generator should not count this annotation as a generated result from a SequenceAnnotationGenerator in order to report an accurate number of results that are relevant to the operation.

        This qualifier is only applicable to annotations that are NOT part of a SequenceTrack.

        The value of this qualifier must be either "true" or "false" case-insensitive. If unset, the assumed value is "false".

        Since:
        API 4.202120 (Geneious 2021.2.0)
        See Also:
        Constant Field Values
      • HIDDEN_QUALIFIER_FORCE_FADED

        public static final java.lang.String HIDDEN_QUALIFIER_FORCE_FADED
        The value of this qualifier denotes whether or not this annotation should always be shown as faded when drawn on the sequence viewer. It should be a value of either "True" or "False"
        Since:
        API 4.202100 (Geneious 2021.0.0)
        See Also:
        Constant Field Values
      • HIDDEN_QUALIFIER_FORCE_BOLD

        public static final java.lang.String HIDDEN_QUALIFIER_FORCE_BOLD
        The value of this qualifier denotes whether or not this annotation should always be shown as bold when drawn on the sequence viewer. It should be a value of either "True" or "False"
        Since:
        API 4.202100 (Geneious 2021.0.0)
        See Also:
        Constant Field Values
      • HIDDEN_QUALIFIER_BACKGROUND_COLOR

        public static final java.lang.String HIDDEN_QUALIFIER_BACKGROUND_COLOR
        Qualifier name used to override the background color of an individual annotation. The qualifier value should be an html style hex color (e.g. #FF0000 for red or #00FF00 for green)
        Since:
        API 4.202100 (Geneious 2021.0.0)
        See Also:
        Constant Field Values
      • HIDDEN_QUALIFIER_HIGH_VIEW_PRIORITY

        public static final java.lang.String HIDDEN_QUALIFIER_HIGH_VIEW_PRIORITY
        Qualifier name used to prioritise showing an annotation even when zoomed out. This doesn't guarantee that the annotation will be shown, but makes it much more likely. It should be a value of either "True" or "False"
        Since:
        API 4.202100 (Geneious 2021.0.0)
        See Also:
        Constant Field Values
      • HIDE_QUALIFIER_IN_SEQUENCE_VIEWER_TOOLTIP

        public static final java.lang.String HIDE_QUALIFIER_IN_SEQUENCE_VIEWER_TOOLTIP
        The value of this qualifier denotes the name of another qualifier which should not appear in the tooltips displayed in the Sequence Viewer. An annotation can have multiple of these qualifiers to hide multiple qualifiers from the sequence viewer tooltip.
        Since:
        API 4.202020 (Geneious 2020.2.0)
        See Also:
        Constant Field Values
      • HIDDEN_QUALIFIER_FOR_ACTIVELY_LINKED_PARENTS

        public static final java.lang.String HIDDEN_QUALIFIER_FOR_ACTIVELY_LINKED_PARENTS
        The name of a qualifier that can be added to annotations on documents which are actively linked to their descendants (see OperationRecordDocument.hasAnyActiveLinks()). When a document containing an annotation with this qualifier is regenerated because its parent has changed, then despite all other data on the document being discarded, if this annotation (or an annotation unambiguously identified as the same annotation) still exists on the new version of the document, then this qualifier will be copied to that new annotation.

        Qualifiers of this type will be hidden from the user interface. They are intended for programatic use only.

        Since:
        API 4.60 (Geneious 5.6.0)
        See Also:
        SequenceAnnotation.HIDDEN_TYPE_FOR_ACTIVELY_LINKED_PARENTS, Constant Field Values
      • STRONG_REFERENCED_DOCUMENT_PREFIX

        public static final java.lang.String STRONG_REFERENCED_DOCUMENT_PREFIX
        If a qualifier value starts with this prefix, and the remainder of the qualifier value is a URN.toString() of a document, then it is assumed to be a strong reference to that document. a strong reference means that if the referenced document is deleted, the document will not really be deleted but be kept in a hidden area of the database and will always be available as long as the referencing document still exists. Similarly, exporting a document (in Geneious format) with a strong refernece will export the referenced document with it.

        To specify the name of the link as displayed to the user, use REFERENCED_DOCUMENT_LABEL_PREFIX

        Since:
        API 4.60 (Geneious 5.6.0)
        See Also:
        WEAK_REFERENCED_DOCUMENT_PREFIX, REFERENCED_DOCUMENT_LABEL_PREFIX, Constant Field Values
      • DIFFERENTIAL_EXPRESSION_METHOD

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_METHOD
        Qualifier name for the differential expression method used
        Since:
        API 4.1010 (Geneious 10.1.0)
        See Also:
        Constant Field Values
      • DIFFERENTIAL_EXPRESSION_P_VALUE

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_P_VALUE
        Qualifier name for differential expression p-value
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • DIFFERENTIAL_EXPRESSION_ADJUSTED_P_VALUE

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_ADJUSTED_P_VALUE
        Qualifier name for differential expression adjust p-value
        Since:
        API 4.1010 (Geneious 10.1.0)
        See Also:
        Constant Field Values
      • DIFFERENTIAL_EXPRESSION_ABSOLUTE_CONFIDENCE_QUALIFIER

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_ABSOLUTE_CONFIDENCE_QUALIFIER
        Qualifier name for differential expression absolute confidence
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • DIFFERENTIAL_EXPRESSION_CONFIDENCE_QUALIFIER

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_CONFIDENCE_QUALIFIER
        Qualifier name for differential expression confidence
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • DIFFERENTIAL_EXPRESSION_RATIO_QUALIFIER

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_RATIO_QUALIFIER
        Qualifier name for differential expression expression ratio
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • DIFFERENTIAL_EXPRESSION_LOG2_RATIO_QUALIFIER

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_LOG2_RATIO_QUALIFIER
        Qualifier name for differential expression log base 2 ratio
        Since:
        API 4.810 (Geneious 8.1.0)
        See Also:
        Constant Field Values
      • DIFFERENTIAL_EXPRESSION_LOG_FOLD_STANDARD_ERROR_QUALIFIER

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_LOG_FOLD_STANDARD_ERROR_QUALIFIER
        Qualifier name for differential expression log fold standard error
        Since:
        API 4.1010 (Geneious 10.1.0)
        See Also:
        Constant Field Values
      • DIFFERENTIAL_EXPRESSION_BASE_MEAN

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_BASE_MEAN
        Qualifier name for differential expression base mean
        Since:
        API 4.1010 (Geneious 10.1.0)
        See Also:
        Constant Field Values
      • DIFFERENTIAL_EXPRESSION_WALD_STAT

        public static final java.lang.String DIFFERENTIAL_EXPRESSION_WALD_STAT
        Qualifier name for differential expression Wald statistic
        Since:
        API 4.1010 (Geneious 10.1.0)
        See Also:
        Constant Field Values
      • EXPRESSION_RPKM

        public static final java.lang.String EXPRESSION_RPKM
        Qualifier name for expression RPKM (reads per kilobase million)
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • EXPRESSION_FPKM

        public static final java.lang.String EXPRESSION_FPKM
        Qualifier name for expression FPKM (fragments per kilobase million)
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • EXPRESSION_TPM

        public static final java.lang.String EXPRESSION_TPM
        Qualifier name for expression TPM (transcripts per million)
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • EXPRESSION_RAW_READ_COUNT

        public static final java.lang.String EXPRESSION_RAW_READ_COUNT
        Qualifier name for expression raw read count
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • EXPRESSION_RAW_FRAGMENT_COUNT

        public static final java.lang.String EXPRESSION_RAW_FRAGMENT_COUNT
        Qualifier name for expression raw fragment count
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • EXPRESSION_RAW_TRANSCRIPT_COUNT

        public static final java.lang.String EXPRESSION_RAW_TRANSCRIPT_COUNT
        Qualifier name for expression raw transcript count
        Since:
        API 4.801 (Geneious 8.0.1)
        See Also:
        Constant Field Values
      • METHYLATION_QUALIFIER

        public static final java.lang.String METHYLATION_QUALIFIER
        Qualifier name for methylation of a restriction enzyme
        Since:
        API 4.201910 (Geneious Prime 2019.1.0)
        See Also:
        Constant Field Values
    • Constructor Detail

      • SequenceAnnotationQualifier

        public SequenceAnnotationQualifier​(java.lang.String name,
                                           java.lang.String value)
        create a new SequenceAnnotationQualifier
        Parameters:
        name - the name of the qualifier; must not be null, but may be ""
        value - the value of the qualifier; must not be null, but may be ""
        Throws:
        java.lang.IllegalArgumentException - if name or value is null
      • SequenceAnnotationQualifier

        public SequenceAnnotationQualifier​(SequenceAnnotationQualifier qualifier)
        creates a copy of the given SequenceAnnotationQualifier. Since this class is immutable, use of this method should almost never be necessary.
        Parameters:
        qualifier - the qualifier to copy
    • Method Detail

      • createFormattedPotentialRestrictionSiteQualifier

        public static java.lang.String createFormattedPotentialRestrictionSiteQualifier​(java.lang.String originalSequence,
                                                                                        java.lang.String modifiedSequence,
                                                                                        int offsetRelativeToAnnotation,
                                                                                        int patternLength,
                                                                                        boolean original)
        Create a formatted potential restriction site value for Modified or Original qualifier
        Parameters:
        originalSequence - original sequence (should be same length as modifiedSequence)
        modifiedSequence - modified sequence (should be same length as originalSequence)
        offsetRelativeToAnnotation - position relative to the annotation (negative) where the first modified base appears
        patternLength - length of the restriction site pattern (length of the annotation)
        original - if true, originalSequence will be formatted; if false, modifiedSequence will be formatted
        Returns:
        the HTML-formatted sequence. If sequences differ in length, this will be a substring of length equal to the shorter of the two
        Since:
        API 4.1100 (Geneious 11.0.0)
        See Also:
        POTENTIAL_RESTRICTION_SITE_MODIFIED, POTENTIAL_RESTRICTION_SITE_ORIGINAL, POTENTIAL_RESTRICTION_SITE_OFFSET
      • toString

        public java.lang.String toString()
        Returns a human readable string with information about this qualifier; the exact format of the string is not guaranteed and should not be relied on, because it may change at any time. The current implementation truncates the value to at most 50 characters and appends ...
        Overrides:
        toString in class java.lang.Object
        Returns:
        A human readable string with information about this qualifier.
      • getName

        public java.lang.String getName()
        Get the name of this qualifier.
        Returns:
        the name of this qualifier. Never null.
      • getValue

        public java.lang.String getValue()
        Get the value of this qualifier.
        Returns:
        the value of this qualifier. Never null.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • isHidden

        public boolean isHidden()
        Returns true if this qualifier is hidden from the user interface. (i.e. its name starts with HIDDEN_PREFIX
        Returns:
        true if this qualifier is hidden from the user interface. (i.e. its name starts with HIDDEN_PREFIX
        Since:
        API 4.50 (Geneious 5.5.0)
      • getDisplayedValue

        public java.lang.String getDisplayedValue​(boolean allowHtml)
        Returns the value with html tags stripped or angle brackets escaped depending on whether html is allowed.

        Also handles special cases where getValue() starts with STRONG_REFERENCED_DOCUMENT_PREFIX or WEAK_REFERENCED_DOCUMENT_PREFIX. If allowHtml is true and the qualifier is called db_xref then its value may also be hyperlinked to the appropriate database website
        Parameters:
        allowHtml - true to allow the value to be formatted as html.
        Returns:
        the value of this qualifier in a form for displaying to a user
        Since:
        API 4.60 (Geneious 5.6.0)
        See Also:
        isValueHtml()
      • isValueHtml

        public boolean isValueHtml()
        Scans through the string to check if there appears to be valid angle brackets in it (an equal number, in the right order). If the value is over 1,000 characters long, the scan will stop at 1,000 and return true if there have been some valid angle brackets before that cut off.
        Returns:
        true if the value of this qualifier appears to be html
        Since:
        API 4.800 (Geneious 8.0.0)
        See Also:
        getDisplayedValue(boolean)