Learn R Programming

dada2 (version 1.0.3)

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

Description

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

Usage

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

Run this code
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)

Run the code above in your browser using DataLab