repp

package
v0.0.0-...-78f8e40 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: GPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 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 FeaturesCmd

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

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

func FragmentFindCmd

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

FragmentFindCmd 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 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 SequenceFindCmd

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

SequenceFindCmd 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 EnzymeDB

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

EnzymeDB is a struct for accessing repps enzymes db.

func NewEnzymeDB

func NewEnzymeDB() *EnzymeDB

NewEnzymeDB returns a new copy of the enzymes db.

func (*EnzymeDB) DeleteCmd

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

DeleteCmd the enzyme from the database

func (*EnzymeDB) ReadCmd

func (f *EnzymeDB) ReadCmd(cmd *cobra.Command, args []string)

ReadCmd returns enzymes that are similar in name to the enzyme name requested. 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 (*EnzymeDB) SetCmd

func (f *EnzymeDB) SetCmd(cmd *cobra.Command, args []string)

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

type FeatureDB

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

FeatureDB is a struct for accessing repps features db

func NewFeatureDB

func NewFeatureDB() *FeatureDB

NewFeatureDB returns a new copy of the features db

func (*FeatureDB) DeleteCmd

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

DeleteCmd the feature from the database

func (*FeatureDB) ReadCmd

func (f *FeatureDB) ReadCmd(cmd *cobra.Command, args []string)

ReadCmd 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 (*FeatureDB) SetCmd

func (f *FeatureDB) SetCmd(cmd *cobra.Command, args []string)

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

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, dbs []string,
	addgene, igem, dnasu bool,
) (*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"`

	// URL, eg link to a plasmid's addgene page
	URL string `json:"url,omitempty"`

	// 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