Nucleotide

class Nucleotide(sequence, name=None, metadata=None, mode='DNA', **kwargs)[source]

Class that represent single nucleotide sequence.

Constructor for the Nucleotide.

Parameters
  • sequence (Union[skbio.sequence._grammared_sequence.GrammaredSequence, str]) – Sequence data

  • name (Optional[str]) – Name of the sequence instance

  • metadata (Optional[dict]) – Metadata of the sequence instance

  • mode (str) – Sequence type/mode of the new instance # TODO: Validation currently passes “protein” fix it.

  • kwargs (Any) – Compatibility

Attributes

is_buckled

Is sequence instance is buckled or not.

length

Length of the sequence.

metadata

Sequence instance metadata.

mode

Sequence instance mode/type.

name

Name of the sequence instance.

skbio

The skbio representation of the sequence as skbio.sequence.GrammaredSequence

skbio_mode

The skbio mode of the sequence.

text

Sequence as string.

Methods

buckle_by_uid(uid)

Buckle sequences based on unique identifier uid.

complement()

Return the sequence complement as new instance.

copy()

Copy of the current instance.

get_string_as([format])

Get string of the sequence.

read(file[, name, metadata, mode])

Factory class that reads the sequence data.

restore_buckle(buckled_pack)

Restore the buckle using packed metadata buckle_pack

unbuckle_uid()

Retrieve unique identifier assigned during buckling.

write(file[, format])

Write sequence data to the file.