-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.Rmd
More file actions
498 lines (344 loc) · 10.5 KB
/
Copy pathREADME.Rmd
File metadata and controls
498 lines (344 loc) · 10.5 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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
---
title: "Co-expression Network Analysis Parameter Optimization (v6)"
author: V. Keith Hughitt
date: "`r format(Sys.time(), '%d %B, %Y')`"
output:
html_document:
theme: cosmo
toc: true
toc_float: true
number_sections: true
pdf_document:
toc: true
latex_engine: xelatex
---
```{r echo=FALSE}
# Clean up any existing variables
rm(list=ls())
```
Introduction
============
Overview
--------
The purpose of this analysis is to test out a range of parameters for
co-expression network construction in order to help find some reasonable values
to use for downstream network analysis.
The basic approach used here is to construct multiple networks with varying
parameters (typically in combinations less than ~1000 or so to avoid taxing the
cluster), and for each network, determine how many enriched GO terms are
observed for each resulting module in the network, and what is the average
p-value of the GO terms. Networks which result in significantly more enrichment
with lower p-values may then be considered more "optimal" or more realistic. Of
course, one must also keep in mind that when testing large numbers of networks,
it is always possible that you can generate seemingly real modules by chance,
and also that even if one set of parameters is optimal relative to the eithers,
there is no guarantee that it is the global optimal.
Parameters Tested
-----------------
For each dataset, all possible combinations of the following parameters will be
tested:
- Counts-per-million (CPM) transformation (TRUE|FALSE)
- Log2 transformation (TRUE|FALSE)
- Quantile normalization (TRUE|FALSE)
- Batch adjustment, when available (limma|combat|none)
- Similarity Measure (pearson correlation, spearman correlation, biweight
mid-correlation, cor-dist)
- Adjacency power (1-14)
This will result in a total of 1344 networks per dataset where batch
information is available, and 448 networks otherwise.
Further, for a single dataset (HsLm), additional parameter which have
previously been compared and ruled out are including for demonstrative
purposes.
Changelog
---------
### v6
- Including GO ancestor terms in enrichment analysis
- Updated human reference annotations from Ensembl 83 -> 88
- Updated TriTrypDB from 27 -> 32
- Updated Bioconductor from 3.2 -> 3.5
### v5
- Fixed an issue with HTSeq causing many reads to be double-counted.
- Improved computation of gene lengths for Human/Mouse.
- Updated human reference annotations from Ensembl 76 -> 83
- Updated TriTrypDB from 25 -> 27
- Updated Bioconductor from 3.1 -> 3.2
### v4
- Added differential-expression-based filtering of genes for host and parasite
and multicopy gene family filtering for *T. cruzi* and *L. major*.
### v3
- Updated TriTrypDB to version 25
- Quantile normalization performed before log2 transformation
- When `similarity_measure='dist'`, Euclidean distance is used directly for
dissimilarity matrix instead of converting to an intermediate similarity
matrix first.
### v2
- Updated TriTrypDB to version 24
- Gene/module mapping saved for each network generated
- No longer testing voom, topological_overlap, low_count_threshold, and
merge_cor; the later two can be separately optimized after all other
parameters have been optimized.
Results
=======
Setup
-----
```{r load_libraries}
library('DT')
library('dplyr')
library('ggplot2')
library('knitr')
library('reshape2')
library('readr')
source('../00-shared/R/util.R')
# knitr preferences
opts_chunk$set(fig.width=768/96,
fig.height=480/96,
dpi=96)
options(digits=4)
options(stringsAsFactors=FALSE)
options(knitr.duplicate.label='allow')
theme_set(theme_grey(base_size=16))
# number of high-scoring entries to display in table output
num_rows_to_display <- 15
```
*H .sapiens* All samples
------------------------
```{r load_data}
df <- tbl_df(read.csv('output/normal/hsapiens_all-v6.1.csv'))
```
```{r child='child/load-human-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-host.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*H .sapiens* Body Map multi-tissue network
------------------------------------------
```{r load_data}
df <- tbl_df(read.csv('output/normal/illumina_bodymap-v6.1.csv'))
```
```{r child='child/load-human-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-host.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*H. sapiens* infected with *T. cruzi* (intracellular)
-----------------------------------------------------
```{r load_data}
df <- read_csv('output/normal/hsapiens_infected_with_tcruzi-v6.1.csv')
```
```{r child='child/load-human-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-host.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*H. sapiens* infected with *T. cruzi* (uninfected samples)
----------------------------------------------------------
```{r load_data}
df <- read_csv('output/normal/hsapiens_infected_with_tcruzi-uninf-v6.1.csv') %>%
filter(network_type == 'signed')
```
```{r child='child/load-human-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-host.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*H. sapiens* infected with *L. braziliensis*
--------------------------------------------
```{r load_data}
df <- tbl_df(read.csv('output/normal/hsapiens_infected_with_lbraziliensis-v6.1.csv'))
```
```{r child='child/load-human-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-host.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*H. sapiens* infected with *L. major* (intracellular)
-----------------------------------------------------
### General
```{r load_data}
df <- read_csv('output/normal/hsapiens_infected_with_lmajor-v6.1.csv')
```
```{r child='child/load-human-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-host.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*H. sapiens* infected with *L. major* (including alt parameters)
----------------------------------------------------------------
### General
```{r load_data}
df <- read_csv('output/normal/hsapiens_infected_with_lmajor-full-v6.1.csv')
```
```{r child='child/load-human-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-host.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*H. sapiens* infected with *L. major* (uninfected samples)
----------------------------------------------------------
### General
```{r load_data}
df <- read_csv('output/normal/hsapiens_infected_with_lmajor-uninf-v6.1.csv') %>%
filter(network_type == 'signed')
```
```{r child='child/load-human-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-host.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*M. musculus* infected with *L. major* (intracellular)
------------------------------------------------------
### General
```{r load_data}
df <- read_csv('output/normal/mmusculus_infected_with_lmajor-v6.1.csv') %>%
filter(network_type == 'signed')
```
```{r child='child/load-mouse-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-host.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*L. major* infecting *M. musculus* (intracellular)
--------------------------------------------------
### General
```{r load_data}
df <- read_csv('output/normal/lmajor_infecting_mmusculus-v6.1.csv') %>%
filter(network_type == 'signed')
```
```{r child='child/load-other-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-other.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*L. major* all hosts
--------------------
### General
```{r load_data}
df <- read_csv('output/normal/lmajor_all_samples-v6.1.csv') %>%
filter(network_type == 'signed')
```
```{r child='child/load-other-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-other.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*L. major* all hosts (Incl. multicopy genes)
--------------------------------------------
### General
```{r load_data}
df <- read_csv('output/normal/lmajor_all_samples-multicopy-v6.1.csv') %>%
filter(network_type == 'signed')
```
```{r child='child/load-other-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-other.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*L. major* infecting *H. sapiens* (intracellular)
--------------------------------------------------
### General
```{r load_data}
df <- read_csv('output/normal/lmajor_infecting_hsapiens-v6.1.csv') %>%
filter(network_type == 'signed')
```
```{r child='child/load-other-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-other.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*T. cruzi* infecting *H. sapiens* (intracellular)
-------------------------------------------------
### General
```{r load_data}
df <- read_csv('output/normal/tcruzi_infecting_hsapiens-v6.1.csv') %>%
filter(network_type == 'signed')
```
```{r child='child/load-other-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-other.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
*T. cruzi* infecting *H. sapiens* (all stages)
----------------------------------------------
### General
```{r load_data, eval=FALSE}
df <- read_csv('output/normal/tcruzi_all_samples-v6.1.csv') %>%
filter(network_type == 'signed')
```
{r child='child/load-other-data.Rmd'}
### All networks
{r child='child/results-summary-tables-other.Rmd'}
{r child='child/results-plots.Rmd'}
*T. cruzi* infecting *H. sapiens* (all stages; including multicopy genes)
-------------------------------------------------------------------------
### General
```{r load_data}
df <- read_csv('output/normal/tcruzi_all_samples-multicopy-v6.1.csv') %>%
filter(network_type == 'signed')
```
```{r child='child/load-other-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-other.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
ModENCODE - Fly
---------------
### General
```{r load_data}
df <- tbl_df(read.csv('output/normal/modencode_fly-v6.1.csv'))
```
```{r child='child/load-other-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-other.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
ModENCODE - Worm
----------------
### General
```{r load_data}
df <- tbl_df(read.csv('output/normal/modencode_worm-v6.1.csv'))
```
```{r child='child/load-other-data.Rmd'}
```
### All networks
```{r child='child/results-summary-tables-other.Rmd'}
```
```{r child='child/results-plots.Rmd'}
```
System Information
------------------
```{r sysinfo}
sessionInfo()
date()
```