-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathcoverage-analysis.py
48 lines (40 loc) · 1.27 KB
/
coverage-analysis.py
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
"""
Gregory Way 2018
Interpret Compression
7.analyze-coverage/coverage-analysis.py
Track gene set coverage across compressed features. We consider a geneset as "covered"
by the module if the geneset is discovered as the top feature in the BioBombe network
projection applied to the specific dataset with given internal dimension. The gene set
"coverage" refers to the percentage of individual genesets in a given resource (e.g.
xCell genesets, or GO Biological Processes) that are captured by the specific model.
Usage:
python coverage-analysis.py
Output:
Several geneset coverage scores summarizing enrichment across features
"""
import os
import subprocess
coverage_pairs = [
("TCGA", "GpH"),
("TCGA", "GpXCELL"),
("TCGA", "GpC4CM"),
("TCGA", "GpC2CPREACTOME"),
("TCGA", "GpC3TFT"),
("TARGET", "GpH"),
("TARGET", "GpXCELL"),
("TARGET", "GpC4CM"),
("GTEX", "GpXCELL"),
]
for dataset, metaedge in coverage_pairs:
metaedge_lower = metaedge.lower()
output_dir = os.path.join("results", dataset.lower(), metaedge_lower)
coverage_command = [
"python",
"get-coverage.py",
"--dataset",
dataset,
"--geneset",
metaedge_lower,
]
print(coverage_command)
subprocess.call(coverage_command)