updated script to combine dfs

This commit is contained in:
Tanushree Tunstall 2020-08-21 13:22:28 +01:00
parent 208e0b6f62
commit 59cb57a795
3 changed files with 98 additions and 112 deletions

View file

@ -31,6 +31,7 @@ if(is.null(drug)|is.null(gene)) {
#options(scipen = 999) #disabling scientific notation in R.
#========================================================
#%% variable assignment: input and output paths & filenames
gene_match = paste0(gene,'_p.')
cat(gene_match)
@ -46,7 +47,7 @@ outdir = paste0(datadir, '/', drug, '/', 'output')
#===========
# input file 1: master data
#in_filename_master = 'original_tanushree_data_v2.csv' #19K
in_filename_master = 'mtb_gwas_meta_v3.csv' #33k
in_filename_master = 'mtb_gwas_meta_v6.csv' #35k
infile_master = paste0(datadir, '/', in_filename_master)
cat(paste0('Reading infile1: raw data', ' ', infile_master) )
@ -324,7 +325,7 @@ x = sapply(snps,function(m){
#%%======================================================
# Writing file with calculated ORs and AFs
cat(paste0('writing output file: '
, '\nFilen: ', outfile_af_or))
, '\nFile: ', outfile_af_or))
write.csv(ors_df, outfile_af_or
, row.names = F)