Commit e8f571b8 authored by Gael  MILLOT's avatar Gael MILLOT
Browse files

v3.0.0 release

parent a47c5da4
......@@ -60,6 +60,11 @@ Check for updated versions (most recent tags) at https://gitlab.pasteur.fr/gmill
#### WHAT'S NEW IN
## v3.0.0
rogge_12231_main_analysis.R file modified to fit with the new 194samples_67training_13replication_normalized_LR20022019.txt data file
## v2.0.0
rogge_12231_manual_graph_adjustment.R file added
......
......@@ -32,7 +32,8 @@ PATH_OUT_CONF="/pasteur/homes/gmillot/rogge12231/" # absolute path of the output
################ File name
FILE_NAME1_CONF="supplementary_data_file_test.csv" # name of the data file to import
# FILE_NAME1_CONF="supplementary_data_file_test.csv" # name of the data file to import
FILE_NAME1_CONF="194samples_67training_13replication_normalized_LR20022019.txt" # name of the data file to import
################ loop & bootstrap
......
......@@ -79,11 +79,13 @@ erase.graphs <- TRUE
script <- "code ini v1.0.0"
project.name <-"rogge12231"
path.lib <- "C:/Users/Gael/Documents/R/win-library/3.5/" # absolute path of the library folder. Write "none" if not required
path.in <- "C:/Users/Gael/Documents/Hub projects/20190126 Las Rogge 12231/Code VG and VR/" # absolute path of the data folder
# path.in <- "C:/Users/Gael/Documents/Hub projects/20190126 Las Rogge 12231/Code VG and VR/" # absolute path of the data folder
path.in <- "C:/Users/Gael/Documents/Hub projects/20190126 Las Rogge 12231/" # absolute path of the data folder
path.out <- "C:/Users/Gael/Desktop/" # absolute path of the output folder
path.function1 <- "https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/raw/v4.5.0/cute_little_R_functions.R"
# path.function1 <- "C:/Users/Gael/Documents/Git_versions_to_use/cute_little_R_functions-v4.5.0/cute_little_R_functions.R" # Define the absolute pathway of the folder containing functions created by Gael Millot
file.name1 <- "supplementary_data_file_test.csv" # name of the data file to import in path.in
file.name1 <- "194samples_67training_13replication_normalized_LR20022019.txt"
ml.bootstrap.nb <- 3
label.size <- 6
optional.text <- ""
......@@ -255,17 +257,34 @@ backup.name <- c(backup.name, "used.set.seed")
################ Data import
h1 <- unname(unlist(read.table(paste0(path.in, file.name1), nrows = 1, sep=";", dec=",", stringsAsFactors = FALSE)))
h2 <- unname(unlist(read.table(paste0(path.in, file.name1), nrows = 1, skip = 1, sep=";", dec=",", stringsAsFactors = FALSE)))
h3 <- unname(unlist(read.table(paste0(path.in, file.name1), nrows = 1, skip = 12, sep=";", dec=",", stringsAsFactors = FALSE)))
df.nano <- read.table(file = paste0(path.in, file.name1), skip = 13, header=FALSE, sep=";", dec=",") # data frame clinical + nanostring data (from LPS and SEB: dim: 76 855
# code for supplementary_data_file.csv
# h1 <- unname(unlist(read.table(paste0(path.in, file.name1), nrows = 1, sep=";", dec=",", stringsAsFactors = FALSE)))
# h2 <- unname(unlist(read.table(paste0(path.in, file.name1), nrows = 1, skip = 1, sep=";", dec=",", stringsAsFactors = FALSE)))
# h3 <- unname(unlist(read.table(paste0(path.in, file.name1), nrows = 1, skip = 12, sep=";", dec=",", stringsAsFactors = FALSE)))
# df.nano <- read.table(file = paste0(path.in, file.name1), skip = 13, header=FALSE, sep=";", dec=",") # data frame clinical + nanostring data (from LPS and SEB: dim: 76 855
d1 <- as.character(read.table(paste0(path.in, file.name1), nrows = 1, sep="\t", dec=".", stringsAsFactors = FALSE)) #??? first header
d2 <- as.character(read.table(paste0(path.in, file.name1), nrows = 1, skip = 5, sep="\t", dec=".", stringsAsFactors = FALSE)) # second header
d3 <- read.table(paste0(path.in, file.name1), nrows = 80, skip = 6, sep="\t", dec=".", stringsAsFactors = FALSE) # LPS data
d4 <- read.table(paste0(path.in, file.name1), nrows = 80, skip = 86, sep="\t", dec=".", stringsAsFactors = FALSE) # SEB data
# identical(is.na(d1), ! is.na(d2))
h <- d1
h[h == "NA"] <- d2[d2 != "NA"]
# res <- NULL ; for(i in 1:24){res <- c(res, identical(d3[,i], d4[,i]))} ; res
df.nano <- d3[c(2, 4:6, 8:24)] # recover identical first columns (all except nano)
names(df.nano) <- h[c(2, 4:6, 8:24)]
d3 <- d3[25:length(d3)]
names(d3) <- paste0("LPS_", h[25:length(h)]) # LPS add
df.nano <- cbind(df.nano, d3)
d4 <- d4[25:length(d4)]
names(d4) <- paste0("SEB_", h[25:length(h)]) # SEB add
df.nano <- cbind(df.nano, d4)
################ Data modification
h <- ifelse(is.na(h3), paste(h2, h1, sep="_"), h3)
colnames(df.nano) <- h
rownames(df.nano) <- paste0("row", rownames(df.nano))
# h <- ifelse(is.na(h3), paste(h2, h1, sep="_"), h3)
# colnames(df.nano) <- h
# rownames(df.nano) <- paste0("row", rownames(df.nano))
cvr <- df.nano[, c("Gender", "Age", "B27", "smoke",
"CRP_M0", "BASDAI_M0", "ASDAS_M0")]
Y <- df.nano$response_ASDAS_R_NR
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment