Closed ankushs0128 closed 4 years ago
installing updated Liger solves the issue
Installing github version didn't fixed the issue for me. I just ended up writing R function. Just logging in case it would be useful for anyone.
MakeFeatureMatrix <- function(bedmat, barcodes){
require(dplyr)
bedmat = genes.bc
gc_pairs = separate_rows(select(bedmat, c("V4", "V7")), V7, sep = ";")
gc_pairs = subset(gc_pairs, V7 %in% barcodes)
genes = genes.bc$V4
gc_pairs$gene_idx = match(gc_pairs$V4, genes)
gc_pairs$bc_idx = match(gc_pairs$V7, barcodes)
output = Matrix::sparseMatrix(i = gc_pairs$gene_idx,
j = gc_pairs$bc_idx,
x = 1L,
dims = c(length(genes), length(barcodes)),
dimnames = list(genes, barcodes)
)
return(output)
}
Hi Jayoung @jykr , thanks for your reply. LIGER is now available on CRAN, you can install this verison which should fix this problem as well.
makeFeaturematrixfunctionality not available
gene.counts <- makeFeatureMatrix(genes.bc, barcodes) Error in makeFeatureMatrix(genes.bc, barcodes) : could not find function "makeFeatureMatrix"
gene.counts <- liger:::makeFeatureMatrix(genes.bc, barcodes) Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : object 'makeFeatureMatrix' not found