igem

package
v0.0.0-...-040724e Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2019 License: BSD-3-Clause, GPL-2.0, BSD-3-Clause, + 1 more Imports: 12 Imported by: 0

Documentation

Overview

Package for interacting with the iGem registry

Index

Constants

View Source
const (
	GENERIC          = "BBa_B"
	PROTEINCODING    = "BBa_C"
	REPORTER         = "BBa_E"
	SIGNALLING       = "BBa_F"
	PRIMER           = "BBa_G"
	IAPPROJECT       = "BBa_I"
	IGEMPROJECT      = "BBa_J"
	TAG              = "BBa_M"
	PROTEINGENERATOR = "BBa_P"
	INVERTER         = "BBa_Q"
	REGULATORY       = "BBa_R"
	INTERMEDIATE     = "BBa_S"
	CELLSTRAIN       = "BBa_V"
)

Part Name classifications

BBa_B... = Generic basic parts such as Terminators, DNA, and Ribosome Binding Site BBa_C... = Protein coding parts BBa_E... = Reporter parts BBa_F... = Signalling parts BBa_G... = Primer parts BBa_I... = IAP 2003, 2004 project parts BBa_J... = iGEM project parts BBa_M... = Tag parts BBa_P... = Protein Generator parts BBa_Q... = Inverter parts BBa_R... = Regulatory parts BBa_S... = Intermediate parts BBa_V... = Cell strain parts

Variables

View Source
var (
	IgemTypeCodes = map[string]string{
		"GENERIC":          "BBa_B",
		"PROTEINCODING":    "BBa_C",
		"REPORTER":         "BBa_E",
		"SIGNALLING":       "BBa_F",
		"PRIMER":           "BBa_G",
		"IAPPROJECT":       "BBa_I",
		"IGEMPROJECT":      "BBa_J",
		"TAG":              "BBa_M",
		"PROTEINGENERATOR": "BBa_P",
		"INVERTER":         "BBa_Q",
		"REGULATORY":       "BBa_R",
		"INTERMEDIATE":     "BBa_S",
		"CELLSTRAIN":       "BBa_V",
	}
)

Functions

func CountPartsinRegistryContaining

func CountPartsinRegistryContaining(keystrings []string) (numberofparts int)

func FilterRegistry

func FilterRegistry(partype string, keystrings []string, exacttypecodeonly bool) (listofpartIDs []string, idtodescriptionmap map[string]string, err error)

func GetDescription

func GetDescription(partname string) (desc string)

func GetDescriptionfromSubset

func GetDescriptionfromSubset(partname string, parsedxml Rsbpml) (desc string)

func GetRating

func GetRating(partname string) (rating string)

func GetResults

func GetResults(partname string) (results string)

func GetResultsfromSubset

func GetResultsfromSubset(partname string, parsedxml Rsbpml) (results string)

change to object based method call

func GetSequence

func GetSequence(partname string) (sequence string)

func GetType

func GetType(partname string) (parttype string)

func MakeFastaURL

func MakeFastaURL(partname string) (Urlstring string)

Types

type Categories

type Categories struct {
	Categories []string `xml:"category"`
}

func GetCategories

func GetCategories(partname string) (categories Categories)

type FastaPart

type FastaPart struct {
	Part_id         string
	Desc            string
	Part_name       string
	Part_short_desc string
	Part_type       string
	Sample_status   string
	Seq_data        string
}

func Build_fasta

func Build_fasta(header string, seq bytes.Buffer) (Record FastaPart)

func FastaParse

func FastaParse(fastaFh io.Reader) []FastaPart

type IgemFeature

type IgemFeature struct {
	Id        string `xml:"id"`
	Title     string `xml:"title"`
	Type      string `xml:"type"`
	Direction string `xml:"direction"`
	Startpos  string `xml:"startpos"`
	Endpos    string `xml:"endpos"`
}

type IgemFeatures

type IgemFeatures struct {
	Features []IgemFeature `xml:"feature"`
}

type IgemParameter

type IgemParameter struct {
	Name      string `xml:"name"`
	Value     string `xml:"value"`
	Units     string `xml:"units"`
	Url       string `xml:"url"`
	Id        string `xml:"id"`
	M_date    string `xml:"m_date"`
	User_id   string `xml:"user_id"`
	User_name string `xml:"user_name"`
}

type IgemParameters

type IgemParameters struct {
	Parameters []IgemParameter `xml:"parameter"`
}

type Part

type Part struct {
	Part_id            string         `xml:"part_id"`
	Part_name          string         `xml:"part_name"`
	Part_short_name    string         `xml:"part_short_name"`
	Part_short_desc    string         `xml:"part_short_desc"`
	Part_type          string         `xml:"part_type"`
	Release_status     string         `xml:"release_status"`
	Sample_status      string         `xml:"sample_status"`
	Part_results       string         `xml:"part_results"`
	Part_nickname      string         `xml:"part_nickname"`
	Part_rating        string         `xml:"part_rating"`
	Part_url           string         `xml:"part_url"`
	Part_entered       string         `xml:"part_entered"`
	Part_author        string         `xml:"part_author"`
	Deep_subparts      Subparts       `xml:"deep_subparts"`
	Specified_subparts Subparts       `xml:"specified_subparts"`
	Specified_subscars Subscars       `xml:"specified_subscars"`
	Sequencelist       []Sequence     `xml:"sequences"`
	Features           IgemFeatures   `xml:"features"`
	Parameters         IgemParameters `xml:"parameters"`
	Categories         Categories     `xml:"categories"`
	Twins              Twins          `xml:"twins"`
}

func GetPart

func GetPart(partname string) (partproperties Part)

type Part_list

type Part_list struct {
	Parts []Part `xml:"part"`
}

type Registryquerier

type Registryquerier interface {
	GetParts([]string) []Rsbpml
}

type Rsbpml

type Rsbpml struct {
	Partlist []Part_list `xml:"part_list"`
}

func FetchPartsXML

func FetchPartsXML(parts []string) (parsedxml Rsbpml)

func LookUp

func LookUp(parts []string) (parsedxml Rsbpml)

func ParseOutput

func ParseOutput(xmldata []byte) (parsedxml Rsbpml)

func (*Rsbpml) Categories

func (parsedxml *Rsbpml) Categories(partname string) (result Categories)

func (*Rsbpml) Description

func (parsedxml *Rsbpml) Description(partname string) (result string)

func (*Rsbpml) Rating

func (parsedxml *Rsbpml) Rating(partname string) (result string)

func (*Rsbpml) Results

func (parsedxml *Rsbpml) Results(partname string) (result string)

func (*Rsbpml) Sequence

func (parsedxml *Rsbpml) Sequence(partname string) (sequence string)

Add Get funcs to get data from Rsbpml? Would be much faster

func (*Rsbpml) Type

func (parsedxml *Rsbpml) Type(partname string) (result string)

type Scar

type Scar struct {
	Scar_id       string `xml:"scar_id"`
	Scar_standard string `xml:"scar_standard"`
	Scar_type     string `xml:"scar_type"`
	Scar_name     string `xml:"scar_name"`
	Scar_nickname string `xml:"scar_nickname"`
	Scar_comments string `xml:"scar_comments"`
	Scar_sequence string `xml:"scar_sequence"`
}

type Sequence

type Sequence struct {
	Seq_data string `xml:"seq_data"`
}

type Subpart

type Subpart struct {
	Part_id         string `xml:"part_id"`
	Part_name       string `xml:"part_name"`
	Part_short_desc string `xml:"part_short_desc"`
	Part_type       string `xml:"part_type"`
	Part_nickname   string `xml:"part_nickname"`
}

type Subparts

type Subparts struct {
	Subparts []Subpart `xml:"subpart"`
}

type Subscars

type Subscars struct {
	Subparts []Subpart `xml:"subpart"`
	Scars    []Scar    `xml:"scar"`
}

type Twins

type Twins struct {
	Twins []string `xml:"twin"`
}

Jump to

Keyboard shortcuts

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