-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocket_integrate
110 lines (85 loc) · 3.46 KB
/
docket_integrate
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
#!/bin/env nextflow
scripts = "$baseDir/scripts"
/* Data folder */
params.data_dir = "data/LUAD"
data_dir = file(params.data_dir)
/* Input data folder */
input_data = "$data_dir/input"
/* Configuration files folder */
config_data = "$data_dir/config"
/* Specify similarity comparison input files */
cell_line_file = "$input_data/Mut_site_GDSC.csv"
tissue_file = "$input_data/Mut_site_TCGA.csv"
similarity_config = "$config_data/similarity_compare.config"
/* Mutation drug response analysis defaults */
mut_matrix_file = "$input_data/Mut_GDSC_matrix.csv"
drug_response_file = "$input_data/Drug_GDSC_matrix.csv"
drug_response_config = "$config_data/drug_response.config"
/* Annotation and enrichment analysis defaults */
annotations_file = "$input_data/GDSC_Drug_anno.csv"
annotations_config = "$config_data/annotations.config"
/* Location of generated docket */
params.docket = "$baseDir/test/luad_integrate.docket"
docket = file(params.docket)
/* Takes two files, one containing cell line gene mutation data and the other containing tumor tissue gene mutation */
/* data. Compare the similarity of mutations (i.e. gene and mutation site within the gene) by estimating the ratio of */
/* identical mutation sites between the two data sets. */
process integrate_similarity_compare {
publishDir "$docket/integration", mode: 'copyNoFollow'
output:
file 'similar_mutation_sites.csv' into similarity_out
"""
${scripts}/integrate_similarity_compare.py \
--cell_line_file $cell_line_file \
--tissue_file $tissue_file \
--config_file $similarity_config \
--file_out similar_mutation_sites.csv
"""
}
/* Takes two files, one containing cell line mutation matrix data and the other containing cell line drug response */
/* data. Merge these two tables and run drug sensitivity analysis for mutations in a specified list of genes. */
process integrate_drug_response {
publishDir "$docket/integration", mode: 'copyNoFollow'
input:
file similarity from similarity_out
output:
file 'mutation_drug_merged.csv' into drug_merged_out
file 'mutation_drug_pairs.csv' into drug_pairs_out
"""
${scripts}/integrate_drug_response.py \
--mut_matrix_file $mut_matrix_file \
--drug_response_file $drug_response_file \
--mut_similarity_file $similarity \
--config_file $drug_response_config \
--merged_out mutation_drug_merged.csv \
--mut_drug_pairs_out mutation_drug_pairs.csv
"""
}
/* # Takes two files, one containing drug/mutation sensitivity associations and one containing drug annotations. */
process integrate_annotations {
publishDir "$docket/integration", mode: 'copyNoFollow'
input:
file drug_pairs from drug_pairs_out
output:
file 'mutation_drug_pairs_annotated.csv' into annotations_out
file 'mutation_drug_pair_enrichment.csv' into enrichment_out
"""
${scripts}/integrate_annotations.py \
--associations_file $drug_pairs \
--annotations_file $annotations_file \
--config_file $annotations_config \
--annotations_out mutation_drug_pairs_annotated.csv \
--enrichment_out mutation_drug_pair_enrichment.csv
"""
}
/* Copy Jupyter notebook for visualizing results */
process copy_notebook {
publishDir "$docket/integration", mode: 'copyNoFollow'
output:
file 'results.py'
file 'review-docket-integrate-results.ipynb'
"""
cp '$baseDir/common/results.py' .
cp '$baseDir/notebooks/review-docket-integrate-results.ipynb' .
"""
}