sequence

package
v0.2.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 23, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Sequence package provides a Dseq struct that represents a double stranded DNA sequence.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cutter added in v0.1.2

type Cutter interface {
	GetNextRecognitionSite(sequence string, offset int, isCircular bool) []enzyme.RecognitionSiteResult
}

type Dseq

type Dseq struct {
	// A string representing the watson (sense) DNA strand.
	Watson string

	// A string representing the crick (antisense) DNA strand.
	Crick string

	// A positive or negative number to describe the stagger between
	// start of the watson and crick strands.
	Overhang int

	// A string representing the geometry of the DNA sequence. Can be "linear" or "circular".
	Geometry constants.SequenceGeometry
}

func NewDseq

func NewDseq(watson, crick string, overhang int, geometry constants.SequenceGeometry) *Dseq

func NewFromWatsonStrand

func NewFromWatsonStrand(watson string, geometry constants.SequenceGeometry) *Dseq

func (*Dseq) Cut

func (dSeq *Dseq) Cut(enzyme Cutter) []Dseq

Cut the Dseq with the provided enzyme.

Takes either a single enzyme or a batch of enzymes (RestrictionBatch).

Returns a slice of Dseqs that represent the fragments of the Dseq after cutting with the enzyme.

If the enzyme is circular, the sequence is treated as circular and the function will return the next recognition site, even if it spans the beginning and end of the sequence.

func (*Dseq) Print

func (dSeq *Dseq) Print()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL