Package sequence

Interface Sequence

    • Method Detail

      • buildIndex

        void buildIndex​(long k)
                 throws Exception
        Builds the index based on the length of the k-mer.
        Parameters:
        k - length of the k-mer
        Throws:
        Exception - throws exception when errors occur on database end
      • getMatchingPositions

        List<Long> getMatchingPositions​(Sequence kmer)
                                 throws Exception
        Gets positions of the sequence that matches with k-mer. If an index has been built, then this method tries to use that index to perform faster look-up.
        Parameters:
        kmer - sub-sequence to search for
        Returns:
        list of matching starting positions in this sequence
        Throws:
        Exception - throws exception
      • getSize

        long getSize()
        Returns:
        size of the sequence
      • getBase

        Base getBase​(long position)
        Parameters:
        position - the position of the sequence
        Returns:
        the base at the position provided