rebase

package
v0.14.5 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(enzymeMap map[string]Enzyme) []byte

Export returns a json file of the Rebase database

Example
enzymeMap, _ := Read("data/rebase_test.txt")
enzymeJson := Export(enzymeMap)
fmt.Println(string(enzymeJson)[:100])
Output:

{"AaaI":{"name":"AaaI","isoschizomers":["XmaIII","BseX3I","BsoDI","BstZI","EagI","EclXI","Eco52I","S

func Parse

func Parse(file []byte) map[string]Enzyme

Parse parses the Rebase database into a map of enzymes

func Read

func Read(path string) (map[string]Enzyme, error)

Read returns an enzymeMap from a Rebase data dump

Example
enzymeMap, _ := Read("data/rebase_test.txt")
fmt.Println(enzymeMap["AarI"].MicroOrganism)
Output:

Arthrobacter aurescens SS2-322

Types

type Enzyme

type Enzyme struct {
	Name                   string   `json:"name"`
	Isoschizomers          []string `json:"isoschizomers"`
	RecognitionSequence    string   `json:"recognitionSequence"`
	MethylationSite        string   `json:"methylationSite"`
	MicroOrganism          string   `json:"microorganism"`
	Source                 string   `json:"source"`
	CommercialAvailability []string `json:"commercialAvailability"`
	References             string   `json:"references"`
}

Enzyme represents a single enzyme within the Rebase database

Jump to

Keyboard shortcuts

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