repp

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2022 License: GPL-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// LogLevel is a configurable log level
	LogLevel = zap.NewAtomicLevelAt(zap.InfoLevel)
)

Functions

func AddCmd added in v1.0.0

func AddCmd(cmd *cobra.Command, args []string)

AddCmd imports a new sequence database to the REPP directory.

func Annotate

func Annotate(cmd *cobra.Command, args []string)

Annotate is for annotating a plasmid sequence given the features in the feature database. If an output path is provided, the annotated plasmid is writen to that file. Otherwise, the feature matches are written to stdout.

func DeleteCmd added in v1.0.0

func DeleteCmd(cmd *cobra.Command, args []string)

DeleteCmd deletes an existing sequence database from the REPP directory.

func EnzymesAddCmd added in v1.0.0

func EnzymesAddCmd(cmd *cobra.Command, args []string)

EnzymesAddCmd the enzyme's seq in the database (or create if it isn't in the enzyme db).

func EnzymesDeleteCmd added in v1.0.0

func EnzymesDeleteCmd(cmd *cobra.Command, args []string)

EnzymesDeleteCmd deletes an enzyme from the database

func EnzymesReadCmd added in v1.0.0

func EnzymesReadCmd(cmd *cobra.Command, args []string)

EnzymesReadCmd writes enzymes that are similar in queried name to stdout. if multiple enzyme names include the enzyme name, they are all returned. otherwise a list of enzyme names are returned (those beneath a levenshtein distance cutoff).

func Features

func Features(flags *Flags, conf *config.Config) [][]*Frag

Features assembles a plasmid with all the Features requested with the 'repp Features [feature ...]' command repp assemble Features p10 promoter, mEGFP, T7 terminator

func FeaturesAddCmd added in v1.0.0

func FeaturesAddCmd(cmd *cobra.Command, args []string)

FeaturesAddCmd the feature's seq in the database (or create if it isn't in the feature db)

func FeaturesCmd

func FeaturesCmd(cmd *cobra.Command, args []string)

FeaturesCmd accepts a cobra commands and assembles a plasmid containing all the features

func FeaturesDeleteCmd added in v1.0.0

func FeaturesDeleteCmd(cmd *cobra.Command, args []string)

FeaturesDeleteCmd the feature from the database

func FeaturesReadCmd added in v1.0.0

func FeaturesReadCmd(cmd *cobra.Command, args []string)

FeaturesReadCmd returns features that are similar in name to the feature name requested. if multiple feature names include the feature name, they are all returned. otherwise a list of feature names are returned (those beneath a levenshtein distance cutoff)

func FragmentListCmd added in v1.0.0

func FragmentListCmd(cmd *cobra.Command, args []string)

FragmentListCmd logs the building fragment with the name passed.

func FragmentsCmd

func FragmentsCmd(cmd *cobra.Command, args []string)

FragmentsCmd accepts a cobra commands and assembles a list of building fragments in order

func ListCmd added in v1.0.0

func ListCmd(cmd *cobra.Command, args []string)

ListCmd lists the sequence databases and their costs.

func NewEnzymeDB

func NewEnzymeDB() *kv

NewEnzymeDB returns a new copy of the enzymes db.

func NewFeatureDB

func NewFeatureDB() *kv

NewFeatureDB returns a new copy of the features db

func Sequence

func Sequence(flags *Flags, conf *config.Config) [][]*Frag

Sequence is for running an end to end plasmid design using a target sequence.

func SequenceCmd

func SequenceCmd(cmd *cobra.Command, args []string)

SequenceCmd takes a cobra command (with its flags) and runs plasmid.

func SequenceListCmd added in v1.0.0

func SequenceListCmd(cmd *cobra.Command, args []string)

SequenceListCmd is for BLAST'ing a sequence against the dbs and finding matches

Types

type Backbone

type Backbone struct {
	// URL of the backbone fragment's source
	URL string `json:"url"`

	// Seq is the sequence of the backbone (unlinearized)
	Seq string `json:"seq"`

	// Enzymes is the list of enzymes names used to linearize the backbone
	Enzymes []string `json:"enzymes"`

	// cutsites are the indexes where the backbone was cleaved
	Cutsites []int `json:"recognitionIndex"`

	// Strands of each cut direction. True if fwd, False if rev direction
	Strands []bool `json:"strands"`
}

Backbone is for information on a linearized backbone in the output payload

type DB added in v1.0.0

type DB struct {
	// Name of the db
	Name string `json:"name"`

	// Path to the local database in FASTA format.
	Path string `json:"path"`

	// Cost per order from this sequence provider.
	// Eg $65 to order from Addgene.
	Cost float64 `json:"cost"`
}

DB is a single sequence database. It holds the names, sequences, and cost of a single sequence source.

type Flags

type Flags struct {
	// contains filtered or unexported fields
}

Flags contains parsed cobra Flags like "in", "out", "dbs", etc that are used by multiple commands.

func NewFlags

func NewFlags(
	in, out, backbone, filter string,
	enzymes []string,
	dbs []DB,
) (*Flags, *config.Config)

NewFlags makes a new flags object manually. for testing.

type Frag

type Frag struct {
	// ID is a unique identifier for this fragment
	ID string `json:"id,omitempty"`

	// type of the fragment in string representation for export
	Type string `json:"type"`

	// Cost to make the fragment
	Cost float64 `json:"cost"`

	// fragment/plasmid's sequence
	Seq string `json:"seq,omitempty"`

	// sequence of a pcr fragment after PCR's addition of bp
	PCRSeq string `json:"pcrSeq,omitempty"`

	// primers necessary to create this (if pcr fragment)
	Primers []Primer `json:"primers,omitempty"`
	// contains filtered or unexported fields
}

Frag is a single building block stretch of DNA for assembly

type Output

type Output struct {
	// Target's name. In >example_CDS FASTA its "example_CDS"
	Target string `json:"target"`

	// Target's sequence
	TargetSeq string `json:"seq"`

	// Time, ex: "2018-01-01 20:41:00"
	Time string `json:"time"`

	// Execution is the number of seconds it took to execute the command
	Execution float64 `json:"execution"`

	// Solutions builds
	Solutions []Solution `json:"solutions"`

	// Backbone is the user linearized a backbone fragment
	Backbone *Backbone `json:"backbone,omitempty"`
}

Output is a struct containing design results for the assembly.

type Primer

type Primer struct {
	// Seq of the primer (in 5' to 3' direction)
	Seq string `json:"seq"`

	// Strand of the primer; true if top strand, false if complement
	Strand bool `json:"strand"`

	// Penalty score
	Penalty float64 `json:"penalty"`

	// PairPenalty score from primer3
	PairPenalty float64 `json:"pairPenalty"`

	// Tm of the primer
	Tm float64 `json:"tm"`

	// GC % max
	GC float64 `json:"gc"`

	// Range that the primer spans on the fragment
	Range ranged `json:"-"`
}

Primer is a single Primer used to create a PCR fragment

type Solution

type Solution struct {
	// Count is the number of fragments in this solution
	Count int `json:"count"`

	// Cost estimated from the primer and sequence lengths
	Cost float64 `json:"cost"`

	// Fragments used to build this solution
	Fragments []*Frag `json:"fragments"`
}

Solution is a single solution to build up the target plasmid.

Jump to

Keyboard shortcuts

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