Documentation
¶
Overview ¶
Package gfa is a Go library for working with the Graphical Fragment Assembly (GFA) format.
For more information:
GFA Format Specification https://github.com/GFA-spec/GFA-spec
This package currently only conforms to GFA1 spec.
Index ¶
- func NewLink(from, fOrient, to, tOrient, overlap []byte) (*link, error)
- func NewOptionalFields(optional ...[]byte) (*optionalFields, error)
- func NewPath(n []byte, segs, olaps [][]byte) (*path, error)
- func NewSegment(n, seq []byte) (*segment, error)
- func ReadMSA(fileName string) (*multi.Multi, error)
- type GFA
- func (gfa *GFA) AddComment(c []byte)
- func (gfa *GFA) AddVersion(v int) error
- func (gfa *GFA) GetLinks() ([]*link, error)
- func (gfa *GFA) GetPaths() ([]*path, error)
- func (gfa *GFA) GetSegments() ([]*segment, error)
- func (gfa *GFA) GetVersion() int
- func (gfa *GFA) MarshalHeader() []byte
- func (gfa *GFA) PrintComments() string
- func (gfa *GFA) PrintHeader() string
- func (gfa *GFA) PrintSequence(pathName []byte) ([]byte, error)
- func (gfa *GFA) Validate() error
- func (gfa *GFA) WriteGFAContent(w *GFAwriter) error
- type GFAwriter
- type Reader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOptionalFields ¶
NewOptionalFields is an optionalFields constructor
func NewSegment ¶
NewSegment is a segment constructor
Types ¶
type GFA ¶
type GFA struct {
// contains filtered or unexported fields
}
The GFA type holds all the information from a GFA formatted file
func (*GFA) AddComment ¶
AddComment appends a comment to the comments held by the GFA instance
func (*GFA) AddVersion ¶
AddVersion adds the GFA format version to the GFA instance
func (*GFA) GetSegments ¶
GetSegments returns a slice of all the segments held in the GFA instance
func (*GFA) GetVersion ¶
GetVersion returns the GFA version
// a return value of 0 indicates no version set
func (*GFA) MarshalHeader ¶
MarshalHeader prepares the header/comment lines for a writer
func (*GFA) PrintComments ¶
PrintComments prints a string of GFA formatted comment line(s)
func (*GFA) PrintHeader ¶
PrintHeader prints the GFA formatted header line
func (*GFA) PrintSequence ¶
PrintSequence will return the sequence encoded by a specified pathName
func (*GFA) Validate ¶
Validate performs several checks on the GFA instance TODO: add more checks
// checks that it contains a version (1/2)
// checks that is contains 1 or more segments
func (*GFA) WriteGFAContent ¶
WriteGFAContent will dump the content of a GFA instance to file
type GFAwriter ¶
type GFAwriter struct {
// contains filtered or unexported fields
}
GFAwriter implements GFA format writing