metadata <- read.csv(path_to_metadata)
}
if (delete_parenthesis) {
metadata$nom.du.fichier <-
gsub("\\([[:xdigit:]]\\)","", metadata$nom.du.fichier, fixed = F)
}
duplicated_file_name <- metadata$nom.du.fichier[duplicated(metadata$nom.du.fichier)]
metadata <- metadata[ !metadata$nom.du.fichier %in% duplicated_file_name,]
df_final <- df %>%
inner_join(metadata, by = c("Nom_fichier" = "nom.du.fichier")) %>%
tibble()
files_not_in_metadata <-
unique(df$Nom_fichier)[!unique(df$Nom_fichier) %in% metadata$nom.du.fichier]
nb_files_not_in_metadata  <- length(files_not_in_metadata)
files_not_in_csv <-
metadata$nom.du.fichier[!metadata$nom.du.fichier %in% df$Nom_fichier]
nb_files_not_in_csv  <- length(files_not_in_csv)
if (ncol(df) + ncol(metadata) != ncol(df_final) + 1) {
stop("The number of columns (variables) is not the addition of csv + metadata.")
}
if (messages) {
if (nb_files_not_in_csv != 0) {
warning(paste(nb_files_not_in_csv, "file(s) described in metadata were not present in the list of csv files") )
}
if (nb_files_not_in_csv != 0) {
warning(paste(nb_files_not_in_metadata, "file(s) present in the list of csv files were not described in metadata") )
}
message(paste("\n", "The final number of samples is ", nrow(df_final), ".\n", sep = ""))
}
res <- list()
res$resulting_data <- df_final
res$resulting_data$Date <- as.POSIXct(strptime(res$resulting_data$Date, "%d/%m/%Y"))
res$files_not_in_csv <- files_not_in_csv
res$files_not_in_metadata <- files_not_in_metadata
res$duplicate_file_name_in_metadata <- duplicated_file_name
unlink("csv_folder", recursive = TRUE)
return(res)
}
#' make_heatmap_folder
#'
#' @param path_to_folder
#' @param output_path (default =  "Heatmap")
#' @param path_to_metadata
#' @param subfolder_by_modality
#' @param
#'
#' @return
#' @export
#'
#' @examples
#'
make_heatmap_folder <- function(path_to_folder,
output_path="Heatmap",
path_to_metadata = NULL,
format_metadata = "csv",
subfolder_by_Trait = TRUE){
zip_files <- list.files(path_to_folder,
pattern = ".zip",
full.names = T,
include.dirs = T)
if (is.null(path_to_metadata)) {
if(format_metadata == "csv") {
path_to_metadata <- list.files(path_to_folder, pattern = ".csv", full.names = T)
metadata <- read.csv(path_to_metadata)
} else if (format_metadata == "xlsx") {
path_to_metadata <- list.files(path_to_folder, pattern = ".xlsx", full.names = T)
metadata <- read_excel(path_to_metadata)
}
if (length(path_to_metadata) > 1) {
stop("There is more than one xlsx/csv file in the folder. Use the path to metadata argument to set the correct path to the metadata file.")
}
} else {
metadata <- read.csv(path_to_metadata)
}
dir.create(output_path)
dir.create(paste(output_path, "/T", sep=""))
dir.create(paste(output_path, "/G", sep=""))
dir.create(paste(output_path, "/NM", sep=""))
for (i in 1:length(zip_files)) {
files_in_zip <- unzip(zip_files[i], list = TRUE)
heatmap_file <- files_in_zip$Name[grepl(".png", files_in_zip$Name)]
heatmap_name <- gsub("_carte_thermique_", "",
gsub(".png", "", heatmap_file))
mod <- metadata[match(heatmap_name, metadata$nom.du.fichier ), "ModalitÃ©"]
unzip(zip_files[i], heatmap_file, exdir = paste(output_path,"/", mod, sep="" ))
}
}
#' import_mitemap_from_multiple_folder
#'
#' @param folders A list of path
#' @param type_of_files A pattern to select the type of csv (either "donnees_brutes", "formeC" or "formeD")
#' files using their name (e.g. "formeC")
#' @param path_to_metadata A list of path
#'
#' @return
#' @export
#'
#' @examples
import_mitemap_from_multiple_folder <- function(folders=NULL, type_of_files=NULL, path_to_metadata=NULL){
res <- list()
for (i in 1:length(folders)) {
res[[i]] <-  import_mitemap(path_to_folder = folders[[i]], type_of_files = type_of_files, path_to_metadata = path_to_metadata[[i]])
if ("MiteMap.y" %in% names(res[[i]]$resulting_data)){
res[[i]]$resulting_data$MiteMap.y <- as.character(res[[i]]$resulting_data$MiteMap.y)
}
if ("MiteMap" %in% names(res[[i]]$resulting_data)){
res[[i]]$resulting_data$MiteMap <- as.character(res[[i]]$resulting_data$MiteMap)
}
if ("Sachet" %in% names(res[[i]]$resulting_data)){
res[[i]]$resulting_data$Sachet <- as.character(res[[i]]$resulting_data$Sachet)
}
}
final_res <- list()
final_res$resulting_data <- bind_rows(lapply(res, function(x) {
x$resulting_data
}))
final_res$files_not_in_csv <- list(lapply(res, function(x) {
x$files_not_in_csv
}))
final_res$files_not_in_metadata <- list(lapply(res, function(x) {
x$files_not_in_metadata
}))
final_res$duplicate_file_name_in_metadata <- list(lapply(res, function(x) {
x$duplicate_file_name_in_metadata
}))
return(final_res)
}
formeCUK4_UK5_GER <- import_mitemap(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/", type_of_files = "formeC")
rm(list=ls())
library("tidyverse")
library("readxl")
library("moveHMM")
library("data.table")
library("effects")
library("car")
#' import_mitemap
#' @param path_to_folder Path to the folder with zip files containing csv and with one metadata files in the .xlsx format
#' @param path_to_metadata Path to the xlsx file or csv. If there is only one csv file set path_to_metadata="csv" (or xlsx). Need to be set using a complete path to csv file if this file is not in the folder or if their is multiple xlsx/csv files in the folder
#' @param format_metadata Either csv or xlsx
#' @param type_of_files A pattern to select the type of csv (either "donnees_brutes", "formeC" or "formeD")
#' files using their name (e.g. "formeC")
#' @param delete_parenthesis (bool., default TRUE) Do we delete parenthesis with a number inside in the name of the files. Note that the name of the csv inside a zip file with a parenthesis do not have parenthesis into this name. Thus the default value to TRUE is recommended.
#' @param messages (bool., default TRUE) Do we print some warnings?
#'
#' @return
#' @export
#'
#' @examples
import_mitemap <- function(path_to_folder,
path_to_metadata= NULL,
format_metadata = "csv",
type_of_files,
delete_parenthesis = TRUE,
messages = TRUE){
zip_files <- list.files(path_to_folder,
pattern = ".zip",
full.names = T,
include.dirs = T)
for (i in 1:length(zip_files)) {
files_in_zip <- unzip(zip_files[i], list = TRUE)
file_formeC <- files_in_zip$Name[grepl(type_of_files, files_in_zip$Name)]
unzip(zip_files[i], file_formeC, exdir = "csv_folder")
}
file.remove(list.files("csv_folder", pattern = "jpg", full.names = T)) # remove jpg files if present
csv_files <- list.files("csv_folder", full.names = T)
csv_list <- list()
for (f in csv_files) {
csv_list[[f]] <- read.delim(f)
}
df <- rbindlist(csv_list, idcol = "Nom_fichier")
if (type_of_files == "formeC") {
df$Nom_fichier <- gsub(".csv", "",
gsub("_Donnees_traitees_formeC_", "",
gsub("csv_folder/", "", df$Nom_fichier)))
} else if (type_of_files == "formeD") {
df$Nom_fichier <- gsub(".csv", "",
gsub("_Donnees_traitees_formeD_", "",
gsub("csv_folder/", "", df$Nom_fichier)))
} else if (type_of_files == "donnees_brutes") {
df$Nom_fichier <- gsub(".csv", "",
gsub("_donnees_brutes_", "",
gsub("csv_folder/", "", df$Nom_fichier)))
} else {
stop("type_of_files must be one of 'formeC', 'formeD' or 'donnees_brutes'")
}
df <- tibble(df)
if (is.null(path_to_metadata)) {
if(format_metadata == "csv") {
path_to_metadata <- list.files(path_to_folder, pattern = ".csv", full.names = T)
metadata <- read.csv(path_to_metadata)
} else if (format_metadata == "xlsx") {
path_to_metadata <- list.files(path_to_folder, pattern = ".xlsx", full.names = T)
metadata <- read_excel(path_to_metadata)
}
if (length(path_to_metadata) > 1) {
stop("There is more than one xlsx/csv file in the folder. Use the path to metadata argument to set the correct path to the metadata file.")
}
} else {
metadata <- read.csv(path_to_metadata)
}
if (delete_parenthesis) {
metadata$nom.du.fichier <-
gsub("\\([[:xdigit:]]\\)","", metadata$nom.du.fichier, fixed = F)
}
duplicated_file_name <- metadata$nom.du.fichier[duplicated(metadata$nom.du.fichier)]
metadata <- metadata[ !metadata$nom.du.fichier %in% duplicated_file_name,]
df_final <- df %>%
inner_join(metadata, by = c("Nom_fichier" = "nom.du.fichier")) %>%
tibble()
files_not_in_metadata <-
unique(df$Nom_fichier)[!unique(df$Nom_fichier) %in% metadata$nom.du.fichier]
nb_files_not_in_metadata  <- length(files_not_in_metadata)
files_not_in_csv <-
metadata$nom.du.fichier[!metadata$nom.du.fichier %in% df$Nom_fichier]
nb_files_not_in_csv  <- length(files_not_in_csv)
if (ncol(df) + ncol(metadata) != ncol(df_final) + 1) {
stop("The number of columns (variables) is not the addition of csv + metadata.")
}
if (messages) {
if (nb_files_not_in_csv != 0) {
warning(paste(nb_files_not_in_csv, "file(s) described in metadata were not present in the list of csv files") )
}
if (nb_files_not_in_csv != 0) {
warning(paste(nb_files_not_in_metadata, "file(s) present in the list of csv files were not described in metadata") )
}
message(paste("\n", "The final number of samples is ", nrow(df_final), ".\n", sep = ""))
}
res <- list()
res$resulting_data <- df_final
res$resulting_data$Date <- as.POSIXct(strptime(res$resulting_data$Date, "%d/%m/%Y"))
res$files_not_in_csv <- files_not_in_csv
res$files_not_in_metadata <- files_not_in_metadata
res$duplicate_file_name_in_metadata <- duplicated_file_name
unlink("csv_folder", recursive = TRUE)
return(res)
}
#' make_heatmap_folder
#'
#' @param path_to_folder
#' @param output_path (default =  "Heatmap")
#' @param path_to_metadata
#' @param subfolder_by_modality
#' @param
#'
#' @return
#' @export
#'
#' @examples
#'
make_heatmap_folder <- function(path_to_folder,
output_path="Heatmap",
path_to_metadata = NULL,
format_metadata = "csv",
subfolder_by_Trait = TRUE){
zip_files <- list.files(path_to_folder,
pattern = ".zip",
full.names = T,
include.dirs = T)
if (is.null(path_to_metadata)) {
if(format_metadata == "csv") {
path_to_metadata <- list.files(path_to_folder, pattern = ".csv", full.names = T)
metadata <- read.csv(path_to_metadata)
} else if (format_metadata == "xlsx") {
path_to_metadata <- list.files(path_to_folder, pattern = ".xlsx", full.names = T)
metadata <- read_excel(path_to_metadata)
}
if (length(path_to_metadata) > 1) {
stop("There is more than one xlsx/csv file in the folder. Use the path to metadata argument to set the correct path to the metadata file.")
}
} else {
metadata <- read.csv(path_to_metadata)
}
dir.create(output_path)
dir.create(paste(output_path, "/T", sep=""))
dir.create(paste(output_path, "/G", sep=""))
dir.create(paste(output_path, "/NM", sep=""))
for (i in 1:length(zip_files)) {
files_in_zip <- unzip(zip_files[i], list = TRUE)
heatmap_file <- files_in_zip$Name[grepl(".png", files_in_zip$Name)]
heatmap_name <- gsub("_carte_thermique_", "",
gsub(".png", "", heatmap_file))
mod <- metadata[match(heatmap_name, metadata$nom.du.fichier ), "ModalitÃ©"]
unzip(zip_files[i], heatmap_file, exdir = paste(output_path,"/", mod, sep="" ))
}
}
#' import_mitemap_from_multiple_folder
#'
#' @param folders A list of path
#' @param type_of_files A pattern to select the type of csv (either "donnees_brutes", "formeC" or "formeD")
#' files using their name (e.g. "formeC")
#' @param path_to_metadata A list of path
#'
#' @return
#' @export
#'
#' @examples
import_mitemap_from_multiple_folder <- function(folders=NULL, type_of_files=NULL, path_to_metadata=NULL){
res <- list()
for (i in 1:length(folders)) {
res[[i]] <-  import_mitemap(path_to_folder = folders[[i]], type_of_files = type_of_files, path_to_metadata = path_to_metadata[[i]])
if ("MiteMap.y" %in% names(res[[i]]$resulting_data)){
res[[i]]$resulting_data$MiteMap.y <- as.character(res[[i]]$resulting_data$MiteMap.y)
}
if ("MiteMap" %in% names(res[[i]]$resulting_data)){
res[[i]]$resulting_data$MiteMap <- as.character(res[[i]]$resulting_data$MiteMap)
}
if ("Sachet" %in% names(res[[i]]$resulting_data)){
res[[i]]$resulting_data$Sachet <- as.character(res[[i]]$resulting_data$Sachet)
}
}
final_res <- list()
final_res$resulting_data <- bind_rows(lapply(res, function(x) {
x$resulting_data
}))
final_res$files_not_in_csv <- list(lapply(res, function(x) {
x$files_not_in_csv
}))
final_res$files_not_in_metadata <- list(lapply(res, function(x) {
x$files_not_in_metadata
}))
final_res$duplicate_file_name_in_metadata <- list(lapply(res, function(x) {
x$duplicate_file_name_in_metadata
}))
return(final_res)
}
formeCUK4_UK5_GER <- import_mitemap(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/", type_of_files = "formeC")
formeCUK4_UK5_GER <- import_mitemap(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/", type_of_files = "formeC")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/",
output_path = "GER_UK_Heatmaps")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/",
output_path = "GER_UK_Heatmaps")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK_heatmaps")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER.GER_UK/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/",
output_path = "GER_UK4_UK5")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/GER/GER_UK4_UK5/GER_UK")
library("knitr")
source("import_mitemap.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
library("knitr")
source("import_mitemap.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
folders <- list.dirs("E:\Lise 2018-2021\Recherche_encours\Projets en cours_ext\Dermanyssus\WPT2\WPI2_detail\Resistance bioassays\Analyses genot-phenot\Mite_odors")[-1]
folders <- list.dirs("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors")[-1]
folders <- list.dirs("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors")[-1]
MiteOd_formeC <- import_mitemap_from_multiple_folder(folders, type_of_files = "formeC")
# MiteOd_formeC$resulting_data
MiteOd_formeD <- import_mitemap_from_multiple_folder(folders, type_of_files = "formeD")
# MiteOd_formeD$resulting_data
MiteOd_brutes <- import_mitemap_from_multiple_folder(folders, type_of_files = "donnees_brutes")
# MiteOd_brutes$resulting_data
kable(data.frame("Nom" = c("Données brutes", "formeC", "formeD"),
"nb_sample" = c(dim(MiteOd_brutes$resulting_data)[1], dim(MiteOd_formeC$resulting_data)[1], dim(MiteOd_formeD$resulting_data)[1]),
"nb_column" = c(dim(MiteOd_brutes$resulting_data)[2], dim(MiteOd_formeC$resulting_data)[2], dim(MiteOd_formeD$resulting_data)[2]))
)
write.csv(MiteOd_formeC$resulting_data, "MiteOd_formeC.csv")
length(unlist(MiteOd_formeC$files_not_in_csv))
length(unlist(MiteOd_formeC$duplicate_file_name_in_metadata))
length(unlist(MiteOd_formeC$files_not_in_metadata))
kable(data.frame("Dossier" = unlist(folders),
"nb_files_not_in_metadata"=unlist(lapply(MiteOd_formeC$files_not_in_metadata[[1]], length))))
# table(MiteOd_formeC$resulting_data$Nom_fichier)
kable(data.frame("Dossier" = unlist(folders),
"nb_files_not_in_csv" = unlist(lapply(MiteOd_formeC$files_not_in_csv[[1]], length))))
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors",
output_path = "Mite_odors_test")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",
output_path = "Mite_odors_test")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",
output_path = "Mite_odors")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",
output_path = "test")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors_test")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors_test")
make_heatmap_folder(path_to_folder = "/home/adrien/Nextcloud/IdEst/Projets/postdoc_MiteControl/DATA/MiteOd_Adrien/Mesosel_Round5_Mars_Avril_21/",
output_path = "Mesosel_Round5_Mars_Avril_21")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",
output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors_test")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",
output_path = "Mite_odors")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",
output_path = "Mite_odors")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",
output_path = "Mite_odors")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Test/")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",output_path = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Test")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/",output_path = "Test")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/)
make_heatmap_folder(path_to_folder = "/home/adrien/Nextcloud/IdEst/Projets/postdoc_MiteControl/DATA/MiteOd_Adrien/Mesosel_Round5_Mars_Avril_21/",
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/)
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/", output_path="Heatmap")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/", output_path="Heatmap")
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors", output_path="Heatmap")
setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
dir.exists("E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/")
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/", output_path="Heatmap")
setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "./Analyses genot-phenot/Mite_odors/", output_path="Heatmap")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/", output_path="Heatmap")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/", output_path="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Heatmap")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/", output_path="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/Heatmap")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/", output_path="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/Heatmap/")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette/")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette/",output_path = "Heatmap")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette/",output_path = "PheromoneDG_Bandelette")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette/",output_path = "PheromoneDG_Bandelette")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette/",output_path = "PheromoneDG_Bandelette")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette/",output_path = "Heatmap")
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette",output_path = "Heatmap")
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette",output_path = "Heatmap")
#premier pb résolu : je travaillais sur un dossier contenant des dossiers au lieu de travailler sur un dossier (il faudra utilise import...mutiple folders...)
#là pb = le output_path est bien créé, dans le dossier Extraction_heatmap où se trouve le script, mais les photos ne sont pas dans l'output et je reçois les warning suivants :
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette",output_path = "Heatmap")
#premier pb résolu : je travaillais sur un dossier contenant des dossiers au lieu de travailler sur un dossier (il faudra utilise import...mutiple folders...)
#là pb = le output_path est bien créé, dans le dossier Extraction_heatmap où se trouve le script, mais les photos ne sont pas dans l'output et je reçois les warning suivants :
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette",output_path = "Heatmap")
#premier pb résolu : je travaillais sur un dossier contenant des dossiers au lieu de travailler sur un dossier (il faudra utilise import...mutiple folders...)
#là pb = le output_path est bien créé, dans le dossier Extraction_heatmap où se trouve le script, mais les photos ne sont pas dans l'output et je reçois les warning suivants :
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette",output_path = "Heatmap")
#premier pb résolu : je travaillais sur un dossier contenant des dossiers au lieu de travailler sur un dossier (il faudra utilise import...mutiple folders...)
#là pb = le output_path est bien créé, dans le dossier Extraction_heatmap où se trouve le script, mais les photos ne sont pas dans l'output et je reçois les warning suivants :
library("knitr")
source("import_mitemap_avec_Heatmaps.R")
knitr::opts_chunk$set(warning=FALSE, message = FALSE)
#setwd="E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/"
make_heatmap_folder(path_to_folder = "E:/Lise 2018-2021/Recherche_encours/Projets en cours_ext/Dermanyssus/WPT2/WPI2_detail/Resistance bioassays/Analyses genot-phenot/Mite_odors/PheromoneDG_Bandelette",output_path = "Heatmap")
