#' Count number of SNPs in each sample
#'
#' This function counts number of SNPs in each sample
#'
#' @param VAFdata data frame, mutation VAF
#' @param VAF_cutoff numeric, minimum VAF
#' @param n numeric, number of sample
#'
#' @usage numMutationperSample (VAFdata,VAF_cutoff,n)
#'
#' @return list, SNP count per sample
#'
#' @references
#' {TBA}
#'
#' @export
#'
numMutationperSample <- function(VAFdata,VAF_cutoff,n) {
SNPcount <- t(sapply(2:(n+1), function(i) sum(VAFdata[,i]>0&(VAFdata[,i]>VAF_cutoff))))
colnames(SNPcount) <- names(VAFdata)[2:(n+1)]
SNPcount
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.