forked from gchoonoo/HNSCC_Notebook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkflow_cnv_analysis.Rmd
More file actions
167 lines (109 loc) · 5.34 KB
/
workflow_cnv_analysis.Rmd
File metadata and controls
167 lines (109 loc) · 5.34 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
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
---
title: "CNV Pathway Overlap Analysis"
author: "Ted Laderas"
date: "8/15/2019"
output: html_notebook
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Transforming the Gistic Data
For information on how the dummy MAF file was made from the GISTIC results, please refer to `format_gistic.Rmd`.
```{r}
library(here)
library("packageDir")
library("roxygen2")
library("stringr")
library("DT")
```
## Running Overlap analysis
A number of settings options have to be set for this analysis.
### Somatic Mutation Settings
```{r}
path_detail <- readRDS("data/path_detail.rds")
settings <- getBasicSettings()
#modify the settings object
settings$somatic_mutation_aberration_summary$interactive <- "n"
settings$somatic_mutation_aberration_summary$`Analyze pathways for individual members of the cohort? (y or n) `<- "n"
settings$somatic_mutation_aberration_summary$`Select a .maf file containing the data set to be analyzed.` <- "data/gistic_long_file.maf"
settings$somatic_mutation_aberration_summary$`Would you like to include PolyPhen analysis results in this analysis? (y/n) `<- "n"
settings$somatic_mutation_aberration_summary$`Have manual gene symbol corrections already been conducted? (y/n)` <- "y"
settings$somatic_mutation_aberration_summary$`Analyze pathways for individual members of the cohort? (y or n) ` <- "n"
settings$somatic_mutation_aberration_summary$`Have manual gene symbol corrections already been conducted? (y/n)` <- "y"
settings$somatic_mutation_aberration_summary$mutation_type <- c("CNV")
settings$somatic_mutation_aberration_summary$`Would you like to filter out hypermutators?
If yes, please enter a mutation count threshold.
If no just press enter n ` <- "n"
settings$somatic_mutation_aberration_summary$`Use special path significance analysis settings for this data type? (y/n)` <- "n"
```
```{r}
settings$functional_drug_screen_summary$`Please select a file with a drug screen results data set
` <- "data/Targetome_Level123_8_7_17.txt"
settings$functional_drug_screen_summary$interactive <- "n"
settings$functional_drug_screen_summary$`Have manual symbol corrections been performed yet for the current data set? (y/n)` <- "y"
settings$functional_drug_screen_summary$`Analyze pathways for individual members of the cohort? (y or n) ` <- "n"
settings$functional_drug_screen_summary$`
To analyze drug screen panel coverage (for a panel that has or has not been run), enter p
To process drug screen result set enter d
To save an HTML summary of the results enter h
To exit drug screen interface, enter q
` <- "p"
settings$functional_drug_screen_summary$gene_stat <- "g"
settings$functional_drug_screen_summary$`Enter \\"g\\" to examine coverage using a set of gene names. Enter \\"d\\" to examine coverage using drug names, along with a drug target matrix: ` <- "g"
settings$functional_drug_screen_summary$`Please select a file` <- "data/Targetome_Level123_8_7_17.txt"
settings$functional_drug_screen_summary$`Please type in the name of the column with the gene symbols: ` <- "targets"
settings$functional_drug_screen_summary$`Have manual gene symbol corrections already been made? (y/n)` <- "y"
```
```{r}
study = getStudyObject(study.name="hnscc_cnv_only", geneIdentifierType="HUGO", path_detail = path_detail, settings = settings)
```
## Running the Analysis
`loadBasicArms()` loads the data from the specified locations.
`autoRunFromSettings()` runs all of the mutation processing and overlap analysis code.
```{r}
study <- loadBasicArms(study)
study <- autoRunFromSettings(study)
saveStudy(study)
```
# Light Paths from CNV Analysis
```{r}
lightPaths <- read.delim("output/study_hnscc_cnv_only/results/overlap_analysis/Aberrationally enriched, containing drug targets.txt", sep="\t")
DT::datatable(lightPaths)
```
#compare to mutation only analysis
```{r}
light_paths_mutation <- read.delim(here("output/study_hnscc/results/overlap_analysis/Aberrationally enriched, containing drug targets.txt"), sep="\t")
DT::datatable(lightPaths)
```
# Common to both analyses
```{r}
intersect(as.character(light_paths_mutation$path_id),as.character(lightPaths$path_id))
```
# Light Pathways In CNV analysis, but not mutation
```{r}
setdiff(as.character(lightPaths$path_id), as.character(light_paths_mutation$path_id))
```
# Light pathways unique to mutation and not in CNV
```{r}
setdiff(as.character(lightPaths$path_id), as.character(light_paths_mutation$path_id))
```
# CNV Dark Pathways
```{r}
darkPaths <- read.delim("output/study_hnscc_cnv_only/results/overlap_analysis/Aberration enriched, not drug targeted.txt", sep= "\t", stringsAsFactors = FALSE)
DT::datatable(darkPaths)
```
# Dark Paths Common to Both Analyses
```{r}
dark_paths_mutation <- read.delim("output/study_hnscc/results/overlap_analysis/Aberration enriched, not drug targeted.txt", sep= "\t", stringsAsFactors = FALSE)
intersect(dark_paths_mutation$path_id, darkPaths$path_id)
```
## Dark Paths unique to CNV
```{r}
dark_paths_mutation <- read.delim("output/study_hnscc/results/overlap_analysis/Aberration enriched, not drug targeted.txt", sep= "\t", stringsAsFactors = FALSE)
setdiff(darkPaths$path_id,dark_paths_mutation$path_id)
```
## Dark Paths unique to Mutation
```{r}
dark_paths_mutation <- read.delim("output/study_hnscc/results/overlap_analysis/Aberration enriched, not drug targeted.txt", sep= "\t", stringsAsFactors = FALSE)
setdiff(dark_paths_mutation$path_id,darkPaths$path_id)
```