-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnuc_01_make_metadata.R
More file actions
31 lines (25 loc) · 1.01 KB
/
nuc_01_make_metadata.R
File metadata and controls
31 lines (25 loc) · 1.01 KB
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
# Copyright (c) [2024] [Ricardo O. Ramirez Flores]
# roramirezf@uni-heidelberg.de
setwd("/mnt/sds-hd/sd22b002/projects/ines/heart_revremod/")
# Create the meta_data table for CRC mice
library(tidyverse)
batches <- read_tsv("./data/batch_annotations.tsv") %>%
dplyr::select(Tech_Batch, Samples) %>%
dplyr::mutate(Samples = strsplit(split = ",", Samples)) %>%
unnest()
lite_meta <- read_tsv("./data/mice_weights.tsv") %>%
dplyr::select(Mouse) %>%
dplyr::mutate(Samples = strsplit(split = "_", Mouse) %>%
map_chr(., ~.x[[1]]) %>%
paste0(.,"_MS"),
Condition = strsplit(split = "_", Mouse) %>%
map_chr(., ~.x[[3]])) %>%
dlyr::mutate(ConditionSimplified = case_when(
Condition == "O" ~ "ORAB",
Condition == "DB" ~ "DB",
Condition %in% c("SO", "SDB") ~ "Control"
)) %>%
left_join(batches, by = "Samples") %>%
dplyr::rename("sample_id" = "Samples") %>%
dplyr::select(-Mouse)
write_csv(lite_meta, "./data/metadata_lite.csv")