Open gmurtaza404 opened 6 months ago
Here's an example script (please refer to https://gist.github.com/xie186/332eff13dcac50f101f91494402b4bd1#file-csv2mex-r for more details).
library(Matrix)
# generate single-cell RNA seq data
count <- read.csv(input_matrix, header=T, row.names = 1)
gbm <- t(count)
# save sparse matrix
sparse.gbm <- Matrix(gbm , sparse = T )
writeMM(obj = sparse.gbm, file="matrix.mtx")
# save genes and cells names
write(x = rownames(gbm), file = "genes.txt")
write(x = colnames(gbm), file = "barcodes.tsv")
Can you share any scripts that you have to convert an arbitrary scRNA-seq cell-by-gene matrix into the format your model inputs?
Thanks