NucSeqRecord

class NucSeqRecord(val sequence: NucSeq, val id: String, val name: String? = null, val description: String? = null, val annotations: ImmutableMap<String, String> = ImmutableMap.of(), val letterAnnotations: ImmutableMap<String, Array<out Any>> = ImmutableMap.of()) : SeqRecord, NucSeq

A NucSeqRecord consists of a NucSeq and several optional annotations.

Main attributes:

  • id - Identifier such as a locus tag (string)

  • seq - The sequence itself (NucSeq) Additional attributes:

  • name - Sequence name, e.g. gene name (string)

  • description - Additional text (string)

  • annotations - A map of strings containing key-value pairs of annotations for different features

  • letterAnnotations - Per letter/symbol annotation. This holds an ImmutableList whose length matches that of the sequence. A typical use would be to hold a list of integers representing sequencing quality scores.

from Bio.Seq import NucSeq from Bio.Seq import NucSeqRecord val record_1 = NucSeqRecord(NucSeq("ATCG"), "1", "seq1", "the first sequence")

Constructors

Link copied to clipboard
constructor(sequence: NucSeq, id: String, name: String? = null, description: String? = null, annotations: ImmutableMap<String, String> = ImmutableMap.of(), letterAnnotations: ImmutableMap<String, Array<out Any>> = ImmutableMap.of())

Properties

Link copied to clipboard
val annotations: ImmutableMap<String, String>
Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
val letterAnnotations: ImmutableMap<String, Array<out Any>>
Link copied to clipboard
val name: String?
Link copied to clipboard
open override val nucSet: NucSet

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

Link copied to clipboard

Functions

Link copied to clipboard
open override fun back_transcribe(): NucSeq

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

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

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

fun complement(id: String, name: String? = null, description: String? = null, annotations: ImmutableMap<String, String>? = null): NucSeqRecord

Return a new SeqRecord with the complement sequence. The sequence will have id id. If the other parameters are not specified, they will be taken from the original SeqRecord.

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

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

Link copied to clipboard
open operator override 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

open operator override 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)

open operator override 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
open override fun indexOf(query: NucSeq, start: Int, end: Int): Int
Link copied to clipboard
open override fun join(vararg seqs: NucSeq): NucSeq
Link copied to clipboard
open override fun kmers(kmerSize: Int, bothStrands: Boolean, stepSize: Int): 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
open override fun lastIndexOf(query: NucSeq, start: Int, end: Int): Int
Link copied to clipboard
open operator override fun plus(seq2: NucSeq): NucSeq
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun repr(): String

Returns (truncated) representation of the sequence for debugging

Link copied to clipboard
open override fun reverse_complement(): NucSeq

Returns the complement sequence of DNA or RNA

fun reverse_complement(id: String, name: String? = null, description: String? = null, annotations: ImmutableMap<String, String>? = null): NucSeqRecord

Return a new SeqRecord with the reverse complement sequence. The sequence will have id id. If the other parameters are not specified, they will be taken from the original SeqRecord.

Link copied to clipboard
open override fun rfind(query: NucSeq, start: Int, end: Int): Int
Link copied to clipboard
open override fun seq(): String
Link copied to clipboard
open override fun size(): Int
Link copied to clipboard
open operator override fun times(n: Int): NucSeq
Link copied to clipboard
open override fun toString(): String

Returns a string summary of the NucSeqRecord. Uses the representational string version of the sequence.

Link copied to clipboard
open override fun transcribe(): NucSeq

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

Link copied to clipboard
open override fun translate(table: CodonTable, to_stop: Boolean, cds: Boolean): ProteinSeq

Translate a nucleotide sequence NucSeq into amino acids ProteinSeq.

Link copied to clipboard
open override fun ungap(): Seq

TODO - needs to be implemented