OHDSI Home | Forums | Wiki | Github

Achilles install issue

Hi,

I am trying to install Achilles in Windows. Following is what I did in R:

install.packages(“devtools”)
library(devtools)
install_github(“ohdsi/SqlRender”)
install.packages(“RJDBC”,dep=TRUE)
install.packages(“drat”)
drat::addRepo(“OHDSI”)
install.packages(“DatabaseConnector”, INSTALL_opts="–no-multiarch")

After that, I run this:
install_github(“ohdsi/Achilles”)

Here is the error that I get:
ERROR: dependency ‘DatabaseConnector’ is not available for package ‘Achilles’

  • removing ‘C:/Program Files/R/R-3.3.3/library/Achilles’

Could you please help?

Could you tell us the output that was generated by

install.packages("DatabaseConnector", INSTALL_opts="--no-multiarch")

Maybe there’s a clue there on what went wrong.

You can also try installing DatabaseConnector directly from GitHub:

install_github("ohdsi/DatabaseConnector")

Thanks!

At the beginning, I exactly follow the link below:

install.packages(“devtools”)

library(devtools)

install_github(“ohdsi/SqlRender”)

install_github(“ohdsi/DatabaseConnector”)

install_github(“ohdsi/Achilles”)

But, I got errors when I was trying to run “install_github(
“ohdsi/DatabaseConnector”)”.

Following is the ERROR, Could you please help?

For some reason install_github doesn’t always install all indirect dependencies. In this case it is missing fastmatch (which I think is required by ffbase which is required by DatabaseConnector).

Try installing it manually yourself:

install.packages("fastmatch")

and then try to reinstall DatabaseConnector.

Thanks so much!! It is working.

I am trying to run the following command in R. (I already tested the
PostgreSQL DB connect by using “querySql(conn,“SELECT COUNT(*) FROM
ohdsi.person”)”. It works and I get the right number)

achillesResults ← achilles(connectionDetails, cdmDatabaseSchema=“cdm_v5”,
resultsDatabaseSchema=“results”, sourceName=“ohdsi”, cdmVersion = “5”,
vocabDatabaseSchema=“ohdsi”)

Here is the error message:

Here is my PostgreSQL OMOP database. Did I do sth wrong?

No, vocabulary_database_schema is a token that is passed into the achilles call that sets the schema for the vocabulary tables (in the case where a vocabulary is shared across multiple cdms). However, it should default to cdm_database_schema, and then be replaced by some value…in other words, you shouldn’t see that value anywhere in the executed SQL.

So, for some strange reason that isn’t being replaced somewhere, very interesting, I’ll look into this.

-Chris

Also, from your screenshot, it looks like you have a postgresql datbase named OHDSI, and within that you have a schema called ‘ohdsi’ and inisde the ‘ohdsi’ schema you have your CDM tables, therefore, your parameters should be:

cdmDatabaseSchema="ohdsi", resultsDatabaseSchema="ohdsi", sourceName="ohdsi", cdmVersion = "5", vocabDatabaseSchema="ohdsi"

If you want to separate the results out into it’s own schema, you’ll need to create a new schema for that, and then you can set the resultsDatabaseSchema to that schema in the achilles call.

Ok, so I am checking the sourcecode, and in both cases of executing the Achilles_v5.sql and achillesHeel_v5.sql, it does a find replace for that token and replaces it with the paramater passed in (or defaults to cdmDatabaseSchema).

I think you might be running a very old version of achilles. Could you ensure that you have gotten latest from git?

-Chris

Thanks so much ALL, it is working, and here is what I learned:

Each time when you get an error, there is an error report generated. In my
computer, it is in C:/Users/you account/Document/ folder. It has very
useful information there.

As Chris just posted, here is the changes:

achillesResults <- achilles(connectionDetails, cdmDatabaseSchema=“ohdsi”,
resultsDatabaseSchema=“results”, sourceName=“ohdsi”, cdmVersion=“5”,
vocabDatabaseSchema=“ohdsi”)

  1.  My OMOP DB is in “ohdsi” schema and the vocabDatabase is in the
    

same “ohdsi” schema. If they are in different schema, you may have to put
them in differently.

  1.  I created an “results” schema to hold the results, but if you want
    

your result to be the same schema as your OMOP, you do not have to create
another schema.

It is running, I did not see any result yet…

Thanks Again!

Ok, fingers crossed!

Just one thing I’d correct about #1 above: “My OMOP DB is in ‘ohdsi’ schema”… schemas live within databases, not the otherway around, I’m sure that’s what you meant but I just wanted to clarify that from top-container to bottom it goes Database -> Schema -> Tables. (DBs contain Schemas, Schemas contains Tables). Just wanted to clarify that if we need to debug further and we have to draw a distinction between the database, the schemas and the individual tables.

Thanks Chris, you are right, the “ohdsi” is the schema not the DB.It is Database → Schema → Tables :smile:

By the way, I get the result and I am generating the Json file now.

Hi,

I generated all the Json files. I cannot use AchillesWed to view the report.

Here is what I did:

  1.  copied them to the data folder
    
  2.  copied the following files/folder (AchillesWeb) to my local
    

C:\inetpub\wwwroot directory.

  1.  Create datasources.json file and save it at the “data” folder
    
  2.  Go to URL: http://localhost/AchillesWeb/index.html
    
  3.  It keeps loading and never get results to display.
    

Could you please help?

Means there’s an error, you can open up the console (in chrome ctrl-shift-i) to see what error is reported?

Hi,

Here is what I get:

Ok, so it can’t find the datasources.json file going to localhost/achillesweb/data/datasources.json. Any reason why?

@devin. any update on this?

get back to this again. It is working now. The solution is to add json file extension type in MIME Types.

Thanks!

t