-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path001_Directories.Rmd
56 lines (45 loc) · 1.14 KB
/
001_Directories.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
title: "CAMDA2024 - Microbiom"
subtitle: "001_Directories"
author: "David Alberto García Estrada"
date: "`r Sys.Date()`"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
# Directories
## Main Working Directory
We adjust the working area
```{r}
# Display current directory
getwd()
# If necessary, change the path where the stored files are located.
workingDir <- "."
setwd(workingDir)
```
## Other directories
Data and Results
```{r}
Data <- "Data/"
dir.create(Data, showWarnings = FALSE)
Results <- "Results/"
dir.create(Results, showWarnings = FALSE)
TypeData <- c("Gut", "Covid", "Kraken", "Braken")
SubResults <- c("Abundance", "Diversity",
"DifferentialTaxa", "DifferentialFunction",
"VennDiagramTaxa", "VennDiagramFunction")
for (data in TypeData){
# Data
D.dir <- paste0(Data, data, "/")
dir.create(D.dir, showWarnings = FALSE)
# Results
R.dir <- paste0(Results, data, "/")
dir.create(R.dir, showWarnings = FALSE)
# SubResults
for (subres in SubResults){
SR.dir <- paste0(R.dir, subres, "/")
dir.create(SR.dir, showWarnings = FALSE)
}
}
```