rcannood / SCORPIUS

Linear trajectory inference for single-cell RNA-seq
http://rcannood.github.io/SCORPIUS/
58 stars 16 forks source link

Not enough memory at reduce_dimentionality step #33

Open alicekao1118 opened 3 years ago

alicekao1118 commented 3 years ago

Before the reduce_dimentioality step, I've done several steps to change my input dataset:

  1. Using gather() to transform my dataset to the correct format ( 39,543,942 entries, 3 total columns)
  2. Before proceeding to reduce dimentionality sfunction, I transformed my expression data to "matrix" type
  3. Then my program stops here, telling that it needs 294.6GB to process the vectors.

Anyone has any suggestions for this?

Thank you so much!!

rcannood commented 3 years ago

Can you show me the head of your dataset? You may want to run Matrix::sparseMatrix(...) to create a sparse matrix from your input data.

alicekao1118 commented 3 years ago

Do you mean instead of using matrix, I can substitute for sparseMatrix?

Attach the screenshot for my head of the dataset, also the code below.

Screen Shot 2021-08-02 at 4 11 38 PM

` data2 <- read.table("~/Downloads/Exp_BM_cluster_EC.txt", row.names = NULL)

library (tidyr) data_long <- gather(data2, key = "sample_info", value = "expression", 2:1290) (coerce1 <- as.matrix(data_long$expression))

space <- reduce_dimensionality(coerce1, ndim = 2) traj <- infer_trajectory(space) `