-
Notifications
You must be signed in to change notification settings - Fork 0
/
review_updates.Rmd
45 lines (38 loc) · 1.42 KB
/
review_updates.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
---
title: "Review updates"
output: html_notebook
---
REVIEW UPDATES: Dicussed [here](https://github.com/d3b-center/d3b-pnoc003-HGG-DMG-omics/issues/196#issuecomment-773528346)
### Review updates for CNS_region
release-v19
```{r}
library("tidyverse")
new_hist <- read_tsv("release-v19-20210126/pbta-histologies-base.tsv")
CNS_updates <- read_tsv("input/CNS_region_review_HGG_CK.txt") %>%
select(sample_id, CNS_Region) %>%
rename(CNS_region = CNS_Region) %>%
unique()
new_hist %>%
left_join(CNS_updates,by="sample_id",suffix=c("_previous","_latest")) %>%
mutate(CNS_region = case_when(!is.na(CNS_region_latest) ~ CNS_region_latest,
TRUE ~ CNS_region_previous)
) %>%
select(-CNS_region_previous,-CNS_region_latest) %>%
write_tsv("release-v19-20210126/pbta-histologies-base.tsv")
```
hgg-dmg
```{r}
library("tidyverse")
new_hist <- read_tsv("20210126-data/pbta-histologies-base.tsv")
CNS_updates <- read_tsv("input/CNS_region_review_HGG_CK.txt") %>%
select(sample_id, CNS_Region) %>%
rename(CNS_region = CNS_Region) %>%
unique()
new_hist %>%
left_join(CNS_updates,by="sample_id",suffix=c("_previous","_latest")) %>%
mutate(CNS_region = case_when(!is.na(CNS_region_latest) ~ CNS_region_latest,
TRUE ~ CNS_region_previous)
) %>%
select(-CNS_region_previous,-CNS_region_latest) %>%
write_tsv("20210126-data/pbta-histologies-base.tsv")
```