RfastOfficial / Rfast

A collection of Rfast functions for data analysis. Note 1: The vast majority of the functions accept matrices only, not data.frames. Note 2: Do not have matrices or vectors with have missing data (i.e NAs). We do no check about them and C++ internally transforms them into zeros (0), so you may get wrong results. Note 3: In general, make sure you give the correct input, in order to get the correct output. We do no checks and this is one of the many reasons we are fast.
145 stars 19 forks source link

Rfast::Rowsort #71

Closed faeneeR closed 1 year ago

faeneeR commented 1 year ago

I'd like to ask whether you could provide a Rfast version that contain the Rowsort function because this function is needed when infering the putative gene regulatory network (GRN) in the bigScale2 package. AND here is the error:

results.ctl=compute.network(expr.data = expr.ctl,gene.names = gene.names) [1] "Pre-processing) Removing null rows " [1] "Discarding 4182 genes with all zero values" [1] "PASSAGE 1) Setting the size factors ...." [1] "PASSAGE 2) Setting the bins for the expression data ...." [1] "Creating edges..." [1] "47.2 % of elements < 10 counts, therefore Using a reads compatible binning" [1] "PASSAGE 3) Storing in the single cell object the Normalized data ...." [1] "PASSAGE 4) Computing the numerical model (can take from a few minutes to 30 mins) ...." [1] 22089 1313 [1] "I remove 1349 genes not expressed enough" [1] "Calculating normalized-transformed matrix ..." [1] "Computing transformed matrix ..." [1] "Converting sparse to full Matrix ..." [1] "Normalizing expression gene by gene ..." [1] "Calculating Pearson correlations ..." [1] "Clustering ..." [1] "Calculating optimal cut of dendrogram for pre-clustering" [1] "We are here" [1] "Pre-clustering: cutting the tree at 6.00 %: 15 pre-clusters of median(mean) size 84 (87.5333)" [1] "Computed Numerical Model. Enumerated a total of 1.11135e+09 cases"
[1] "PASSAGE 5) Clustering ..." [1] "Clustering cells down to groups of approximately 50-250 cells"

Recursive clustering, beginning round 1 ....[1] "Analyzing 1313 cells for ODgenes, min_ODscore=2.00" Error: 'rowSort' is not an exported object from 'namespace:Rfast'

And I have no where to find the Rfast version containing Rowsort function in CRAN. So I wonder if you could offer the loading url.

ManosPapadakis95 commented 1 year ago

We do have a rowSort for numerical matrices in Rfast. I don't know what you mean by "providing a version". What version of Rfast do you have?

faeneeR commented 1 year ago

My Rfast version is 1.8.5. But it seems that it doesn't contain the rowSort function.

ManosPapadakis95 commented 1 year ago

Then update your Rfast! we have 2.0.7 version and now it will be realesed the 2.0.8

faeneeR commented 1 year ago

Thanks for your work.

But it confused me that when I run the function compute.network() in bigSCale2 package, this process needs the Rfast::rowVars. So I have to downgrade the Rfast package back to earlier versions. Details can be seen in https://github.com/iaconogi/bigSCale2/issues/36.

So I changed my Rfast version into 1.8.5.

But later, I met another error when running the function compute.network() in bigSCale2 package. It is "Error: 'rowSort' is not an exported object from 'namespace:Rfast'".

Now I am so confused.

ManosPapadakis95 commented 1 year ago

The problem is not that there isn't any rowSort function, but the usage of the depricated argument. This is not our fault. I have fix the issue and submit a change to bigScale2 package. You have to wait until the maintainer accept it. Although, you can just edit the file by your self and run the function.

faeneeR commented 1 year ago

Thanks for your generous help!

It would be so nice if you could tell me how to edit the file. Thanks a lot!

ManosPapadakis95 commented 1 year ago

Just take the code of compute.network, search where the suma = NULL is, remove it and run the code in R. If you don't understand what I say it is better to wiati until the maintainers accept my pull request.

faeneeR commented 1 year ago

Thanks a lot!!!

xiaoli-0709 commented 2 weeks ago

Thanks a lot!!!

I met the same problem again! I try to delete the code( suma = NULL ) in Functions.R at line 3928 and intall the packages again .But it still exits. Do you have any suggestions?