SCDE mle upper and lower bound of the 95% CI per group

36 views
Skip to first unread message

Leon Fodoulian

unread,
May 17, 2017, 9:25:19 PM5/17/17
to SCDE
Hello,

I am trying to get the MLE for each gene per group, as well as the upper and lower bounds of their 95% CI. Using the scde.posterior function, I am able to get the posterior probabilities, and, if I'm not mistaken, I think that the MLE of each gene is the column name of the matrix corresponding to the highest posterior probability. I am using the following function for this purpose:

get.mle.scde <- function(x, output = NULL) {
  if (!is.data.frame(x)) {
    x <- data.frame(x)
  }
  
  z <- data.frame(mle = apply(x, 1, function(y){as.numeric(unlist(strsplit(colnames(x)[which.max(y)], split="X"))[2])}))
  
  if(!is.null(output)) {
    assign(output, z, envir = globalenv())
  } else {
    return(z)
  }
}

Is there by any chance an already implemented function in SCDE that can allow me to perform this same operation, but by also extracting the upper and lower bounds of the 95% CI of the MLE? If not, any hints on how can I upgrade the above listed function so that I can get these values?

Thank you very much for your help.

Best regards,
Leon

Reply all
Reply to author
Forward
0 new messages