-
Notifications
You must be signed in to change notification settings - Fork 0
/
Snakefile
64 lines (59 loc) · 2.09 KB
/
Snakefile
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
import configs.config 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}/fftcoefs/{cfg.ALIGNMENT}/fftcoefs_{cfg.N_COEFS}.txt"
#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
sbatch submit_s2.sh
"""
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
sbatch submit_s3.sh
"""
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
module load python/3.9.0
module load py-pandas/2.0.1_py39
pip install joblib
srun --nodes=1 --ntasks=1 --mem=1G --time=01:00:00 python3 cell_nucleus_ratio.py
"""
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
module load python/3.9.0
srun --nodes=1 --ntasks=1 --mem=5G --time=01:00:00 python3 generate_runs.py
bash run.sh
cd ..
"""