Interface EditableSequenceListDocument

    • Method Detail

      • reorderNucleotideSequences

        void reorderNucleotideSequences​(int[] ordering)
        Adjusts the ordering of sequences in this list according to the ordering array. If ordering[i]==j, then the sequence at index 'i' should be the sequence previously at index 'j' For example, if ordering = {0,1,3,4,2} Then: sequence at index 2 is moved to index 4 sequence at index 3 is moved to index 2 sequence at index 4 is moved to index 3

        This behaviour is identical to SequenceAlignmentDocument.reorderSequences(int[])

        Note that using this method will require loading the entire sequence list into memory, which might not be possible on large sequence lists. See DefaultSequenceListDocument.replaceContents for a discussion on efficiently handling editing large sequence lists.

        Parameters:
        ordering - Each integer between 0 and ordering.length - 1 inclusive should occur exactly once in this array.
        See Also:
        reorderAminoAcidSequences(int[]), SequenceAlignmentDocument.reorderSequences(int[])
      • reorderAminoAcidSequences

        void reorderAminoAcidSequences​(int[] ordering)
        Adjusts the ordering of sequences in this list according to the ordering array. If ordering[i]==j, then the sequence at index 'i' should be the sequence previously at index 'j' For example, if ordering = {0,1,3,4,2} Then: sequence at index 2 is moved to index 4 sequence at index 3 is moved to index 2 sequence at index 4 is moved to index 3

        This behaviour is identical to DefaultAlignmentDocument.reorderSequences(int[])

        Note that using this method will require loading the entire sequence list into memory, which might not be possible on large sequence lists. See DefaultSequenceListDocument.replaceContents for a discussion on efficiently handling editing large sequence lists.

        Parameters:
        ordering - Each integer between 0 and ordering.length - 1 inclusive should occur exactly once in this array.
        See Also:
        reorderNucleotideSequences(int[]), SequenceAlignmentDocument.reorderSequences(int[])
      • removeNucleotideSequence

        void removeNucleotideSequence​(int index)
        Removes the nucleotide sequence at the given index from this sequence list and shifts any subsequent sequences to the left (subtracts one from their indices).

        Note that using this method will require loading the entire sequence list into memory, which might not be possible on large sequence lists. See DefaultSequenceListDocument.replaceContents for a discussion on efficiently handling editing large sequence lists.

        Parameters:
        index - the index of the nucleotide sequence to remove.
      • removeAminoAcidSequence

        void removeAminoAcidSequence​(int index)
        Removes the amino acid sequence at the given index from this sequence list and shifts any subsequent sequences to the left (subtracts one from their indices).

        Note that using this method will require loading the entire sequence list into memory, which might not be possible on large sequence lists. See DefaultSequenceListDocument.replaceContents for a discussion on efficiently handling editing large sequence lists.

        Parameters:
        index - the index of the amino acid sequence to remove.
      • addNucleotideSequence

        void addNucleotideSequence​(NucleotideSequenceDocument sequence)
        Adds the given nucleotide sequence to the end of the list of nucleotide sequences in this document

        Note that using this method will require loading the entire sequence list into memory, which might not be possible on large sequence lists. See DefaultSequenceListDocument.replaceContents for a discussion on efficiently handling editing large sequence lists.

        Parameters:
        sequence - the nucleotide sequence to add
      • addAminoAcidSequence

        void addAminoAcidSequence​(AminoAcidSequenceDocument sequence)
        Adds the given amino acid sequence to the end of the list of amino acid sequences in this document

        Note that using this method will require loading the entire sequence list into memory, which might not be possible on large sequence lists. See DefaultSequenceListDocument.replaceContents for a discussion on efficiently handling editing large sequence lists.

        Parameters:
        sequence - the amino acid sequence to add
      • getOrderingRevisionNumber

        int getOrderingRevisionNumber()
        Return a revision number that is incremented each time sequences are reordered or removed from this sequence list. Alignments or other documents that store references back to individual sequences in this list should record the ordering revision number at the time they begin referencing this document. If at a later date this ordering revision number has changed they should discard the reference or they could end up referencing the wrong sequence.
        Returns:
        a revision number that is incremented each time sequences are reordered or removed from this sequence list.
        Since:
        API 4.605 (Geneious 6.0.5)
        See Also:
        DocumentField.SEQUENCE_LIST_ORDERING_REVISION_NUMBER