Documentation ¶
Overview ¶
Package sketchio is used to read and write HULK sketches
Index ¶
- Variables
- type HULKdata
- func (HULKdata *HULKdata) Add(inputSketch SketchObject) error
- func (HULKdata *HULKdata) FindSketch(kSize uint, algo string) (SketchObject, error)
- func (HULKdata *HULKdata) GetDistance(query *HULKdata, metric string, kSize uint, algo string) (float64, error)
- func (HULKdata *HULKdata) WriteJSON(outfileName string) error
- type Signature
- type SketchObject
Constants ¶
This section is empty.
Variables ¶
View Source
var AvailAlgorithms = []string{"histosketch", "kmv", "khf"}
AvailAlgorithms is a list of the sketching algorithms currently used by HULK
Functions ¶
This section is empty.
Types ¶
type HULKdata ¶
type HULKdata struct { Class string `json:"class"` FileName string `json:"filename"` HashFunc string `json:"hash_function"` License string `json:"license"` Signatures []*Signature `json:"signatures"` Version string `json:"version"` Banner string `json:"banner_label"` // TODO: this entry is to store a label for BANNER (e.g. for training a classifier) - let's change it to a more generic metadata label }
HULKdata holds the common information required by any sketching algorithm in this library
func LoadHULKdata ¶
LoadHULKdata loads a JSON file from disk into a HULKdata
func (*HULKdata) Add ¶
func (HULKdata *HULKdata) Add(inputSketch SketchObject) error
Add is a method to add a sketch to the HULKdata
func (*HULKdata) FindSketch ¶
func (HULKdata *HULKdata) FindSketch(kSize uint, algo string) (SketchObject, error)
FindSketch is a method to return a single sketch object from a HULKdata, derived from a specified kmer size and sketching algorithm
type Signature ¶
type Signature struct { Algorithm string Sketch SketchObject }
Signature contains the sketch and the algorithm by which it was generated
type SketchObject ¶
SketchObject is an interface to process any of the sketches produced by HULK
Click to show internal directories.
Click to hide internal directories.