oxford-pharmacoepi / MegaStudy

4 stars 2 forks source link

Problem with DUS step (DrugExposureDiagnosis) #68

Open JavierGorri opened 4 months ago

JavierGorri commented 4 months ago

@Theresa. I open a new issue, just to be clear. We have solve the old one (Problem with DUS step) We have run part of the code (we have done "Indications concepts" and "Indication cohort") but we have a problem with "Drug concepts". This is the problem with "DrugExposureDiagnosis".

image

@JavierGorri

tiozab commented 4 months ago

@JavierGorri thank you for opening this issue. However, I do not see the error message and where the error occured from this screenshot (it is not displaying fully).

@D229463 Are you sure the renv worked? DrugExposureDiagnostics is not part of the DUS renv.

D229463 commented 4 months ago

@tiozab I try to explain it in more detail. We made three attempts:

  1. First one with renv original libraries (as you say DrugExposureDiagnostics is not part of them) and the error was a problem with our database space. We solved it (adding more)

  2. The second one with renv original libraries too and with more space in database and error was

_> source(here("drugs.R")) Error in checkDbType(cdm = cdm, type = "cdmreference", messageStore = errorMessage) : no se pudo encontrar la función "checkDbType"

  1. The third one trying to look up which library the checkDbType function could be in. As you can see we tried it installing DrugExposureDiagnostics but our attemp was unsuccesfull... the error was the same

I add some logs:

File log that is found in storage folder: BARDENA_log.txt

Trace of the attempts 1 and 2: Trace_Step_1.txt Trace_Step_2.txt

Attempt 3 image (it´s the image of @JavierGorri comment) Attempt3

Thanks and regards

tiozab commented 4 months ago

Thanks @D229463 can you show me screenshot where the packages tab shows the "codelistgenerator" package please?

D229463 commented 4 months ago

Sure, we have the 2.2.2 version

image

tiozab commented 4 months ago

great, because the checkDbType function comes from Codelistgenerator, can you show me the libraries you load in your codetorun script? @D229463

D229463 commented 4 months ago

yea

image

tiozab commented 4 months ago

@D229463 the error does not make sense because checkDbType is a function from CodelistGenerator and no one has had this error before. https://darwin-eu.github.io/CodelistGenerator/articles/a04_Vocab_based_codelists.html can you try whether you can reproduce the vignette with your data?

D229463 commented 4 months ago

@tiozab ok, yestyerday we had run the script from the begginig with the space added (now it´s still running) and when it finishes I try to reproduce the vignette

tiozab commented 4 months ago

@D229463 ah I thought your code stopped at the drug cohort generation. That means this error was resolved?

D229463 commented 4 months ago

No, we have tried it again (from the beginning avoiding re-executions)... but as I see in the log it is still in step "GENERATE INDICATION CONCEPTS" (last time it needed 13 hours in this step)

D229463 commented 4 months ago

Bad news... I try the first step of the vignette and error is the same

image

Do you want me to re-install the CodelistGenerator?

tiozab commented 4 months ago

@edward-burn can you have a look at this please?

edward-burn commented 3 months ago

@D229463 can I just confirm, if you clear your environment and restart r, does the following work

cdm <- mockVocabRef() getDrugIngredientCodes(cdm = cdm, name = "Adalimumab")

?

D229463 commented 3 months ago

Yea, it work well

cdm <- mockVocabRef() getDrugIngredientCodes(cdm = cdm, name = "Adalimumab") $adalimumab [1] 10 13

D229463 commented 3 months ago

Now, I have tried to launch the vignette that tiozab told us before and the error has changed...Does it make sense?

image

tiozab commented 3 months ago

@D229463 Not really, but with everything anew, please try the DUS step once more with the 1.4 file and then we see where we get :-) we do not assess acetaminophen so maybe there is just s.th. wrong with that ingredient

D229463 commented 3 months ago

We have run the script several times and it fails to create temporary tables on step "GENERATE DRUG CONCEPTS"

I add file logs:

  1. File log that is found in storage folder: BARDENA_log.txt

  2. execution trace: script_log.txt

It has always failed in the "Created a temporary table" number 52. Log says "subindex out of bounds" but I don't know what index it is referring to

tiozab commented 3 months ago

@D229463 drug 52 is certolizumab. We have had problems with this drug in other places. I have modified the drugs.R script for certolizumab and cytarabine (the two drugs causing problems), can you replace this R script in your repo with this version and try again from "GENERATE DRUG CONCEPTS" drugs.zip

D229463 commented 3 months ago

we have executed the new drugs.R file but we get the same error in the same "create table" :-(

image

we have check that the error is in first step of drugs.R error_step_drugs.txt

tiozab commented 3 months ago

@edward-burn may it be a memory issue?

JavierGorri commented 3 months ago

@tiozab What can we do now? Thanks

D229463 commented 2 months ago

Hi, are there some news about the error? thanks!

tiozab commented 2 months ago

@D229463 sorry I was on holiday. @edward-burn need your help here!