Skip to content

Commit

Permalink
add mock data and romopomics example
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiangre committed Jun 2, 2021
1 parent 8a27cee commit 2838938
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store

7 changes: 7 additions & 0 deletions data/mock/bgdc2021.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
individual,generic
generic,blood
sample_type,blood
seq,RNASeq
sample,sample00
gene,ABCB1
variant,rs12345
7 changes: 7 additions & 0 deletions data/mock/bgdc2021_mask.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
alias,example1,field,table,field_idx,set_value
individual,meep,person_source_value,person,NA,NA
sample_type,blood,anatomic_site_source_value,specimen,NA,NA
seq,RNASeq,sequencing_source_value,sequencing,NA,NA
sample,GSM,specimen_source_value,specimen,NA,NA
gene,ARID1A,gene_source_value,gene,1,NA
variant,rs,variant_source_value,variation,1,NA
24 changes: 24 additions & 0 deletions src/R/mock_romopomics_example.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
pacman::p_load(tidyverse)

#install.packages("devtools")
devtools::install_github("ngiangre/ROMOPOmics",force=T)

library(ROMOPOmics)

dm_file <-
system.file("extdata","OMOP_CDM_v6_0_custom.csv",package="ROMOPOmics",mustWork = TRUE)
dm <-
loadDataModel(master_table_file = dm_file)

omop_inputs <-
list(
bgdc2021=
readInputFile(
input_file = "data/mock/bgdc2021.csv",
data_model = dm,
mask_table = loadModelMasks("data/mock/bgdc2021_mask.csv")
)
)
db_inputs <- combineInputTables(input_table_list = omop_inputs)
omop_db <- buildSQLDBR(omop_tables = db_inputs,file.path(tempdir(),"mock.sqlite"))
DBI::dbListTables(omop_db)

0 comments on commit 2838938

Please sign in to comment.