Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Build ¶
Build takes an Annotated sequence and returns a byte array representing a gff to be written out.
Example ¶
sequence := Read("../../data/ecoli-mg1655-short.gff")
gffBytes := Build(sequence)
reparsedSequence := Parse(gffBytes)
fmt.Println(reparsedSequence.Meta.Name)
Output: U00096.3
func Parse ¶
Parse Takes in a string representing a gffv3 file and parses it into an Sequence object.
Example ¶
file, _ := ioutil.ReadFile("../../data/ecoli-mg1655-short.gff")
sequence := Parse(file)
fmt.Println(sequence.Meta.Name)
Output: U00096.3
func Read ¶
Read takes in a filepath for a .gffv3 file and parses it into an Annotated poly.Sequence struct.
Example ¶
sequence := Read("../../data/ecoli-mg1655-short.gff")
fmt.Println(sequence.Meta.Name)
Output: U00096.3
func Write ¶
Write takes an poly.Sequence struct and a path string and writes out a gff to that path.
Example ¶
tmpDataDir, err := ioutil.TempDir("", "data-*")
if err != nil {
fmt.Println(err.Error())
}
defer os.RemoveAll(tmpDataDir)
sequence := Read("../../data/ecoli-mg1655-short.gff")
tmpGffFilePath := filepath.Join(tmpDataDir, "ecoli-mg1655-short.gff")
Write(sequence, tmpGffFilePath)
testSequence := Read(tmpGffFilePath)
fmt.Println(testSequence.Meta.Name)
Output: U00096.3
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.