sunduanchen / Scissor

Scissor package
GNU General Public License v3.0
179 stars 31 forks source link

Error for big dataset #24

Open xiaoyaohao opened 2 years ago

xiaoyaohao commented 2 years ago

Hi! Thank you for the nice tools. I was using scissor for a big dataset, it seems the "as.matrix" in "network <- as.matrix(sc_dataset@graphs$RNA_snn)" didn't suit for a big sparse matrix, so I changed the ‘as.matrix’ to suit for big dataset, the matrix I got is the same as using "as.matrix" when the data is not too large. The Omega seems to be right, However, after the 'W=OmegaC(Omega, sgn1); W$loc=W$loc+1', the W seems to be all zeros. In fact I was not familiar with Rcpp, so I was wondering whether there is something like 'as.matrix' in 'OmegaC' which is not suitable for big dataset? Can you help to figure out what happend there, Thanks a lot!

qi-shen commented 2 years ago

I have the same error

loganylchen commented 2 years ago

Same issue here.

xiaoyaohao commented 2 years ago

I have the same error

Maybe you can change "as.matrix" in function "Scissor" as "as_matrix" ,like this: as_matrix.txt scissor_change.txt

you can change the postfix of the two file to .R and source them in R.

If it works, hope you can inform me about it, Thanks.

xiaoyaohao commented 2 years ago

Same issue here.

Maybe you can try it, If it works, hope you can inform me about it, Thanks.

loganylchen commented 2 years ago

Hi @xiaoyaohao ,

Thanks for providing help. I am wondering if you could make a PR to fix this issue or you could provide your modified forks?

best,

jxshi commented 2 years ago

I have the same error

Maybe you can change "as.matrix" in function "Scissor" as "as_matrix" ,like this: as_matrix.txt scissor_change.txt

you can change the postfix of the two file to .R and source them in R.

If it works, hope you can inform me about it, Thanks.

I encountered the same issue and reported it here. I tried the code and it worked. Thanks!

Best, Jianxiang

Shubhra1994 commented 2 years ago

I have the same error

Maybe you can change "as.matrix" in function "Scissor" as "as_matrix" ,like this: as_matrix.txt scissor_change.txt

you can change the postfix of the two file to .R and source them in R.

If it works, hope you can inform me about it, Thanks.

I tried this, still does not work.

chenx9 commented 2 years ago

我有同样的错误

也许您可以将函数“Scissor”中的“as.matrix”更改为“as_matrix”,如下所示: as_matrix.txt scissor_change.txt

您可以将两个文件的后缀更改为 .R 并在 R 中获取它们。

如果可行,希望您能告诉我,谢谢。

I tried this method and still got the error.

hyjforesight commented 1 year ago

I have the same error

Maybe you can change "as.matrix" in function "Scissor" as "as_matrix" ,like this: as_matrix.txt scissor_change.txt

you can change the postfix of the two file to .R and source them in R.

If it works, hope you can inform me about it, Thanks.

@xiaoyaohao You're genius! It works. Thank you!