MCPcopy Create free account
hub / github.com/Koeng101/dnadesign / Example_basic

Function Example_basic

lib/bio/uniprot/example_test.go:14–23  ·  view source on GitHub ↗

This example shows how to open a uniprot data dump file and read the results into a list. Directly using the channel without converting to an array should be used for the Trembl data dump

()

Source from the content-addressed store, hash-verified

12// into a list. Directly using the channel without converting to an array
13// should be used for the Trembl data dump
14func Example_basic() {
15 uniprotFile, _ := os.Open("data/uniprot_sprot_mini.xml.gz")
16 defer uniprotFile.Close()
17 unzippedFile, _ := gzip.NewReader(uniprotFile)
18 parser := uniprot.NewParser(unzippedFile)
19 entry, _ := parser.Next()
20
21 fmt.Println(entry.Accession[0])
22 // Output: P0C9F0
23}

Callers

nothing calls this directly

Calls 1

NextMethod · 0.95

Tested by

no test coverage detected