-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c419c91
commit dda9e82
Showing
10 changed files
with
211 additions
and
450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
get_repeat_dose_parallel_studyids <- function (databasetype = NULL ) { | ||
|
||
|
||
# #Database Load | ||
# dbtoken <- sendigR::initEnvironment(dbType = 'sqlite', | ||
# dbPath = "C:/Users/mdaminulisla.prodhan/OneDrive - FDA/TestDB.db", | ||
# dbCreate = FALSE) | ||
# | ||
# parallel_StudyID <- sendigR::getStudiesSDESIGN(dbtoken, studyDesignFilter = "PARALLEL") | ||
# | ||
# | ||
# # Filtering the Repeat dose Studies | ||
# repeat_dose_STUDYIDs <- sendigR::genericQuery(dbtoken, queryString = "SELECT DISTINCT STUDYID | ||
# FROM ts | ||
# WHERE TSPARMCD = 'SSTYP' | ||
# AND TSVAL IN ('REPEAT DOSE TOXICITY', 'REPEAT-DOSE TOXICITY', 'Repeat-Dose Toxicity', 'Repeat Dose Toxicity')", | ||
# queryParams = NULL) | ||
# | ||
# # COMMON STUDYIDs from PARALLEL STUDYIDs and repeat_dose_STUDYIDs..... | ||
# parallel_repeat_dose_intersect <- intersect(parallel_StudyID$STUDYID,repeat_dose_STUDYIDs$STUDYID) | ||
# | ||
# # converting "parallel_repeat_dose_intersect" to a data frame | ||
# parallel_repeat_dose_intersec_df <- data.frame(STUDYID = parallel_repeat_dose_intersect) | ||
# | ||
# # convert to a vector( selected_studies should be always vector) | ||
# #selected_studies <- as.vector(parallel_repeat_dose_intersec_df$STUDYID) | ||
# | ||
# # get the studies for the rat only species | ||
# rat_STUDYID_ts_species <- sendigR::genericQuery(dbtoken, queryString = "SELECT STUDYID, TSPARMCD, TSVAL | ||
# FROM ts | ||
# WHERE TSPARMCD = 'SPECIES' AND UPPER(TSVAL) LIKE '%RAT%'", queryParams = NULL) | ||
# | ||
# selected_studies <- as.vector(rat_STUDYID_ts_species$STUDYID) | ||
# #selected_studies <- c("2170016", "1021-9743") | ||
# #selected_studies <- c("2170016") | ||
# #selected_studies <- c("8514252") | ||
# | ||
# path_db='C:/Users/mdaminulisla.prodhan/OneDrive - FDA/TestDB.db' | ||
# start_time <- Sys.time() | ||
# allscore <- get_liver_om_lb_mi_tox_score_list(selected_studies, | ||
# path_db, | ||
# fake_study = FALSE, | ||
# output_individual_scores = TRUE) | ||
# end_time <- Sys.time() | ||
# time_taken <- end_time - start_time | ||
# print(time_taken) | ||
# ##### | ||
# | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
rm(list = ls()) | ||
devtools::load_all(".") | ||
|
||
# #Database Load | ||
# dbtoken <- sendigR::initEnvironment(dbType = 'sqlite', | ||
# dbPath = "C:/Users/mdaminulisla.prodhan/OneDrive - FDA/TestDB.db", | ||
# dbCreate = FALSE) | ||
|
||
|
||
path_db='C:/Users/MdAminulIsla.Prodhan/OneDrive - FDA/Documents/DATABASES/TestDB.db' | ||
|
||
#selected_studies <- c("2170016") | ||
|
||
|
||
|
||
R_SQL_om_lb_mi_CD <- get_liver_om_lb_mi_tox_score_list (selected_studies = selected_studies, | ||
path_db = path_db, | ||
fake_study = FALSE, | ||
use_xpt_file = FALSE, | ||
multiple_xpt_folder = FALSE, | ||
output_individual_scores = FALSE, | ||
output_zscore_by_USUBJID = FALSE) | ||
|
||
# For multiple xpt folder | ||
|
||
selected_studies <- list.dirs(path_db , full.names = TRUE, recursive = FALSE) | ||
|
||
R_XPT_om_lb_mi_CD <- get_liver_om_lb_mi_tox_score_list (selected_studies = selected_studies, | ||
path_db = 'C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/real_xpt_dir/IND051292_1017-3581', | ||
fake_study = FALSE, | ||
use_xpt_file = FALSE, | ||
multiple_xpt_folder = FALSE, | ||
output_individual_scores = FALSE, | ||
output_zscore_by_USUBJID = FALSE) | ||
|
||
|
||
selected_studies <- c("10663") | ||
fake_SQL_om_lb_mi_CD <- get_liver_om_lb_mi_tox_score_list (selected_studies = selected_studies, | ||
path_db = 'C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/liver_1.db', | ||
fake_study = FALSE, | ||
use_xpt_file = FALSE, | ||
multiple_xpt_folder = FALSE, | ||
output_individual_scores = FALSE, | ||
output_zscore_by_USUBJID = FALSE) | ||
|
||
fake_XPT_om_lb_mi_CD <- get_liver_om_lb_mi_tox_score_list (selected_studies = NULL, | ||
path_db = 'C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/all_fakedata_liver_/FAKE10663', | ||
fake_study = FALSE, | ||
use_xpt_file = FALSE, | ||
multiple_xpt_folder = FALSE, | ||
output_individual_scores = FALSE, | ||
output_zscore_by_USUBJID = FALSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
|
||
|
||
### ###########################-randomforestmodel-############################# | ||
# rm(list = ls()) | ||
# devtools::load_all(".") | ||
# | ||
# # #Database Load | ||
# dbtoken_liver <- sendigR::initEnvironment(dbType = 'sqlite', | ||
# #dbPath = "/opt/rstudio/users/MdAminulIslam.Prodhan/DataCentral.db", | ||
# dbPath = "C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/liver_1.db", | ||
# dbCreate = FALSE) | ||
# # get the studies for the rat only species | ||
# STUDYID_liver <- sendigR::genericQuery(dbtoken_liver, queryString = "SELECT DISTINCT STUDYID, DOMAIN | ||
# FROM bw ", queryParams = NULL) | ||
# | ||
# selected_studies_liver <- as.vector(STUDYID_liver$STUDYID) | ||
# | ||
# | ||
# | ||
# Liver_get_liver_om_lb_mi_tox_score_list <- get_liver_om_lb_mi_tox_score_list (selected_studies = selected_studies_liver, | ||
# path_db = 'C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/liver_1.db', | ||
# fake_study = TRUE, | ||
# use_xpt_file = FALSE, | ||
# output_individual_scores = TRUE) | ||
# | ||
# | ||
# | ||
# dbtoken_not_liver <- sendigR::initEnvironment(dbType = 'sqlite', | ||
# #dbPath = "/opt/rstudio/users/MdAminulIslam.Prodhan/DataCentral.db", | ||
# dbPath = "C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/fake_not_liver_update.db", | ||
# dbCreate = FALSE) | ||
# | ||
# # get the studies for the rat only species | ||
# STUDYID_not_liver <- sendigR::genericQuery(dbtoken_not_liver, queryString = "SELECT DISTINCT STUDYID, DOMAIN | ||
# FROM bw ", queryParams = NULL) | ||
# | ||
# selected_studies_not_liver <- as.vector(STUDYID_not_liver$STUDYID) | ||
# | ||
# | ||
# not_Liver_get_liver_om_lb_mi_tox_score_list <- get_liver_om_lb_mi_tox_score_list (selected_studies = selected_studies_not_liver, | ||
# path_db = 'C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/fake_not_liver_update.db', | ||
# fake_study = TRUE, | ||
# use_xpt_file = FALSE, | ||
# output_individual_scores = TRUE) | ||
# | ||
# | ||
# | ||
# amin_get_random_forest_model <- get_random_forest_model(Liver_get_liver_om_lb_mi_tox_score_list, | ||
# not_Liver_get_liver_om_lb_mi_tox_score_list) | ||
# | ||
# | ||
|
||
|
||
# | ||
dbPath_liver = "C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/liver_1.db" | ||
dbPath_not_liver = "C:/Users/mdaminulisla.prodhan/OneDrive - FDA/2023-2024_projects/FAKE_DATABASES/fake_not_liver_update.db" | ||
|
||
predicted_rf <- predicted_random_forest_model(dbPath_liver, dbPath_not_liver) | ||
|
||
|
||
|
||
|
Oops, something went wrong.