Documentation ¶
Overview ¶
Package megamash is an implementation of the megamash algorithm.
Megamash is an algorithm developed by Keoni Gandall to find templates from sequencing reactions. For example, you may have a pool of amplicons, and need to get a count of how many times each amplicon shows up in a given sequencing reaction.
Megamash takes all unique kmers of a given sequence among all other sequences in a pool, and uses those to distinguish how close a given target is to that particular sequence. This does not work if there are no unique kmers within a sequence: this can often happen in combinatorial libraries. For sequences like that, it is better to look to a different algorithm.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( DefaultKmerSize uint = 16 DefaultMinimalKmerCount int = 10 DefaultScoreThreshold float64 = 0.5 )
Functions ¶
func MatchesToJSON ¶
MatchesToJSON converts a slice of Match structs to a JSON string.
func StandardizeDNA ¶
StandardizeDNA returns the alphabetically lesser strand of a double stranded DNA molecule.
Types ¶
type Match ¶
Match contains the identifier and score of a potential match to the searched sequence.
func JSONToMatches ¶
JSONToMatches converts a JSON string to a slice of Match structs.
type MegamashMap ¶
type MegamashMap struct { Kmers map[string]string IdentifierToKmerCount map[string]int KmerSize uint KmerMinimalCount int Threshold float64 }
func NewMegamashMap ¶
func NewMegamashMap(sequences []fasta.Record, kmerSize uint, kmerMinimalCount int, threshold float64) (MegamashMap, error)
NewMegamashMap creates a megamash map that can be searched against.
func (*MegamashMap) Match ¶
func (m *MegamashMap) Match(sequence string) []Match
Match matches a sequence to all the sequences in a megamash map.