Documentation
¶
Overview ¶
Package libblini provides reusable code for the blini algorithm.
Index ¶
- func CreateSketchFile[T constraints.Unsigned](inFile, outFile string, scale uint64, ignoreShort bool) error
- type Dataset
- func (d *Dataset[T]) Cluster(minSim float64, contn bool) [][]int
- func (d *Dataset[T]) IsIgnored(i int) bool
- func (d *Dataset[T]) Len() int
- func (d *Dataset[T]) Search(seq []byte, contn bool) iter.Seq[SearchResult]
- func (d *Dataset[T]) SearchSketch(s *Sketch[T], contn bool) iter.Seq[SearchResult]
- func (d *Dataset[T]) Sketch(i int) *Sketch[T]
- type SearchResult
- type Sketch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSketchFile ¶
func CreateSketchFile[T constraints.Unsigned]( inFile, outFile string, scale uint64, ignoreShort bool) error
CreateSketchFile sketches a fasta file and outputs the sketches into a file.
Types ¶
type Dataset ¶
type Dataset[T constraints.Unsigned] struct { // contains filtered or unexported fields }
Dataset holds sketches, metadata and index.
func ReadDataset ¶
func ReadDataset[T constraints.Unsigned]( file string, scale uint64, index bool, ignoreShort bool) (*Dataset[T], error)
ReadDataset reads a sketch dataset from a file. Reads pre-sketched data if the file ends with .blini, otherwise treats the data as fasta and sketches it.
func (*Dataset[T]) Cluster ¶
Cluster clusters this dataset's sketches, with minSim as the minimal similarity between each element and the cluster's representative. contn is whether containment should be checked rather than full match.
func (*Dataset[T]) IsIgnored ¶
IsIgnored returns whether the i'th sequence was ignored when building this dataset.
func (*Dataset[T]) SearchSketch ¶
SearchSketch looks up a sketch in the dataset.
type SearchResult ¶
type SearchResult struct {
I int // Reference serial number, 0-based.
Name string // Reference name.
Similarity float64 // Between 0-1.
}
SearchResult is a single match between a query and a reference sequence.
type Sketch ¶
type Sketch[T constraints.Unsigned] struct { // contains filtered or unexported fields }
Sketch represents a single sequence that has been sketched.