R/filter_sequences.R
closest_seq.Rd
Closest kmer distance This function checks the kmer distance between all the sequences in a DNAbin and a reference PHMM model
closest_seq(seqs, model, threshold, k = 5, quiet = FALSE)
A DNAbin object
A Profile Hidden Markov model ("PHMM" object) generated by aphid::derivePHMM
to screen the sequences against.
An already derived model of COI can be loaded using data("model", package="taxreturn")
The maximum kmer distance allowed from the reference model before a sequence is discarded.
The k-mer size to be used for calculating the distance matrix, parsed to kmer::mbed. Note that high values of k may be slow to compute and use a lot of memory due to the large numbers of calculations required, particularly when the residue alphabet is also large.
Whether progress should be printed to the console.