-
Notifications
You must be signed in to change notification settings - Fork 0
/
Snakefile_callisto
62 lines (57 loc) · 1.84 KB
/
Snakefile_callisto
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
import configs.config_callisto as cfg
import glob
# Define the target rule that executes the entire pipeline
rule all:
input:
f"{cfg.PROJECT_DIR}/shapemode/{cfg.ALIGNMENT}_{cfg.MODE}/cells_assigned_to_pc_bins.json",
f"{cfg.PROJECT_DIR}/morphed_protein_avg/PC1/Microtubules_bin6.png"
rule coefficient:
input:
script = "coefficients/s2_calculate_fft.py"
output:
f"{cfg.PROJECT_DIR}/fftcoefs/{cfg.ALIGNMENT}/fftcoefs_128.txt",
f"{cfg.PROJECT_DIR}/fftcoefs/{cfg.ALIGNMENT}/shift_error_meta_fft128.txt"
shell:
"""
cd coefficients
python s2_calculate_fft.py
cd ..
"""
rule shapemode:
input:
f"{cfg.PROJECT_DIR}/fftcoefs/{cfg.ALIGNMENT}/fftcoefs_128.txt",
f"{cfg.PROJECT_DIR}/fftcoefs/{cfg.ALIGNMENT}/shift_error_meta_fft128.txt",
f"{cfg.PROJECT_DIR}/cell_nu_ratio.txt",
f"{cfg.META_PATH}"
output:
f"{cfg.PROJECT_DIR}/shapemode/{cfg.ALIGNMENT}_{cfg.MODE}/cells_assigned_to_pc_bins.json"
shell:
"""
cd shapemodes
python s3_calculate_shapemodes.py
cd ..
"""
rule cell_nu_ratio:
input:
f"{cfg.PROJECT_DIR}/fftcoefs/{cfg.ALIGNMENT}/fftcoefs_128.txt",
f"{cfg.PROJECT_DIR}/fftcoefs/{cfg.ALIGNMENT}/shift_error_meta_fft128.txt"
output:
f"{cfg.PROJECT_DIR}/cell_nu_ratio.txt"
shell:
"""
cd analysis
python cell_nucleus_ratio.py
cd ..
"""
rule organelle:
input:
f"{cfg.PROJECT_DIR}/shapemode/{cfg.ALIGNMENT}_{cfg.MODE}/cells_assigned_to_pc_bins.json"
output:
[f"{cfg.PROJECT_DIR}/morphed_protein_avg/PC{pc_}/{org}_bin{b}.png" for b in range(6) for org in cfg.ORGANELLES for pc_ in range(1,7)]
shell:
"""
cd warps
python generate_runs.py
bash run.sh
cd ..
"""