1
0

Remove full paths

This commit is contained in:
Emilio Soriano Chávez 2025-04-19 22:10:16 -04:00
parent f1fc59d4df
commit 5deae452df
Signed by: ami
SSH Key Fingerprint: SHA256:UlDVD548E5BtoWT/dK3VZqCmHqcZ2Wlht2xKwZfNYVU
2 changed files with 5 additions and 5 deletions

View File

@ -15,12 +15,12 @@ impute_func <- function(X, ind) {
# Read only the first row of the file. # Read only the first row of the file.
# This allows us to obtain the number of columns. # 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) nrows = 1)
col_num <- ncol(first_row) col_num <- ncol(first_row)
# Read the entire file using big_read. # 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, select = 1:col_num,
backingfile = "G2F_Genotype_Data", backingfile = "G2F_Genotype_Data",
progress = TRUE, progress = TRUE,
@ -69,7 +69,7 @@ big_apply(gen_data,
# Write the newly-imputed data to a new file. # Write the newly-imputed data to a new file.
big_write(gen_data, 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, every_nrow = 100,
progress = interactive()) progress = interactive())

View File

@ -4,13 +4,13 @@ library(data.table)
## Data Loading [Predictors] ## Data Loading [Predictors]
# Genotype Data # 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) gen_data <- fread(gen_path, sep = ",", header = FALSE)
## Data Loading [Traits] ## Data Loading [Traits]
# Phenotype Data # 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) phn_data <- fread(phn_path, sep = ",", header = FALSE)
## Data Overview ## Data Overview