saezlab / mistyR

Multiview Intercellular SpaTial modeling framework
https://saezlab.github.io/mistyR/
GNU General Public License v3.0
48 stars 11 forks source link

[BUG] Error in collect_results, performance file not being read correctly #26

Closed ggruenhagen3 closed 1 year ago

ggruenhagen3 commented 2 years ago

When running the misty Seurat tutorial, I got an error in run_misty_seurat that said intra.RMSE not found in .data. After doing some digging I found that performance.txt file was not being read correctly. It would be read in as a single column. I found that changing readr::read_table to readr::read_table2 in collect_results fixed my problem. I am posting this bug for others that might experience this same problem and I suggest readr::read_table2 as a potential fix.

Error Message: Generating paraview Progress: ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 100% Generating paraview Progress: ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 100% Training models Progress: ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 100% Collecting improvements Progress: ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 100%Error in mutate_cols(.data, ..., caller_env = caller_env()) : Problem with mutate() column gain.RMSE. ℹ gain.RMSE = 100 * (.data$intra.RMSE - .data$multi.RMSE)/.data$intra.RMSE. ✖ Column intra.RMSE not found in .data. Caused by error in .data$intra.RMSE: ! Column intra.RMSE not found in .data.

Suggested Fix: mistyR/R/utils.R line 138: change readr::read_table to readr::read_table2

System information:

jtanevski commented 1 year ago

readr::read_table2 has been deprecated and renamed to readr::read_table since readr version 2.0.0. The use of this function in mistyR reflects these changes. Within the Seurat vignette, the collection of results now runs correctly.

YaobangWang commented 1 year ago

Thank ggruenhagen3 for your effort of finding and solving this problem. I occured this problem before. Now, the MISTy run successfully after changing readr::read_table to readr::read_table2. I think this may have something to do with the version of the R package that the user has installed. I would like to thank ggruenhagen3 again!