NucSeq

interface NucSeq : Seq

Main data structure for working with DNA and RNA sequences

Inheritors

Properties

Link copied to clipboard
abstract val nucSet: NucSet

The type of nucleotides - DNA or RNA and ambiguous or not

Functions

Link copied to clipboard
abstract fun back_transcribe(): NucSeq

Transcribes a NucSeq - essentially changes the NucSet from NUC.RNA to NUC.DNA

Link copied to clipboard
abstract operator fun compareTo(other: Seq): Int
Link copied to clipboard
abstract fun complement(): NucSeq

Returns the complement sequence of DNA or RNA, ambiguity is preserved

Link copied to clipboard
abstract operator fun contains(element: NucSeq): Boolean
Link copied to clipboard
abstract fun copyOfBytes(): ByteArray
Link copied to clipboard
abstract fun count(query: NUC): Int
abstract fun count(query: NucSeq): Int
Link copied to clipboard
abstract fun count_overlap(query: NucSeq): Int
Link copied to clipboard
open fun find(query: NucSeq, start: Int = 0, end: Int = Int.MAX_VALUE): Int
Link copied to clipboard
abstract fun gc(): Int

Counts the NUC.G + NUC.C within a NucSeq

Link copied to clipboard
abstract operator fun get(i: Int): NUC

Returns the NUC of this NucSeq at the specified index i with i starting at zero Negative index start from the end of the sequence, i.e. -1 is the last base

abstract operator fun get(x: IntRange): NucSeq

Returns a subset NucSeq based on the IntRange of Nucleotides. Kotlin range operator is "..". Indices start at zero. Note Kotlin IntRange are inclusive end, while Python slices exclusive end Negative slices "-3..-1" start from the last base (i.e. would return the last three bases)

abstract operator fun get(i: Int, j: Int): NucSeq

Returns a subset NucSeq based on the inclusive start i and inclusive last j Indices start at zero. Negative index start from the end of the sequence, i.e. -1 is the last base

Link copied to clipboard
abstract fun indexOf(query: NucSeq, start: Int = 0, end: Int = Int.MAX_VALUE): Int
Link copied to clipboard
abstract fun join(vararg seqs: NucSeq): NucSeq
Link copied to clipboard
open fun kmers(kmerSize: Int = 21, bothStrands: Boolean = true, stepSize: Int = 1): KmerMultiSet

Extracts the kmer count from a nucleotide sequence NucSeq. In general kmers from both strands should be extracted, unless strand specificity is really known. No kmers that include an ambiguous base pair will be included Using stepSize subsets of the kmers can be sampled

Link copied to clipboard
abstract fun lastIndexOf(query: NucSeq, start: Int = Int.MAX_VALUE, end: Int = 0): Int
Link copied to clipboard
abstract operator fun plus(seq2: NucSeq): NucSeq
Link copied to clipboard
abstract fun repr(): String

Returns (truncated) representation of the sequence for debugging

Link copied to clipboard
abstract fun reverse_complement(): NucSeq

Returns the complement sequence of DNA or RNA

Link copied to clipboard
open fun rfind(query: NucSeq, start: Int = Int.MAX_VALUE, end: Int = 0): Int
Link copied to clipboard
abstract fun seq(): String
Link copied to clipboard
abstract fun size(): Int

Returns the length of the sequence

Link copied to clipboard
abstract operator fun times(n: Int): NucSeq
Link copied to clipboard
abstract override fun toString(): String

Return the full sequence as string

Link copied to clipboard
abstract fun transcribe(): NucSeq

Transcribes a NucSeq - essentially changes the NucSet from NUC.DNA to NUC.RNA

Link copied to clipboard
abstract fun translate(table: CodonTable = CodonTable(1), to_stop: Boolean = false, cds: Boolean = false): ProteinSeq

Translate a nucleotide sequence NucSeq into amino acids ProteinSeq.

Link copied to clipboard
abstract fun ungap(): Seq

TODO - needs to be implemented