R/RcppExports.R

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

#' Check whether the parameter F is within the appropriate range
#' 
#' @param turboF F (converted for turboEM)
#' @param fdim a vector specifying the number of possible values for each mutation signature
#' @param signatureNum the number of mutation signatures
boundaryTurbo_F <- function(turboF, fdim, signatureNum) {
    .Call('_pmsignature_boundaryTurbo_F', PACKAGE = 'pmsignature', turboF, fdim, signatureNum)
}

#' Check whether the parameter Q is within the appropriate range
#' 
#' @param turboQ Q (converted for turboEM)
#' @param signatureNum the number of mutation signatures
#' @param sampleNum the number of cancer genomes
boundaryTurbo_Q <- function(turboQ, signatureNum, sampleNum) {
    .Call('_pmsignature_boundaryTurbo_Q', PACKAGE = 'pmsignature', turboQ, signatureNum, sampleNum)
}

#' Convert the parameter Q so that turboEM can treat
#' 
#' @param vQ Q (converted to a vector)
#' @param signatureNum the number of mutation signatures
#' @param sampleNum the number of cancer genomes
convertToTurbo_Q <- function(vQ, signatureNum, sampleNum) {
    .Call('_pmsignature_convertToTurbo_Q', PACKAGE = 'pmsignature', vQ, signatureNum, sampleNum)
}

#' Convert the parameter F so that turboEM can treat
#' 
#' @param vF F (converted to a vector)
#' @param fdim a vector specifying the number of possible values for each mutation signature
#' @param signatureNum the number of mutation signatures
#' @param isBackground the logical value showing whether a background mutaiton features is included or not
convertToTurbo_F <- function(vF, fdim, signatureNum, isBackground) {
    .Call('_pmsignature_convertToTurbo_F', PACKAGE = 'pmsignature', vF, fdim, signatureNum, isBackground)
}

#' Restore the converted parameter Q for turboEM
#' 
#' @param turboQ Q (converted for turboEM)
#' @param signatureNum the number of mutation signatures
#' @param sampleNum the number of cancer genomes
convertFromTurbo_Q <- function(turboQ, signatureNum, sampleNum) {
    .Call('_pmsignature_convertFromTurbo_Q', PACKAGE = 'pmsignature', turboQ, signatureNum, sampleNum)
}

#' Restore the converted parameter F for turboEM
#' 
#' @param turboF F (converted for turboEM)
#' @param fdim a vector specifying the number of possible values for each mutation signature
#' @param signatureNum the number of mutation signatures
#' @param isBackground the logical value showing whether a background mutaiton features is included or not
convertFromTurbo_F <- function(turboF, fdim, signatureNum, isBackground) {
    .Call('_pmsignature_convertFromTurbo_F', PACKAGE = 'pmsignature', turboF, fdim, signatureNum, isBackground)
}

#' Update the auxiliary parameters theta and normalize them so that the summation of each group sums to 1 (E-step),
#' also calculate the current log-likelihood value
#' 
#' @param vPatternList The list of possible mutation features (converted to a vector)
#' @param vSparseCount The table showing (mutation feature, sample, the number of mutation) (converted to a vector)
#' @param vF F (converted to a vector)
#' @param vQ Q (converted to a vector)
#' @param fdim a vector specifying the number of possible values for each mutation signature
#' @param signatureNum the number of mutation signatures
#' @param sampleNum the number of cancer genomes
#' @param patternNum the number of possible combinations of all the mutation features
#' @param samplePatternNum the number of possible combination of samples and mutation patternns
#' @param isBackground the logical value showing whether a background mutaiton features is included or not
#' @param vF0 a background mutaiton features
updateTheta_NormalizedC <- function(vPatternList, vSparseCount, vF, vQ, fdim, signatureNum, sampleNum, patternNum, samplePatternNum, isBackground, vF0) {
    .Call('_pmsignature_updateTheta_NormalizedC', PACKAGE = 'pmsignature', vPatternList, vSparseCount, vF, vQ, fdim, signatureNum, sampleNum, patternNum, samplePatternNum, isBackground, vF0)
}

#' Calculate the value of the log-likelihood for given parameters
#' 
#' @param vPatternList The list of possible mutation features (converted to a vector)
#' @param vSparseCount The table showing (mutation feature, sample, the number of mutation) (converted to a vector)
#' @param vF F (converted to a vector)
#' @param vQ Q (converted to a vector)
#' @param fdim a vector specifying the number of possible values for each mutation signature
#' @param signatureNum the number of mutation signatures
#' @param sampleNum the number of cancer genomes
#' @param patternNum the number of possible combinations of all the mutation features
#' @param samplePatternNum the number of possible combination of samples and mutation patternns
#' @param isBackground the logical value showing whether a background mutaiton features is included or not
#' @param vF0 a background mutaiton features
getLogLikelihoodC <- function(vPatternList, vSparseCount, vF, vQ, fdim, signatureNum, sampleNum, patternNum, samplePatternNum, isBackground, vF0) {
    .Call('_pmsignature_getLogLikelihoodC', PACKAGE = 'pmsignature', vPatternList, vSparseCount, vF, vQ, fdim, signatureNum, sampleNum, patternNum, samplePatternNum, isBackground, vF0)
}

#' Update the parameter F and Q (M-step in the EM-algorithm)
#' 
#' @param vPatternList The list of possible mutation features (converted to a vector)
#' @param vSparseCount The table showing (mutation feature, sample, the number of mutation) (converted to a vector)
#' @param vF F (converted to a vector)
#' @param vQ Q (converted to a vector)
#' @param fdim a vector specifying the number of possible values for each mutation signature
#' @param signatureNum the number of mutation signatures
#' @param sampleNum the number of cancer genomes
#' @param patternNum the number of possible combinations of all the mutation features
#' @param samplePatternNum the number of possible combination of samples and mutation patternns
#' @param isBackground the logical value showing whether a background mutaiton features is included or not
#' @param vF0 a background mutaiton features
updateMstepFQC <- function(vPatternList, vSparseCount, nTheta, fdim, signatureNum, sampleNum, patternNum, samplePatternNum, isBackground) {
    .Call('_pmsignature_updateMstepFQC', PACKAGE = 'pmsignature', vPatternList, vSparseCount, nTheta, fdim, signatureNum, sampleNum, patternNum, samplePatternNum, isBackground)
}
friend1ws/pmsignature documentation built on May 16, 2019, 3:27 p.m.