# This file was generated by Rcpp::compileAttributes
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Get row numbers to create all pairs of adjacent methylation loci.
#'
#' In the description below, \code{x} is a \code{\link{MethPat}} object
#' containing 1-tuples. The argument descriptions are chosen for clarity, not
#' because they are necessarily an efficient way to obtain said arguments.
#'
#' @param methpat_order \code{order(x)}.
#' @param seqnames \code{as.character(seqnames(sort(x)))}.
#' @param strand \code{as.character(sort(x))}.
#' @param pos \code{start(sort(x))}.
#' @param in_feature \code{overlapsAny(x, feature)} or \code{rep(NA, nrow(x))}
#' if no feature is supplied to \code{methLevelCor}.
#' @param id_dt A \code{\link[data.table]{data.table}} mapping the
#' \code{seqnames-strand-IPD-in_feature} combination to an integer ID.
#'
#' @keywords internal
#'
#' @return A \code{list} with the \code{ID}, \code{i} and \code{j}
#' \code{j} of each pair, where \code{i} (resp. \code{j}) is the row number of
#' the first (resp. second) loci in the pair with respect to \code{x}.
.makeAdjacentPairsCpp <- function(methpat_order, seqnames, strand, pos, in_feature, id_dt) {
.Call('MethylationTuples_makeAdjacentPairs', PACKAGE = 'MethylationTuples', methpat_order, seqnames, strand, pos, in_feature, id_dt)
}
#' Get row numbers to create all pairs of methylation loci with given IPDs.
#'
#' In the description below, \code{x} is a \code{\link{MethPat}} object
#' containing 1-tuples. The argument descriptions are chosen for clarity, not
#' because they are necessarily an efficient way to obtain said arguments.
#'
#' @param methpat_order \code{order(x)}.
#' @param seqnames \code{as.character(seqnames(sort(x)))}.
#' @param strand \code{as.character(sort(x))}.
#' @param pos \code{start(sort(x))}.
#' @param in_feature \code{overlapsAny(x, feature)} or \code{rep(NA, nrow(x))}
#' if no feature is supplied to \code{methLevelCor}.
#' \code{rep(NA_integer_, nrow(x))} if no feature is supplied to
#' \code{methLevelCor}.
#' @param ipd An integer vector of IPD, e.g., \code{ipd = 1:100}.
#' @param id_dt A \code{\link[data.table]{data.table}} mapping the
#' \code{seqnames-strand-IPD-in_feature} combination to an integer ID.
#'
#' @keywords internal
#'
#' @return A \code{list} with the \code{ID}, \code{i} and \code{j}
#' \code{j} of each pair, where \code{i} (resp. \code{j}) is the row number of
#' the first (resp. second) loci in the pair with respect to \code{x}.
.makeAllPairsCpp <- function(methpat_order, seqnames, strand, pos, in_feature, ipd, id_dt) {
.Call('MethylationTuples_makeAllPairs', PACKAGE = 'MethylationTuples', methpat_order, seqnames, strand, pos, in_feature, ipd, id_dt)
}
#' Sort rows or columns of a numeric matrix.
#'
#' This simply uses the \code{sort} routine in \code{Armadillo} via
#' \code{RcppArmadillo}.
#'
#' @param x A numeric matrix.
#' @param sort_direction The sort_direction argument is optional;
#' sort_direction is either "ascend" or "descend"; by default "ascend" is used.
#' @param dim The dim argument is optional; by default dim = 0 is used.
#'
#' @return A matrix with the elements of the input matrix sorted in each column
#' (dim = 0), or each row (dim = 1).
#'
#' @keywords internal
.sortMatrixCpp <- function(x, sort_direction = "ascend", dim = 0L) {
.Call('MethylationTuples_sortMatrix', PACKAGE = 'MethylationTuples', x, sort_direction, dim)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.