R/prepBarcode.R

prepBarcode <- function(x) { 

  xx <- assays(x)$barcode
  if (any(is.na(xx))) {
    message('Imputing NAs...')
    xx <- impute.knn(xx)$data
  }
  rownames(xx) <- rownames(x)
  colnames(xx) <- colnames(x)
  return(xx)
        
}
RamsinghLab/ozymandias documentation built on May 9, 2019, 9:21 a.m.