diff --git a/bigstatsR_tutorial.R b/bigstatsR_tutorial.R index 5c7cdb8..def1afe 100755 --- a/bigstatsR_tutorial.R +++ b/bigstatsR_tutorial.R @@ -15,12 +15,12 @@ impute_func <- function(X, ind) { # Read only the first row of the file. # This allows us to obtain the number of columns. -first_row <- fread2("/home/ami/Projects/P0004 - caret and bigstatsR Workshop/Test_Genotype_Data.csv", +first_row <- fread2("Test_Genotype_Data.csv", nrows = 1) col_num <- ncol(first_row) # Read the entire file using big_read. -gen_data <- big_read("/home/ami/Projects/P0004 - caret and bigstatsR Workshop/Test_Genotype_Data.csv", +gen_data <- big_read("Test_Genotype_Data.csv", select = 1:col_num, backingfile = "G2F_Genotype_Data", progress = TRUE, @@ -69,7 +69,7 @@ big_apply(gen_data, # Write the newly-imputed data to a new file. big_write(gen_data, - "/home/ami/Projects/P0004 - caret and bigstatsR Workshop/Test_Genotype_Data_Imputed.csv", + "Test_Genotype_Data_Imputed.csv", every_nrow = 100, progress = interactive()) diff --git a/caret_tutorial.R b/caret_tutorial.R index c393e27..1694cb5 100755 --- a/caret_tutorial.R +++ b/caret_tutorial.R @@ -4,13 +4,13 @@ library(data.table) ## Data Loading [Predictors] # Genotype Data -gen_path <- "/home/ami/Projects/P0004 - caret and bigstatsR Workshop/Test_Genotype_Data_Imputed.csv" +gen_path <- "Test_Genotype_Data_Imputed.csv" gen_data <- fread(gen_path, sep = ",", header = FALSE) ## Data Loading [Traits] # Phenotype Data -phn_path <- "/home/ami/Projects/P0004 - caret and bigstatsR Workshop/Test_Phenotype_Data.csv" +phn_path <- "Test_Phenotype_Data.csv" phn_data <- fread(phn_path, sep = ",", header = FALSE) ## Data Overview