ncats / RaMP-DB

28 stars 13 forks source link

Install failed #64

Closed lydiarck closed 9 months ago

lydiarck commented 9 months ago

I successfully loaded the mySQL database, but am getting an error when I try to download the R package from this website:

`> library(devtools)

install_github("ncats/RAMP-DB") Downloading GitHub repo ncats/RAMP-DB@HEAD Error in utils::download.file(url, path, method = method, quiet = quiet, : download from 'https://api.github.com/repos/ncats/RAMP-DB/tarball/HEAD' failed`

I haven't had problems using the install_github() function with other packages. Would appreciate any advice. Thanks!

johnbraisted commented 9 months ago

Hi,

Sorry for the delayed response. I've just tried the package installation and it worked for me. I installed on Windows and my current R version is 4.1.0. My devtools package is 2.4.3.

I get this message: install_github("ncats/RAMP-DB") Downloading GitHub repo ncats/RAMP-DB@HEAD ...then the next prompt is whether I want to update a bunch of packages.

I'm not getting the error that you see.

What operating system are you using? Is it Mac or Linux? I'm just wondering if the processes to fetch the package might be different.

I'm going to tests on linux with a more recent R version. Please send word if it starts to work for you. I suppose it could have been a network connection issue or could it have been an issue at github.

lydiarck commented 9 months ago

Hi, thanks so much for the quick response. I think it was a firewall issue of some sort - I was able to finagle some things this morning and get it downloaded and installed, thanks. (For the record, I'm working on RStudio in Windows right now, and the code worked as-is once I figured that out.)

I'm running into problems running the vignette, though. If I try this: myanalytes <- getAnalyteFromPathway(pathway="sphingolipid metabolism")

I get: Error: Expression #6 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'ramp.p.pathwayCategory' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by [1055]

I'm guessing this is an option I need to change in MySQL somehow, but I'm not sure where or how. (Full disclosure: I use PL/SQL on Oracle databases regularly, but this is my first time installing or using MySQL, so I'm probably missing some basic things.) If you have any advice here, that would be great.

johnbraisted commented 9 months ago

Hi, I commented back by email. The details are in the email. Rather than modifying mysql variables, it would be easiest for you to use our RaMP v3.0 in our 'sqlite' branch'. It's not been released yet but it will be very soon. Until it's an official release, you can use the version we have in the 'sqlite' branch. The details are in the email. Best, John

lydiarck commented 9 months ago

Hi John, Thanks! I didn’t get an email, unfortunately – would you be able to resend? Lydia

From: johnbraisted @.> Sent: Thursday, January 11, 2024 4:27 PM To: ncats/RaMP-DB @.> Cc: Lydia Kwee, Ph.D. @.>; Author @.> Subject: Re: [ncats/RaMP-DB] Install failed (Issue #64)

Hi, I commented back by email. The details are in the email. Rather than modifying mysql variables, it would be easiest for you to use our RaMP v3.0 in our 'sqlite' branch'. It's not been released yet but it will be very soon. Until it's an official release, you can use the version we have in the 'sqlite' branch. The details are in the email. Best, John

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/ncats/RaMP-DB/issues/64*issuecomment-1887992021__;Iw!!OToaGQ!v-L5EIXTXKZgiWgvtYXo17wRiJ1FSd2w1w_yml-prouGdNt__MauekePerqp6ruXgbz6e_qoFDnvjgxMS_OQK6IbPg4$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ADVDNA5B2YWHCJ3G5XMQRA3YOBKJRAVCNFSM6AAAAABBVDW2G6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBXHE4TEMBSGE__;!!OToaGQ!v-L5EIXTXKZgiWgvtYXo17wRiJ1FSd2w1w_yml-prouGdNt__MauekePerqp6ruXgbz6e_qoFDnvjgxMS_OQCpkECyQ$. You are receiving this because you authored the thread.Message ID: @.**@.>>

johnbraisted commented 9 months ago

Hi. I'll re-post here.

johnbraisted commented 9 months ago

I've seen this issue you report. I didn’t expect that to come up in our production release. The query would have to change. It should have been patched but somehow it isn’t in this release.

There are two options. If you go into the mysql command line client, you can set that parameter in mysql. Newer versions of MySQL will have this restriction set by default and that query will fail.

The other option that I would suggest is using our SQLite version that is close to going in to production. This RaMP version (v3.0.0) will download and manage a single ramp database as an 'sqlite' file. Queries are made directly on that SQLite file. There’s no DBMS to install or run.

Look at the readme at this location: https://github.com/ncats/RaMP-DB/tree/sqlite

Here’s a copy of the instructions from that page (note that it specifies a 'branch' using the 'ref' parameter when installing): [Code Snip]

Locally install RaMP

install.packages("devtools") library(devtools) install_github("ncats/RAMP-DB", ref="sqlite")

Load the package

library(RaMP)

initializes the RaMP database object, downloading and caching the latest SQLite database

if no version already exists in local cache.

rampDB <- RaMP()

note that you can use the following method to check database versions hosted in your

computer's local cache and databases that are available to download in our remote repository.

RaMP::listAvailableRaMPDbVersions()

using that list of available RaMP DB versions, one can specify the database version to use

if the selected version is not available on your computer, but is in our remote repository at GitHub,

the SQLite DB file will be automatically downloaded into local file cache.

RaMP is using the BiocFileCache package to manage a local file cache.

rampDB <- RaMP(version = "2.3.4")

[End Code Snip]

Note that the rampDB <- RaMP(version) will create an object that holds things like the path to the SQLite path. That means that most ramp methods will take this object as an argument to functions so that the 'db' connection (really a file path) can be used for queries. If you don't specify a ramp version it will download the latest version db file. Download and unzip can take 30-90 seconds to complete. This only needs to happen when you bring in a new db file version.

Here’s a vignette for this version that describes using this version. The main difference is that methods will have a 'db' parameter. https://ncats.github.io/RaMP-DB/RaMP_v3.0_SQLite_Vignette.html

The SQLite version will get you going. ** Oh, under installation instructions in the README, there’s a ‘Special Note’ that will report on a package compatibility issue between BiocFileCache an dbplyr that requires that you use BiocFileCache version 2.10.0. BiocFileCache version 2.8.0 will not have the patch for this issue.

packageVersion(‘BiocFileCache’) will report on your installed version.

Please send word if you run into issues with the BiocFileCache/dbplyr issue. It's a bit out of our control. Eventually BiocFileCache for windows will push out their 2.10.0 which fixes this. The instructions describe that you can download the source code for 2.10.0 and install that package directly. Note that this issue will only come up when calling methods. The packageVersion function above will allow you to verify your version. Again, you want BiocFileCache version 2.10.0, not the older 2.8.0.

Best, John

johnbraisted commented 9 months ago

The code formatting was a bit strange where the # made comments headers in the markdown, but you get the idea.

lydiarck commented 9 months ago

This worked perfectly. Thank you so much for all of this!

johnbraisted commented 9 months ago

Hi. I'm glad it worked for you. That package issue we sometimes see depends on OS and R version and is a bit out of our hands until Bioconductor pushes the latest patched version.

This SQLite version has been in development for several months. It's fairly stable and will become our main production release by March. The other thing in the mix for RaMP version 3.0 are some visualization support for some of the results, plots/graphs, and we're looking at optimizing pathway clustering, where two pathway data resources (like Wikipathways and Reactome) feature nearly identical pathways or completely duplicated pathways.

lydiarck commented 9 months ago

This is so great – I’ve wanted to try to use RaMP for a while, and I’m thrilled to get it up and running. It’s so nice. Ready to explore!

From: johnbraisted @.> Sent: Thursday, January 11, 2024 5:51 PM To: ncats/RaMP-DB @.> Cc: Lydia Kwee, Ph.D. @.>; Author @.> Subject: Re: [ncats/RaMP-DB] Install failed (Issue #64)

Hi. I'm glad it work. That package dependency depends on OS and R version and is a bit out of our hands until Bioconductor pushes the latest patched version.

This SQLite version has been in development for several months. It's fairly stable and will become our main production release by March. The other thing in the mix for RaMP version 3.0 are some visualization support for some of the results, plots/graphs, and we're looking at optimizing pathway clustering, where two pathway data resources (like Wikipathways and Reactome) feature nearly identical pathways or completely duplicated pathways.

— Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https:/github.com/ncats/RaMP-DB/issues/64*issuecomment-1888092906__;Iw!!OToaGQ!vFz0z8yTp9ND6Y7uxlOBYUILo0MciTgHmY2A4wV8GaJjBCjRNrCcK_u-braIZdzq3hvA699gW9BmHRoW8Ujk2n807SQ$, or unsubscribehttps://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/ADVDNA6LNL6FJBOWFASGTWLYOBUFZAVCNFSM6AAAAABBVDW2G6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBYGA4TEOJQGY__;!!OToaGQ!vFz0z8yTp9ND6Y7uxlOBYUILo0MciTgHmY2A4wV8GaJjBCjRNrCcK_u-braIZdzq3hvA699gW9BmHRoW8Ujk8LU6vtc$. You are receiving this because you authored the thread.Message ID: @.**@.>>

johnbraisted commented 9 months ago

Sounds great. Thanks for the feedback. I'll close out this issue thread, but if you have new questions, just send word. Thanks.