R/RcppExports.R

Defines functions C_assign_taxonomy2 C_assign_taxonomy dada_uniques C_nwvec C_matrixEE C_matchRef C_subpos evaluate_kmers C_isACGT C_pair_consensus C_eval_pair C_nwalign C_table_bimera2 C_is_bimera

Documented in evaluate_kmers

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

C_is_bimera <- function(sq, pars, allow_one_off, min_one_off_par_dist, match, mismatch, gap_p, max_shift) {
    .Call('dada2_C_is_bimera', PACKAGE = 'dada2', sq, pars, allow_one_off, min_one_off_par_dist, match, mismatch, gap_p, max_shift)
}

C_table_bimera2 <- function(mat, seqs, min_fold, min_abund, allow_one_off, min_one_off_par_dist, match, mismatch, gap_p, max_shift) {
    .Call('dada2_C_table_bimera2', PACKAGE = 'dada2', mat, seqs, min_fold, min_abund, allow_one_off, min_one_off_par_dist, match, mismatch, gap_p, max_shift)
}

C_nwalign <- function(s1, s2, match, mismatch, gap_p, homo_gap_p, band, endsfree) {
    .Call('dada2_C_nwalign', PACKAGE = 'dada2', s1, s2, match, mismatch, gap_p, homo_gap_p, band, endsfree)
}

C_eval_pair <- function(s1, s2) {
    .Call('dada2_C_eval_pair', PACKAGE = 'dada2', s1, s2)
}

C_pair_consensus <- function(s1, s2, prefer, trim_overhang) {
    .Call('dada2_C_pair_consensus', PACKAGE = 'dada2', s1, s2, prefer, trim_overhang)
}

C_isACGT <- function(seqs) {
    .Call('dada2_C_isACGT', PACKAGE = 'dada2', seqs)
}

#' Generate the kmer-distance and the alignment distance from the
#'   given set of sequences. 
#'
#' @param seqs (Required). Character.
#'  A vector containing all unique sequences in the data set.
#'  Only A/C/G/T allowed.
#'  
#' @param kmer_size (Required). A \code{numeric(1)}. The size of the kmer to test (eg. 5-mer).
#' 
#' @param score (Required). Numeric matrix (4x4).
#' The score matrix used during the alignment. Coerced to integer.
#'
#' @param gap (Required). A \code{numeric(1)} giving the gap penalty for alignment. Coerced to integer.
#'
#' @param band (Required). A \code{numeric(1)} giving the band-size for the NW alignments.
#'
#' @param max_aligns (Required). A \code{numeric(1)} giving the (maximum) number of
#' pairwise alignments to do.
#'
#' @return data.frame
#'
#' @examples
#' 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)
#' 
evaluate_kmers <- function(seqs, kmer_size, score, gap, band, max_aligns) {
    .Call('dada2_evaluate_kmers', PACKAGE = 'dada2', seqs, kmer_size, score, gap, band, max_aligns)
}

C_subpos <- function(s1, s2) {
    .Call('dada2_C_subpos', PACKAGE = 'dada2', s1, s2)
}

C_matchRef <- function(seqs, ref, word_size, non_overlapping) {
    .Call('dada2_C_matchRef', PACKAGE = 'dada2', seqs, ref, word_size, non_overlapping)
}

C_matrixEE <- function(inp) {
    .Call('dada2_C_matrixEE', PACKAGE = 'dada2', inp)
}

C_nwvec <- function(s1, s2, match, mismatch, gap_p, band, endsfree) {
    .Call('dada2_C_nwvec', PACKAGE = 'dada2', s1, s2, match, mismatch, gap_p, band, endsfree)
}

#' @useDynLib dada2
#' @importFrom Rcpp evalCpp
NULL

dada_uniques <- function(seqs, abundances, err, quals, score, gap, use_kmers, kdist_cutoff, band_size, omegaA, max_clust, min_fold, min_hamming, use_quals, final_consensus, vectorized_alignment, homo_gap, multithread, verbose) {
    .Call('dada2_dada_uniques', PACKAGE = 'dada2', seqs, abundances, err, quals, score, gap, use_kmers, kdist_cutoff, band_size, omegaA, max_clust, min_fold, min_hamming, use_quals, final_consensus, vectorized_alignment, homo_gap, multithread, verbose)
}

C_assign_taxonomy <- function(seqs, rcs, refs, ref_to_genus, genusmat, try_rc, verbose) {
    .Call('dada2_C_assign_taxonomy', PACKAGE = 'dada2', seqs, rcs, refs, ref_to_genus, genusmat, try_rc, verbose)
}

C_assign_taxonomy2 <- function(seqs, rcs, refs, ref_to_genus, genusmat, try_rc, verbose) {
    .Call('dada2_C_assign_taxonomy2', PACKAGE = 'dada2', seqs, rcs, refs, ref_to_genus, genusmat, try_rc, verbose)
}

# Register entry points for exported C++ functions
methods::setLoadAction(function(ns) {
    .Call('dada2_RcppExport_registerCCallable', PACKAGE = 'dada2')
})
Bioconductor-mirror/dada2 documentation built on June 1, 2017, 7:31 a.m.