Generate the kmer-distance and the alignment distance from the given set of sequences.

Share:

Description

Generate the kmer-distance and the alignment distance from the given set of sequences.

Usage

1
evaluate_kmers(seqs, kmer_size, score, gap, band, max_aligns)

Arguments

seqs

(Required). Character. A vector containing all unique sequences in the data set. Only A/C/G/T allowed.

kmer_size

(Required). A numeric(1). The size of the kmer to test (eg. 5-mer).

score

(Required). Numeric matrix (4x4). The score matrix used during the alignment. Coerced to integer.

gap

(Required). A numeric(1) giving the gap penalty for alignment. Coerced to integer.

band

(Required). A numeric(1) giving the band-size for the NW alignments.

max_aligns

(Required). A numeric(1) giving the (maximum) number of pairwise alignments to do.

Value

data.frame

Examples

1
2
3
4
derep1 = derepFastq(system.file("extdata", "sam1F.fastq.gz", package="dada2"))
kmerdf <- dada2:::evaluate_kmers(getSequences(derep1), 5, getDadaOpt("SCORE_MATRIX"),
                                 getDadaOpt("GAP_PENALTY"), 16, 1000)
plot(kmerdf$kmer, kmerdf$align)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.