-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcase.control.snake
46 lines (39 loc) · 1.46 KB
/
case.control.snake
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
#High Throughput Case Control 3D-Clump Pipeline
#Tychele Turner, Ph.D.
#Yilin Chen; Rachel Karchin, Ph.D., Lab Johns Hopkins University
#Jeffrey K. Ng; Tychele Turner, Ph.D., Lab Washington University in St. Louis
#Initial Commit: 2/13/23
import os
#configuration
if config == {}:
configfile: "case.control.config.json"
PROTEIN_FILE = config["protein_file"]
MUTFILE = config["mutation_file"]
CONTROLS = config["control_file"]
PERMUTATIONS = config["permutations"]
PROTEIN_LENGTH = config["protein_length"]
PDB_DIR = config["structures_directory"]
#show proteins to run
PROTEINS = []
with open(PROTEIN_FILE) as f:
PROTEINS = f.read().splitlines()
print(PROTEINS)
rule all:
input: MUTFILE, expand("track/{protein}_finished.txt", protein = PROTEINS)
rule case_control_clump:
input: MUTFILE
output: "track/{protein}_finished.txt"
params: prefix="{protein}"
shell: """
#path
export PATH=/opt/conda/envs/snakemake/bin:$PATH
set +e
mkdir -p input_genes
mkdir -p control_genes
mkdir -p clump_results
mkdir -p track
grep -w {params.prefix} {input} > input_genes/{params.prefix}
grep -w {params.prefix} {CONTROLS} > control_genes/{params.prefix}
python3 3D-CLUMP.py -s {PDB_DIR} -f input_genes/{params.prefix} -p {PROTEIN_LENGTH} -c control_genes/{params.prefix} -m 5 -z {PERMUTATIONS} > clump_results/{params.prefix}
touch {output}
"""