Error when hydrate: PatientLevelPredictionStudy_v0.0.6.zip No such file or directory
nadavrap opened this issue · 2 comments
Hi,
I'm trying to hydrate a PLP package. I downloaded a JSON file and then execute:
specifications = Hydra::loadSpecifications('MyPatientlevelprediction.json')
Hydra::hydrate(specifications = specifications,
outputFolder = '~/MyPatientlevelprediction',
packageName = 'MyPatientlevelprediction')
Then I get the next error:
Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, :
java.lang.RuntimeException: java.io.FileNotFoundException: /home/joe/R/x86_64-koji-linux-gnu-library/4.0/Hydra/skeletons/PatientLevelPredictionStudy_v0.0.6.zip (No such file or directory)
Indeed, when I'm looking into the /home/joe/R/x86_64-koji-linux-gnu-library/4.0/Hydra/skeletons/
, I see a file PatientLevelPredictionStudy_v0.0.1.zip
but not PatientLevelPredictionStudy_v0.0.6.zip
.
I'm using the latest version of Hydra (0.3.0).
you may be able to "fix" this issue by editing the json and changing:
"skeletonVersion": "v0.0.6" -> "skeletonVersion": "v0.0.1"
However, the ATLAS json is very outdated for prediction - if you get your webApi address from ATLAS (from the top left side of the 'Configuration' button in ATLAS) then you can use R functions inside of the Skeleton package rather than using Hydra to create the Study Package. See https://github.com/OHDSI/SkeletonPredictionStudy/blob/main/extras/createDevelopmentPackageExample.R for an example. The Skeleton contains the renv that lets you install all the packages that work together (so if you follow https://github.com/OHDSI/SkeletonPredictionStudy/blob/main/STUDY-PACKAGE-SETUP.md you should have an environment that works for the Study Package).
Thank you @jreps , the first solution of editing the JSON file works.
However, the other proposed solution of using functions inside the Skeleton package seems more complicated, as it requires defining all the parameters of the analysis. Is there an option to extract all this info using the ROhdsiWebApi
package?
And another question: Is it the most appropriate way to generate such a package? I tried to download the package from ATLS, but it raised some errors, and @andtsouch suggested here to use Hydra.