kgori / sigfit

Flexible Bayesian inference of mutational signatures
GNU General Public License v3.0
33 stars 8 forks source link

Data set 'cosmic_signatures_v3' not found #53

Closed kmegq closed 3 years ago

kmegq commented 3 years ago

Hello,

I have installed Sigfit in a Conda environment on our servers. When I try to load the COSMIC signatures, I am getting the error: In data("cosmic_signatures_v3") : data set 'cosmic_signatures_v3' not found

Is this a problem with my installation? I do see "cosmic_signatures_v3" listed if I just run: data(package="sigfit"), e.g.:

Data sets in package 'sigfit':

best (sigfit_vignette_data)

cosmic_signatures_v2    
cosmic_signatures_v3    
cosmic_signatures_v3_strand

(I've only pasted the beginning of the list here.)

Thank you for your help!

Best, Kate

kgori commented 3 years ago

Hi Kate,

Sorry you're having trouble. Let's start with a simple approach. I think the data() function will only search among the loaded packages, so make sure you have loaded sigfit before looking for the cosmic data:

library(sigfit)
data("cosmic_signatures_v3")

Alternatively, you can tell data() which package you want the data from:

data("cosmic_signatures_v3", package = "sigfit")

Hopefully one of these approaches will work for you. If not, as a last resort, you can call .libPaths() to find where R has installed its packages on your system. Under one of these paths you should find the file sigfit/data/cosmic_signatures_v3.RData, and you can load this directly.

Please let me know if you have to use the hacky last resort, though. There might be some conda-related installation quirk that I don't know about.

Best, Kevin

kmegq commented 3 years ago

Dear Kevin,

Thank you so much for your suggestions! The first two approaches didn't work, so I looked for the path to the data, and it seems like maybe I only have a list rather than the files themselves: /path/sigfit/lib/R/library/sigfit/data/datalist

The "datalist" file is the only thing in the "data" directory. I don't see the RData files. Is it possible they didn't install for some reason?

Best, Kate

kgori commented 3 years ago

Hi Kate,

It looks like something's gone wrong in your installation, because there should be lots of .RData files present in that directory, as well as the datalist. You could download this missing files directly from the repository, but I think it would be better if you could try reinstalling sigfit, and see if this fixes the missing data problem. Try using exactly this command:

remove.packages("sigfit")
devtools::install_github("kgori/sigfit", build_vignettes = TRUE,
                     build_opts = c("--no-resave-data", "--no-manual"))

If that still doesn't work, get back in touch and let me know if you are on Windows, Mac or Linux, maybe there's a platform-specific issue I haven't considered.

Best, Kevin

kmegq commented 3 years ago

Thank you so much, Kevin! Reinstalling worked! I don't know what went wrong the first time.

Best, Kate