Giter Site home page Giter Site logo

studyprotocols's People

Contributors

boycer avatar jduke99 avatar jmbanda avatar jreps avatar jswerdel avatar kmkostka avatar msuchard avatar rkboyce avatar schuemie avatar yuxitian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

studyprotocols's Issues

Alendronate study code fails with 0 counts in patients

Constructing treatment and comparator cohorts
^M  |              
     ^M  |        
     |   0%^M  |  
                 ^M  |===================================
                 |  50%^M  |
                             ^M
|======================================================================|
100%
Executing SQL took 2.02 secs
Fetching cohorts from server
Error in data.frame(description = "Original cohorts", treatedPersons =
rawCount$exposedCount[rawCount$treatment ==  :
 arguments imply differing number of rows: 1, 0
Calls: execute ... FUN -> do.call -> getDbCohortMethodData -> data.frame
Execution halted

Study 1 - Treatment Pathways - Version 2 minCellCount 2 - Postgres - sql code issues

Greetings,

It seems like the SQL code got a bit garbled up between lines 2500 and 2550 (roughly, it changes depending on Depression, HTN or T2DM SQL files. Some of the statements are throwing errors when I try to execute them AS-IS. I am attaching my fixed version of the files which I fixed using adapting the SQL code found on the MSSQL server version of the files. I successfully ran these files on my Postgres server and calculates the basic summary counts perfectly. Overall, the issue is with the first step of the attrition tables (0. count total persons for attrition table). This might also be found in the Version 2 minCellCount 1 files which I haven't looked at yet.

This seems to be an issue with the Oracle version of the files as well (I haven't checked the other ones) and only the MSSQL server ones seem to be complete. Was the code translated using some kind of automated software package?

Dropbox link to fixed files:

https://dl.dropboxusercontent.com/u/21004832/Study1-V2-MC2-fixedfiles.zip

CohortCount.csv generation - bug fix

The settings file that allows generation of several cohort using atlas ID is great.
I used that for a cancer study referenced here
http://forums.ohdsi.org/t/how-to-do-quick-feasibility-counts-from-r-given-public-server-cohort-definition-url-link/2831/3?u=vojtech_huser

It worked fine for 1 cohort.

With two cohorts, I was getting always only one cohort back.
I found a bug in the code:

On this line

https://github.com/OHDSI/StudyProtocols/blob/master/AlendronateVsRaloxifene/R/CreateCohorts.R#L79

part of code that has [i] must be removed.

bad code (current)
counts <- merge(counts, data.frame(cohortDefinitionId = cohortsToCreate$cohortId[i],
cohortName = cohortsToCreate$name[i]))

good code (fixed)
counts <- merge(counts, data.frame(cohortDefinitionId = cohortsToCreate$cohortId,
cohortName = cohortsToCreate$name))

Package version of FeatureExtraction and CohortMethod

Can anyone tell me which version of FeatureExtraction and CohortMethod was used in this study protocol?
As Feature Extraction becomes upgraded, I don't think current this study can run with the current Feature Extraction or CohortMethod package. (Mine too. I cannot remember the version of the package I used....)

Thanks!

KeppraAngioedema SQL potential issue

Looks like the SQL cohort code has the restriction of invalid_reason = NULL. Depending on the RDMBS flavor and how the vocabulary files are loaded this will be an issue. Loading the Athena files as-is on PostgreSQL will make invalid reason ='' rather than null.

While this is an easy fix, it might be worth making a note in the vocabulary load instructions that this should be the case. Otherwise, the study runs in a few seconds and gets no patients.

[OHDSI Large-Scale Population-Level Evidence Generation study] int size issue

Hello. I'm seojeong, a graduate student of Ajou university in Korea.
I have a issue while I tried to run the GitHub code proposed by this study.
When I executed codes like below,

           ---------------------------------------------------------------------------------------
           execute(connectionDetails = connectionDetails,
               cdmDatabaseSchema = "[Camel_DB].[dbo]",
               #oracleTempSchema = NULL,
               workDatabaseSchema = "[scratch_Shin_SJ].[dbo]",
               studyCohortTable = "ohdsi_depression_cohorts",
               exposureCohortSummaryTable = "ohdsi_depression_exposure_summary",
               workFolder = "c:/temp/LargeScalePopEst",
               maxCores = 4,
               createCohorts = TRUE,
               fetchAllDataFromServer = TRUE,
               injectSignals = TRUE,
               generateAllCohortMethodDataObjects = TRUE,
               runCohortMethod = TRUE)
           ----------------------------------------------------------------------------------------

I got an error massage about the issue in readChar size. Please check the report I received.

           -----------------------------------------------------------------------------------------
           DBMS:
           sql server

           Error:
           execute JDBC update query failed in dbSendUpdate 
           (Arithmetic overflow error converting expression to data type int.)

           SQL:
           SELECT pair_id,
           	t_cohort_definition_id,
           	c_cohort_definition_id,
           	t_cohort_definition_id * 1000 + pair_id AS tprime_cohort_definition_id,
           	c_cohort_definition_id * 1000 + pair_id AS cprime_cohort_definition_id,
           	min_cohort_date,
           	max_cohort_date
           INTO #exposure_cohort_pairs
           FROM (
           	SELECT ROW_NUMBER() OVER (
	               	ORDER BY s1.cohort_definition_id,
	               		s2.cohort_definition_id
	               	) AS pair_id,
               	s1.cohort_definition_id AS t_cohort_definition_id,
               	s2.cohort_definition_id AS c_cohort_definition_id,
               	CASE 
               		WHEN s1.min_cohort_date > s2.min_cohort_date
               			THEN s1.min_cohort_date
               		ELSE s2.min_cohort_date
               		END AS min_cohort_date,
               	CASE 
               		WHEN s1.max_cohort_date < s2.max_cohort_date
               			THEN s1.max_cohort_date
               		ELSE s2.max_cohort_date
               		END AS max_cohort_date
               FROM #exposure_cohort_summary s1,
               	#exposure_cohort_summary s2
           	WHERE s1.cohort_definition_id < s2.cohort_definition_id
           	) t1
           -----------------------------------------------------------------------------------------

I think this query should be fixed as follows.

            From. -------------------------------------------------------------------
              s1.cohort_definition_id AS t_cohort_definition_id,
	      s2.cohort_definition_id AS c_cohort_definition_id,
            -------------------------------------------------------------------------

            To. ---------------------------------------------------------------------
              CAST(s1.cohort_definition_id AS BIGINT) AS t_cohort_definition_id,
	      CAST(s2.cohort_definition_id AS BIGINT) AS c_cohort_definition_id,
            -------------------------------------------------------------------------

When we tried to run the code with edited version, the result was good.
Could you review this issue and confirm the code that I fixed?

Thank you!

Error in ff(initdata = initdata, length = length, levels = levels, ordered = ordered, : vmode 'character' not implemented

I'm still running keppra on Oracle, and ran into another bug.

Here's the error:

No outcome specified so not creating outcome and time variables
Error in ff(initdata = initdata, length = length, levels = levels, ordered = ordered,  : 
  vmode 'character' not implemented
Calls: execute ... do.call -> as.ff -> as.ff.default -> clone.ff -> assign -> ff
In addition: Warning message:
replacing previous import ‘Rcpp::LdFlags’ by ‘RcppParallel::LdFlags’ when loading ‘Cyclops’ 
Execution halted

Full log:


R version 3.3.0 (2016-05-03) -- "Supposedly Educational"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(KeppraAngioedema)
Loading required package: DatabaseConnector
Loading required package: RJDBC
Loading required package: DBI
Loading required package: rJava
> 
> # cohortTable = paste("ohdsi_keppra", Sys.getpid(), sep="_")
> cohortTable = "ohdsi_keppra_19239"
> print(paste("Cohort Table - ", cohortTable))
[1] "Cohort Table -  ohdsi_keppra_19239"
> 
> # outputDir = paste("/home/chilton/ohdsi_keppra/run", Sys.getpid(), sep="_")
> outputDir = "/home/chilton/ohdsi_keppra/run_19239"
> print(paste("Output Dir - ", outputDir))
[1] "Output Dir -  /home/chilton/ohdsi_keppra/run_19239"
> 
> connectionDetails <- createConnectionDetails(dbms = "oracle",
+                                              user = "OHDSI",
+                                              port = "1521",
+                                              password = "xxx",
+                                              server = "sasridg02.uits.iupui.edu/I2B21STG")
> 
> execute(connectionDetails,
+         cdmDatabaseSchema = "OMOPV5_DE",
+         workDatabaseSchema = "OHDSI",
+         studyCohortTable = cohortTable,
+         oracleTempSchema = "OHDSI",
+         outputFolder = outputDir,
+         maxCores = 4,
+         createCohorts = FALSE)
Running analyses
*** Creating cohortMethodData objects ***
Loading required package: CohortMethod
Loading required package: Cyclops
Loading required package: FeatureExtraction
Connecting using Oracle driver

Constructing treatment and comparator cohorts
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |======================================================================| 100%
Analysis took 23.5 secs
Fetching cohorts from server
Fetching cohorts took 0.729 secs
Constructing default covariates
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=                                                                     |   1%
  |                                                                            
  |=                                                                     |   2%
  |                                                                            
  |==                                                                    |   2%
  |                                                                            
  |==                                                                    |   3%
  |                                                                            
  |===                                                                   |   4%
  |                                                                            
  |===                                                                   |   5%
  |                                                                            
  |====                                                                  |   5%
  |                                                                            
  |====                                                                  |   6%
  |                                                                            
  |=====                                                                 |   6%
  |                                                                            
  |=====                                                                 |   7%
  |                                                                            
  |=====                                                                 |   8%
  |                                                                            
  |======                                                                |   8%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=======                                                               |   9%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |========                                                              |  11%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |=========                                                             |  12%
  |                                                                            
  |=========                                                             |  13%
  |                                                                            
  |==========                                                            |  14%
  |                                                                            
  |==========                                                            |  15%
  |                                                                            
  |===========                                                           |  15%
  |                                                                            
  |===========                                                           |  16%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |============                                                          |  18%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |=============                                                         |  19%
  |                                                                            
  |==============                                                        |  19%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |==============                                                        |  21%
  |                                                                            
  |===============                                                       |  21%
  |                                                                            
  |===============                                                       |  22%
  |                                                                            
  |================                                                      |  22%
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |=================                                                     |  24%
  |                                                                            
  |=================                                                     |  25%
  |                                                                            
  |==================                                                    |  25%
  |                                                                            
  |==================                                                    |  26%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |====================                                                  |  28%
  |                                                                            
  |====================                                                  |  29%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |======================                                                |  31%
  |                                                                            
  |======================                                                |  32%
  |                                                                            
  |=======================                                               |  32%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |========================                                              |  34%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |=========================                                             |  35%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |==========================                                            |  36%
  |                                                                            
  |==========================                                            |  37%
  |                                                                            
  |==========================                                            |  38%
  |                                                                            
  |===========================                                           |  38%
  |                                                                            
  |===========================                                           |  39%
  |                                                                            
  |============================                                          |  39%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |=============================                                         |  41%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |==============================                                        |  42%
  |                                                                            
  |==============================                                        |  43%
  |                                                                            
  |===============================                                       |  44%
  |                                                                            
  |===============================                                       |  45%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |================================                                      |  46%
  |                                                                            
  |=================================                                     |  47%
  |                                                                            
  |=================================                                     |  48%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |==================================                                    |  49%
  |                                                                            
  |===================================                                   |  49%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |===================================                                   |  51%
  |                                                                            
  |====================================                                  |  51%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |=====================================                                 |  52%
  |                                                                            
  |=====================================                                 |  53%
  |                                                                            
  |======================================                                |  54%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=======================================                               |  55%
  |                                                                            
  |=======================================                               |  56%
  |                                                                            
  |========================================                              |  57%
  |                                                                            
  |========================================                              |  58%
  |                                                                            
  |=========================================                             |  58%
  |                                                                            
  |=========================================                             |  59%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |==========================================                            |  61%
  |                                                                            
  |===========================================                           |  61%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |============================================                          |  62%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |============================================                          |  64%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |=============================================                         |  65%
  |                                                                            
  |==============================================                        |  65%
  |                                                                            
  |==============================================                        |  66%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |===============================================                       |  68%
  |                                                                            
  |================================================                      |  68%
  |                                                                            
  |================================================                      |  69%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |==================================================                    |  71%
  |                                                                            
  |==================================================                    |  72%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |====================================================                  |  74%
  |                                                                            
  |====================================================                  |  75%
  |                                                                            
  |=====================================================                 |  75%
  |                                                                            
  |=====================================================                 |  76%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |======================================================                |  78%
  |                                                                            
  |=======================================================               |  78%
  |                                                                            
  |=======================================================               |  79%
  |                                                                            
  |========================================================              |  79%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |========================================================              |  81%
  |                                                                            
  |=========================================================             |  81%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |==========================================================            |  82%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |===========================================================           |  84%
  |                                                                            
  |===========================================================           |  85%
  |                                                                            
  |============================================================          |  85%
  |                                                                            
  |============================================================          |  86%
  |                                                                            
  |=============================================================         |  87%
  |                                                                            
  |=============================================================         |  88%
  |                                                                            
  |==============================================================        |  88%
  |                                                                            
  |==============================================================        |  89%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |===============================================================       |  91%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |================================================================      |  92%
  |                                                                            
  |=================================================================     |  92%
  |                                                                            
  |=================================================================     |  93%
  |                                                                            
  |=================================================================     |  94%
  |                                                                            
  |==================================================================    |  94%
  |                                                                            
  |==================================================================    |  95%
  |                                                                            
  |===================================================================   |  95%
  |                                                                            
  |===================================================================   |  96%
  |                                                                            
  |====================================================================  |  97%
  |                                                                            
  |====================================================================  |  98%
  |                                                                            
  |===================================================================== |  98%
  |                                                                            
  |===================================================================== |  99%
  |                                                                            
  |======================================================================| 100%
Analysis took 13.5 hours
Done
Fetching data from server
Loading took 24.8 secs
Removing redundant covariates
Removing redundant covariates took 22.3 secs
Normalizing covariates
Fetching outcomes from server
Fetching outcomes took 0.617 secs
*** Creating study populations ***
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |=                                                                     |   1%
  |                                                                            
  |=                                                                     |   2%
  |                                                                            
  |==                                                                    |   2%
  |                                                                            
  |==                                                                    |   3%
  |                                                                            
  |===                                                                   |   4%
  |                                                                            
  |===                                                                   |   5%
  |                                                                            
  |====                                                                  |   5%
  |                                                                            
  |====                                                                  |   6%
  |                                                                            
  |=====                                                                 |   6%
  |                                                                            
  |=====                                                                 |   7%
  |                                                                            
  |======                                                                |   8%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=======                                                               |   9%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |========                                                              |  11%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |=========                                                             |  12%
  |                                                                            
  |=========                                                             |  13%
  |                                                                            
  |==========                                                            |  14%
  |                                                                            
  |==========                                                            |  15%
  |                                                                            
  |===========                                                           |  15%
  |                                                                            
  |===========                                                           |  16%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |============                                                          |  18%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |=============                                                         |  19%
  |                                                                            
  |==============                                                        |  19%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |===============                                                       |  21%
  |                                                                            
  |===============                                                       |  22%
  |                                                                            
  |================                                                      |  22%
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |=================                                                     |  24%
  |                                                                            
  |=================                                                     |  25%
  |                                                                            
  |==================                                                    |  25%
  |                                                                            
  |==================                                                    |  26%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |===================                                                   |  28%
  |                                                                            
  |====================                                                  |  28%
  |                                                                            
  |====================                                                  |  29%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |=====================                                                 |  31%
  |                                                                            
  |======================                                                |  31%
  |                                                                            
  |======================                                                |  32%
  |                                                                            
  |=======================                                               |  32%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |========================                                              |  34%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |=========================                                             |  35%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |==========================                                            |  37%
  |                                                                            
  |==========================                                            |  38%
  |                                                                            
  |===========================                                           |  38%
  |                                                                            
  |===========================                                           |  39%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |============================                                          |  41%
  |                                                                            
  |=============================                                         |  41%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |==============================                                        |  43%
  |                                                                            
  |==============================                                        |  44%
  |                                                                            
  |===============================                                       |  44%
  |                                                                            
  |===============================                                       |  45%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |================================                                      |  46%
  |                                                                            
  |=================================                                     |  47%
  |                                                                            
  |=================================                                     |  48%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |==================================                                    |  49%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |====================================                                  |  51%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |=====================================                                 |  52%
  |                                                                            
  |=====================================                                 |  53%
  |                                                                            
  |======================================                                |  54%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=======================================                               |  55%
  |                                                                            
  |=======================================                               |  56%
  |                                                                            
  |========================================                              |  56%
  |                                                                            
  |========================================                              |  57%
  |                                                                            
  |=========================================                             |  58%
  |                                                                            
  |=========================================                             |  59%
  |                                                                            
  |==========================================                            |  59%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |===========================================                           |  61%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |============================================                          |  62%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |=============================================                         |  65%
  |                                                                            
  |==============================================                        |  65%
  |                                                                            
  |==============================================                        |  66%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |===============================================                       |  68%
  |                                                                            
  |================================================                      |  68%
  |                                                                            
  |================================================                      |  69%
  |                                                                            
  |=================================================                     |  69%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |==================================================                    |  71%
  |                                                                            
  |==================================================                    |  72%
  |                                                                            
  |===================================================                   |  72%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |====================================================                  |  74%
  |                                                                            
  |====================================================                  |  75%
  |                                                                            
  |=====================================================                 |  75%
  |                                                                            
  |=====================================================                 |  76%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |======================================================                |  78%
  |                                                                            
  |=======================================================               |  78%
  |                                                                            
  |=======================================================               |  79%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |========================================================              |  81%
  |                                                                            
  |=========================================================             |  81%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |==========================================================            |  82%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |===========================================================           |  84%
  |                                                                            
  |===========================================================           |  85%
  |                                                                            
  |============================================================          |  85%
  |                                                                            
  |============================================================          |  86%
  |                                                                            
  |=============================================================         |  87%
  |                                                                            
  |=============================================================         |  88%
  |                                                                            
  |==============================================================        |  88%
  |                                                                            
  |==============================================================        |  89%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |===============================================================       |  91%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |================================================================      |  92%
  |                                                                            
  |=================================================================     |  93%
  |                                                                            
  |=================================================================     |  94%
  |                                                                            
  |==================================================================    |  94%
  |                                                                            
  |==================================================================    |  95%
  |                                                                            
  |===================================================================   |  95%
  |                                                                            
  |===================================================================   |  96%
  |                                                                            
  |====================================================================  |  97%
  |                                                                            
  |====================================================================  |  98%
  |                                                                            
  |===================================================================== |  98%
  |                                                                            
  |===================================================================== |  99%
  |                                                                            
  |======================================================================| 100%
*** Fitting shared propensity score models ***
Removing subject that are in both cohorts (if any)
No outcome specified so skipping removing people with prior outcomes
Removing subjects with less than 1 day(s) at risk (if any)
No outcome specified so not creating outcome and time variables
Error in ff(initdata = initdata, length = length, levels = levels, ordered = ordered,  : 
  vmode 'character' not implemented
Calls: execute ... do.call -> as.ff -> as.ff.default -> clone.ff -> assign -> ff
In addition: Warning message:
replacing previous import ‘Rcpp::LdFlags’ by ‘RcppParallel::LdFlags’ when loading ‘Cyclops’ 
Execution halted

Also, if I rerun it (after it's fixed), can I start from createCohorts = FALSE, or do I need to start over?

Thanks.

Error when Generating outcomes (package AlendronateVsRaloxifene)

Hello,
I'm interested in this study but getting some errors running it.

Warning : the condition has length>1 and only the first element will be used
This warning doesn't look so probelmatic.
There were three chunks of error messages below.
I wonder if this is because I'm using Parallellogger of version 1.0.1 so I'm gonna update and run this package again but please tell me if you know what caused this issue.
Or I suspect that this error is caused becasue my institution hasn't converted some concepts.

Thread 1 returns error : "cannot oppen the connection" when using argument(s) : list(exposureID = NA, outcomeID = NA, modelFolder= NA, covarFileName = c("E:/DPJE001/Desktop/study_results/positiveControlSynthesis/CovarsForModel_gNA", .."
Thread 2 returns error : "argument is of length 0 when using argument(s) : list(exposureID = integer(0), outcomeID = integer(0), modelFolder= character(0), covarFileName = "E:/DPJE001/Desktop/study_results/positiveControlSynthesis/CovarsForModel_g"_, list(exposureID= c(99321,...,)"
Error in ParallelLogger:clusterapply(cluster,tasks,generateOutcomes, : Error(s) when calling function 'fun', see earlier messages for details

Oracle table names - not happy with the length of Depression12mo_drug_seq_summary

Hi,

While esting protocol 2 by running the MainAnalysis.R script configured for our dataset (Oracle >=11g, R 3.0) I ran into error "ORA-03291: Invalid truncate option - missing STORAGE keyword". This issue was triggered because I used a hyphen instead of an underscore in the "sourceName" variable - my bad. However, after correcting this, I found another issue that I think will require a slight change to the code. Specifically, the table prefix 'Depression12mo' leads to table names (e.g. 'Depression12mo_drug_seq_summary') that causes Oracle to trigger 'ORA-00972: identifier is too long'. The character limit on Oracle tables is 30. Going through the MainAnalysis.R and HelperFunctions.R and replacing 'Depression12mo' with 'Depr12mo' fixes this issue.

--- output before fix ---

> source("MainAnalysis.R")
Loading required package: RJDBC
Loading required package: DBI
Loading required package: rJava
Created file 'TxPath autoTranslate oracle HTN12mo.sql'
Created file 'TxPath autoTranslate oracle T2DM12mo.sql'
Created file 'TxPath autoTranslate oracle Depression12mo.sql'
Connecting using Oracle driver
  |============                                                          |  17%Error executing SQL: Error in .local(conn, statement, ...): execute JDBC update query failed in dbSendUpdate (ORA-00972: identifier is too long
ORA-06512: at line 7
)

An error report has been created at  /home/rdb20/OHDSI-code/StudyProtocols/Study 2 - Treatment Pathways 12mo/R Version/errorReport.txt
Error in value[[3L]](cond) : no loop for break/next, jumping to top level

after

> source("MainAnalysis.R")
Created file 'TxPath autoTranslate oracle HTN12mo.sql'
Created file 'TxPath autoTranslate oracle T2DM12mo.sql'
Created file 'TxPath autoTranslate oracle Depr12mo.sql'
Connecting using Oracle driver
  |======================================================================| 100%
Analysis took 19.8 secs
  |======================================================================| 100%
Analysis took 16.9 secs
  |======================================================================| 100%
Analysis took 16.8 secs
Created file 'HTN12mo_GOHDSI_summary.csv'
Created file 'HTN12mo_GOHDSI_person_cnt.csv'
Created file 'HTN12mo_GOHDSI_seq_cnt.csv'
Created file 'T2DM12mo_GOHDSI_summary.csv'
Created file 'T2DM12mo_GOHDSI_person_cnt.csv'
Created file 'T2DM12mo_GOHDSI_seq_cnt.csv'
Created file 'Depr12mo_GOHDSI_summary.csv'
Created file 'Depr12mo_GOHDSI_person_cnt.csv'
Created file 'Depr12mo_GOHDSI_seq_cnt.csv'

Error running KeppraAngiodema

Hi,

We're trying to run Keppra Angiodema on Oracle, and I'm having issues when it is trying to create/select into cohort_person. It looks like it is creating the temp table in the CDM schema, and it should be coming from the workDatabaseSchema, right? Here's the error. It seems like it might be coming from a SELECT...INTO.

DBMS:
oracle

Error:
execute JDBC update query failed in dbSendUpdate (ORA-01031: insufficient privileges
)

SQL:
CREATE TABLE  OMOPV5_DE.pwpkmcrscohort_person
   AS
SELECT
     ROW_NUMBER() OVER (ORDER BY person_id, cohort_start_date) AS row_id,
        subject_id,

        cohort_definition_id,

        cohort_start_date,
        ( cohort_start_date -  observation_period_start_date) AS days_from_obs_start,

                ( cohort_end_date -  cohort_start_date)
         AS days_to_cohort_end,

                ( observation_period_end_date -  cohort_start_date)
         AS days_to_obs_end

FROM
   (SELECT     subject_id,

                cohort_definition_id,

                cohort_start_date,
                cohort_end_date
          FROM   OHDSI.ohdsi_keppra_19239 exposure_table

          WHERE  cohort_definition_id IN (1, 2)



         ) raw_cohorts

INNER JOIN OMOPV5_DE.observation_period
        ON subject_id = person_id
  WHERE  cohort_start_date <= observation_period_end_date
        AND cohort_start_date >= observation_period_start_date




R version:
R version 3.3.0 (2016-05-03)

Platform:
x86_64-pc-linux-gnu

Attached base packages:
- stats
- graphics
- grDevices
- utils
- datasets
- methods
- base

Other attached packages:
- CohortMethod (2.0.2)
- FeatureExtraction (1.0.0)
- Cyclops (1.2.0)
- KeppraAngioedema (0.1.0)
- DatabaseConnector (1.4.0)
- RJDBC (0.2-5)
- rJava (0.9-8)
- DBI (0.4-1)

Error in Data frame aggregation

Hello, I'm Seojeong, a graduate student of Ajou university in Korea.
I got a issue while I running the LargeScalePopEst Code.

I was trying to execute "injectionSignals" parameter especially for comfirming whether each step working rightly and then an error message was shown just like below. (Note that the parameters "createCohorts" and "fetchAllDataFromServer" worked well although one warning message poped up during executing the "createCohorts" step.)

↓ The warning message during "createCohort" step.
image

↓ The Error message during "injectSignals" step.
image

And I figured out that the length of [ unique(data$outcomeId) ] and [ negativeControlIds ] is different each other.

image

image

So I ask if it is possible that the code of LargeScalePopEst protocols can be altered.

↓ The Create outcomes file CODE
image

I think it would be better that the code should allow or skip the absent of some "outcomeId".
Could you modify this Code for us?

Please review this issue.

Thank you!

Error on latest install of KeppraAngioedema

I am getting this for a few of the packages (on Windows):

Warning in install.packages :
cannot open URL 'http://OHDSI.github.io/drat/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
cannot open URL 'http://OHDSI.github.io/drat/bin/windows/contrib/3.2/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
unable to access index for repository http://OHDSI.github.io/drat/bin/windows/contrib/3.2:
cannot open URL 'http://OHDSI.github.io/drat/bin/windows/contrib/3.2/PACKAGES'
Warning in install.packages :
cannot open URL 'http://cloudyr.github.io/drat/bin/windows/contrib/3.2/PACKAGES.gz': HTTP status was '404 Not Found'
Warning in install.packages :
cannot open URL 'http://cloudyr.github.io/drat/bin/windows/contrib/3.2/PACKAGES': HTTP status was '404 Not Found'
Warning in install.packages :
unable to access index for repository http://cloudyr.github.io/drat/bin/windows/contrib/3.2:
cannot open URL 'http://cloudyr.github.io/drat/bin/windows/contrib/3.2/PACKAGES'

Heap Space Error on CSV Export

Running Oracle. First two exports work fine:

extractAndWriteToFile(conn, "person_count", resultsSchema, sourceName, "T2DM", dbms)
extractAndWriteToFile(conn, "person_count_year", resultsSchema, sourceName, "T2DM", dbms)

Last two exports throw an error:

extractAndWriteToFile(conn, "seq_count", resultsSchema, sourceName, "T2DM", dbms)
Error executing SQL: Error in .jcall(rp, "I", "fetch", stride): java.lang.OutOfMemoryError: Java heap space
Error in value[3L] : no loop for break/next, jumping to top level

extractAndWriteToFile(conn, "seq_count_year", resultsSchema, sourceName, "T2DM", dbms)
Error executing SQL: Error in .jcall(rp, "I", "fetch", stride): java.lang.OutOfMemoryError: Java heap space

Any ideas?

In CelecoxibVsNsNSAIDs, Error in ff::ff(1, length = nrow(covariates)) : unable to open and 17 warnings

Hi. I`m Minseok, a graduate student in Ajou univ.
I executed CelecoxibVsNsNSAIDs analysis R code and have some trouble.

My error message is
//Error in ff::ff(1, length = nrow(covariates)) : unable to open
In addition: There were 17 warnings (use warnings() to see them) //

and 17 warnings are almost
//In readChar(pathToSql, file.info(pathToSql)$size) :
can only read in bytes in a non-UTF-8 MBCS locale execute//
//In lowLevelQuerySql.ffdf(connection, sql) :
Data has zero rows, returning an empty data frame execute//

But I don`t know what the error is with just that text.

I attach running code log

Rcode

execute(connectionDetails,
cdmDatabaseSchema = "Camel_DB.dbo",
workDatabaseSchema = "Camel_nsnsaids_result.dbo",
studyCohortTable = "celecoxib_vs_nsnsaids",
oracleTempSchema = NULL,
outputFolder = "E:/R/OHDSI/study_results",
cdmVersion = "5")

console window

execute(connectionDetails,

  •     cdmDatabaseSchema = "Camel_DB.dbo",
    
  •     workDatabaseSchema = "Camel_nsnsaids_result.dbo",
    
  •     studyCohortTable = "celecoxib_vs_nsnsaids",
    
  •     oracleTempSchema = NULL,
    
  •     outputFolder = "E:/R/OHDSI/study_results",
    
  •     cdmVersion = "5")
    

Creating exposure and outcome cohorts
Connecting using SQL Server driver

  • Creating treatment cohort
    |==================================================================================================================================================| 100%
    Analysis took 3.03 secs
  • Creating comparator cohort
    |==================================================================================================================================================| 100%
    Analysis took 9.84 secs
  • Creating myocardial infarction cohort
    |==================================================================================================================================================| 100%
    Analysis took 4.06 secs
  • Creating myocardial infarction and ischemic death cohort
    |==================================================================================================================================================| 100%
    Analysis took 8.55 secs
  • Creating gastrointestinal hemorrhage cohort
    |==================================================================================================================================================| 100%
    Analysis took 5.47 secs
  • Creating angioedema cohort
    |==================================================================================================================================================| 100%
    Analysis took 1.27 secs
  • Creating acute renal failure cohort
    |==================================================================================================================================================| 100%
    Analysis took 3.45 secs
  • Creating drug induced liver injury cohort
    |==================================================================================================================================================| 100%
    Analysis took 11.9 secs
  • Creating heart failure cohort
    |==================================================================================================================================================| 100%
    Analysis took 3.56 secs
  • Creating negative control outcome cohort
    |==================================================================================================================================================| 100%
    Analysis took 23.7 secs
    cohortDefinitionId count cohortName
    1 1 634 Treatment
    2 2 3069 Comparator
    3 10 4757 Myocardial infarction
    4 11 5633 Myocardial infarction and ischemic death
    5 12 6126 Gastrointestinal hemorrhage
    6 13 4437 Angioedema
    7 14 4896 Acute renal failure
    8 15 10888 Drug induced liver injury
    9 16 2389 Heart failure
    10 72418 224
    11 72712 133
    12 73302 296
    13 74855 59
    14 76737 2985
    15 77650 128
    16 78804 578
    17 79072 421
    18 80509 294
    19 81250 746
    20 81336 163
    21 133141 617
    22 133228 968
    23 133551 96
    24 134118 13
    25 134222 8122
    26 134765 9
    27 136937 3257
    28 137054 2
    29 139099 155
    30 140362 151
    31 140641 442
    32 141216 29
    33 141825 2967
    34 192606 1004
    35 194702 4621
    36 194997 1405
    37 195212 943
    38 195501 276
    39 197036 702
    40 198075 325
    41 199876 1159
    42 201388 305
    43 253796 13828
    44 261326 1395
    45 261880 1268
    46 315288 1262
    47 317305 266
    48 317376 2151
    49 317585 1875
    50 317895 83
    51 319845 536
    52 373478 10
    53 373766 382
    54 374384 129
    55 376132 27
    56 376712 196
    57 378160 57
    58 378256 15
    59 378424 75
    60 379769 1739
    61 380395 29
    62 380731 857
    63 381581 82
    64 432851 67152
    65 433163 196
    66 433440 315
    67 434309 360
    68 434319 9
    69 434630 4
    70 435140 685
    71 436740 1661
    72 437222 687
    73 437409 17427
    74 438134 99
    75 438407 25
    76 439237 789
    77 439840 35
    78 440389 612
    79 440676 577
    80 440695 3
    81 440814 970
    82 441267 9
    83 441788 458
    84 442274 51
    85 443361 201
    86 443605 447
    87 443767 9271
    88 444130 6071
    89 444191 30951
    90 4018050 513
    91 4028970 5370
    92 4029582 276
    93 4029966 2786
    94 4044391 2097
    95 4047269 3
    96 4052648 121
    97 4083964 19578
    98 4085156 24
    99 4087647 16743
    100 4092565 599
    101 4095288 37
    102 4112853 16496
    103 4114197 1359
    104 4114222 33241
    105 4129880 7847
    106 4130061 1359
    107 4131595 3437
    108 4131616 16378
    109 4132130 1875
    110 4132546 5125
    111 4140510 200
    112 4146239 5
    113 4147672 458
    114 4153380 536
    115 4153877 346
    116 4163232 102
    117 4164337 2170
    118 4171549 1042
    119 4171915 116
    120 4172458 14
    121 4174977 4784
    122 4186392 580
    123 4195698 56
    124 4207688 4874
    125 4209011 424
    126 4215978 448
    127 4218106 895
    128 4223947 1827
    129 4224118 2799
    130 4242416 1
    131 4256228 563
    132 4262178 163
    133 4270490 5407
    134 4285569 25
    135 4286201 192
    136 4288544 7600
    137 4295888 170
    138 4297984 346
    139 4305304 514
    140 4307254 329
    141 4322737 968
    142 4339088 296
    Running analyses
    *** Creating cohortMethodData objects ***
    Connecting using SQL Server driver

Constructing treatment and comparator cohorts
Executing multiple queries. This could take a while
|==================================================================================================================================================| 100%
Analysis took 56.5 secs
Fetching data from server
Loading took 0.521 secs

Constructing baseline covariates
Constructing covariates
|==================================================================================================================================================| 100%
Analysis took 21.4 secs
Done
Fetching data from server
Loading took 0.11 secs
Removing redundant covariates
Error in ff::ff(1, length = nrow(covariates)) : unable to open
In addition: There were 17 warnings (use warnings() to see them)

Database related error when calling CiCalibration::execute

I am attempting to run CiCalibration::execute function by following the instructions at
https://github.com/OHDSI/StudyProtocols/tree/master/CiCalibration

I have installed the dependencies R packages, installed PostgreSQL server and created the database, as well as the cdm_data and results schemas. When I ran the code shown at the web page, I get this error

Creating exposure and outcome cohorts Connecting using PostgreSQL driver Creating cohort: DabigatranSouthworth |== | 3%Error: Error executing SQL: org.postgresql.util.PSQLException: ERROR: relation "cdm_data.concept" does not exist Position: 155

Am I supposed to setup other tables before I can run CiCalibration::execute?

Thanks!

Median time-to-event

Return median time-to-event and its 95%CI for T and C cohorts in StudyResults artifacts.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.