added data_extraction_formatting_regression.R flu_stats_unpaired_clinical.R and reg_cols_extraction.R
This commit is contained in:
parent
bb6e92fa0f
commit
76dc3fbb6b
3 changed files with 647 additions and 0 deletions
89
reg_cols_extraction.R
Normal file
89
reg_cols_extraction.R
Normal file
|
@ -0,0 +1,89 @@
|
|||
#!/usr/bin/Rscript
|
||||
getwd()
|
||||
setwd('~/git/mosaic_2020/')
|
||||
getwd()
|
||||
########################################################################
|
||||
# TASK: Extract relevant columns from mosaic fp adults data for regression
|
||||
# clinical and sig meds
|
||||
########################################################################
|
||||
|
||||
########################################################################
|
||||
clinical_cols = c("mosaic"
|
||||
, "ia_exac_copd"
|
||||
, "death"
|
||||
#, "obese2" #inc peaeds, but once you subset data for adults, its the same!
|
||||
, "obesity"
|
||||
, "flustat"
|
||||
, "sfluv"
|
||||
, "h1n1v"
|
||||
, "age"
|
||||
, "gender"
|
||||
, "asthma"
|
||||
, "vl_pfu_ul_npa1"
|
||||
, "los"
|
||||
, "onset2final"
|
||||
, "onsfindeath"
|
||||
, "onset_2_initial"
|
||||
, "o2_sat_admis"
|
||||
, "o2_sat_suppl"
|
||||
, "ethnicity"
|
||||
, "smoking"
|
||||
, "ia_cxr"
|
||||
, "max_resp_score"
|
||||
, "T1_resp_score"
|
||||
, "com_noasthma"
|
||||
, "T2_resp_score"
|
||||
, "inresp_sev"
|
||||
, "steroid")
|
||||
|
||||
sig_npa_cols = c("eotaxin_npa1"
|
||||
, "eotaxin3_npa1"
|
||||
, "eotaxin3_npa2"
|
||||
, "gmcsf_npa2"
|
||||
, "ifnb_npa1"
|
||||
, "ifnb_npa2"
|
||||
, "il1_npa1"
|
||||
, "il1_npa2"
|
||||
, "il10_npa1"
|
||||
, "il12p70_npa1"
|
||||
, "il12p70_npa2"
|
||||
, "il13_npa1"
|
||||
, "il2_npa3"
|
||||
, "il4_npa1"
|
||||
, "il5_npa1"
|
||||
, "il5_npa2"
|
||||
, "il6_npa1"
|
||||
, "il6_npa2"
|
||||
, "il8_npa1"
|
||||
, "il8_npa2"
|
||||
, "il8_2_npa1"
|
||||
, "il8_2_npa2"
|
||||
, "ip10_npa1"
|
||||
, "mcp4_npa1"
|
||||
, "mcp4_npa2"
|
||||
, "mdc_npa1"
|
||||
, "mip17_npa1"
|
||||
, "mip17_npa2"
|
||||
, "neopterin_npa1"
|
||||
, "rantes_npa1"
|
||||
, "tarc_npa2"
|
||||
, "tnf_npa2"
|
||||
, "tnfr1_npa1"
|
||||
, "tnfr1_npa2"
|
||||
, "tnfr1_npa3"
|
||||
, "tnfr2_npa1"
|
||||
, "tnfr2_npa2"
|
||||
, "tnfr2_npa3")
|
||||
|
||||
cols_to_extract = c(clinical_cols, sig_npa_cols)
|
||||
|
||||
if ( length(cols_to_extract) == length(clinical_cols) + length(sig_npa_cols) ){
|
||||
cat("PASS: length match"
|
||||
, "\nTotal no. of cols to extract for regression:", length(cols_to_extract)
|
||||
, "\nNo. of clinical cols:", length(clinical_cols)
|
||||
, "\nNo. of sig npa cols: ", length(sig_npa_cols))
|
||||
}else{
|
||||
cat("FAIL: length mismatch"
|
||||
, "\nAborting!")
|
||||
quit()
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue