Class SequenceViewerExtension.StatisticsSection

  • Enclosing class:
    SequenceViewerExtension

    public static class SequenceViewerExtension.StatisticsSection
    extends java.lang.Object
    One or more lines of statistics that show up in the statistics section of the sequence viewer.
    Since:
    API 4.700 (Geneious 7.0.0)
    • Constructor Detail

      • StatisticsSection

        public StatisticsSection​(java.lang.String name,
                                 java.lang.Number numericValue,
                                 java.lang.String nicelyFormattedNameAndValue,
                                 double verticalPosition,
                                 java.util.List<DocumentFieldAndValue> documentFieldsAndValues)
        Creates a new statistics section
        Parameters:
        name - the name of this statistic used for programmatic purposes only to distinguish it from other sections returned by this same plugin. May be an empty String if this plugin returns only a single section.
        numericValue - a numeric value for this statistic for use with other plugins that may wish to obtain the value. May be null for statistics that have no numeric value.
        nicelyFormattedNameAndValue - the text displayed in the sequence viewer statistics.
        verticalPosition - a vertical position for this text between 0 and 1. For example POSITION_SEQUENCE_LENGTH+RELATIVE_POSITION_BELOW could be used to position it below the sequence length section. Use 1.0 to position it below all other statistics. Generally you should add RELATIVE_POSITION_DIRECTLY_BELOW to some existing section position if it is closely associated with it. If you just want to position it below another statistic which it isn't closely associated with, add RELATIVE_POSITION_BELOW and prefix nicelyFormattedNameAndValue with a newline character (\n) to separate your statistic into its own section.
        documentFieldsAndValues - this statistics section as a list of fields and values. May be empty, in which case this statistic won't appear in the document table.
        Since:
        API 4.202100 (Geneious 2021.0.0)
        See Also:
        POSITION_SEQUENCE_LENGTH, POSITION_FREQUENCIES, POSITION_AMINO_ACID_TRANSLATION_FREQUENCIES, POSITION_CODON_FREQUENCIES
      • StatisticsSection

        public StatisticsSection​(java.lang.String name,
                                 java.lang.Number numericValue,
                                 java.lang.String nicelyFormattedNameAndValue,
                                 double verticalPosition)
        Equivalent to (StatisticsSection(name, numericValue, nicelyFormattedNameAndValue, verticalPosition, Collections.emptyList()
    • Method Detail

      • getNicelyFormattedNameAndValue

        public java.lang.String getNicelyFormattedNameAndValue()
        Returns:
        the text to display in the sequence viewer, which may contain html fragments
      • getNumericValue

        public java.lang.Number getNumericValue()
        Returns:
        a numeric value for this statistic for use with other plugins that may wish to obtain the value. May be null for statistics that have no numeric value.
      • getName

        public java.lang.String getName()
        Returns:
        the name of this statistic used for programmatic purposes only to distinguish it from other sections returned by this same plugin. May be an empty String if this plugin returns only a single section.
      • getDocumentFieldsAndValues

        public java.util.List<DocumentFieldAndValue> getDocumentFieldsAndValues()
        Returns:
        this statistics section as a list of fields and values. May be empty, in which case this statistic won't appear in the document table.
        Since:
        API 4.202100 (Geneious 2021.0.0)