-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.nf
More file actions
59 lines (52 loc) · 2.67 KB
/
main.nf
File metadata and controls
59 lines (52 loc) · 2.67 KB
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
#!/usr/bin/env nextflow
import groovy.json.JsonSlurper
// params.projectDir = "/data1/choderaj/paynea/plumb/rough-drafts/20250325_initial_scripts_w_nextflow"
params.projectDir = "/home/brennera/mystore/code/nf-core-plumb/"
params.scripts = "${params.projectDir}/bin"
// params.bindingDB = "/data1/choderaj/paynea/plumb_binding_db/BindingDBValidationSets-1/test"
params.bindingDB = "/home/brennera/mystore/data/bind_db/testing_subset"
// hacky way to get around needing to learn to read FASTA from cif
params.fasta = "MENFQKVEKIGEGTYGVVYKARNKLTGEVVALKKIRLDTETEGVPSTAIREISLLKELNHPNIVKLLDVIHTENKLYLVFEFLHQDLKKFMDASALTGIPLPLIKSYLFQLLQGLAFCHSHRVLHRDLKPQNLLINTEGAIKLADFGLARAFGVPVRTYTHEVVTLWYRAPEILLGCKYYSTAVDIWSLGCIFAEMVTRRALFPGDSEIDQLFRIFRTLGTPDEVVWPGVTSMPDYKPSFPKWARQDFSKVVPPLDEDGRSLLSQMLHYDPNKRISAKAALAHPFFQDVTKPVPHLRL"
// this being hard coded is bad but it should be easy to automate tying this sdf file to the uuid and then each one can be passed separately
params.congenericSeries = "${params.bindingDB}/1YKR_Validation_Affinities_3D.sdf"
// this should eventually be split out to be more helpful
params.output = "${params.projectDir}/output"
// Conda Envs
// params.asap = "/home/paynea/miniforge3/envs/asap2025"
params.asap = "/home/brennera/miniconda3/envs/asapdiscovery"
// Flags
params.take = -1
/*
* Define the workflow
*/
include {
PROCESS_BINDINGDB;
DOWNLOAD_PDB;
PREP_CIF;
PREP_FOR_DOCKING;
ASSESS_PREPPED_PROTEIN;
GENERATE_CONSTRAINED_LIGAND_POSES;
MAKE_FEC_INPUTS;
VISUALIZE_NETWORK;
} from "./modules.nf"
workflow {
// Output is only written into the work directory, not saved anywhere obvious
PROCESS_BINDINGDB()
input_files = PROCESS_BINDINGDB.out.input_json.flatten().take(params.take)
// Load in input json files and extract unique id from each and connect it to the json
input_files.map{json -> tuple([new JsonSlurper().parseText(json.text)][0].get("BindingDB monomerid"), json)}
.set{unique_jsons}
// Spruce is not compatible with the file I download
DOWNLOAD_PDB(unique_jsons)
PREP_CIF(DOWNLOAD_PDB.out.input_cif.combine(DOWNLOAD_PDB.out.record_json, by:0))
// Use ASAP CLI to prepare the protein for docking
PREP_FOR_DOCKING(PREP_CIF.out.prepped_pdb)
// Generate a quality report using Open Eye tools
ASSESS_PREPPED_PROTEIN(PREP_FOR_DOCKING.out.design_unit)
// Use ASAP tools to generate constrained ligand poses
GENERATE_CONSTRAINED_LIGAND_POSES(PREP_FOR_DOCKING.out.json_schema)
// Use ASAP alchemy CLI
MAKE_FEC_INPUTS(GENERATE_CONSTRAINED_LIGAND_POSES.out.posed_ligands.combine(PREP_FOR_DOCKING.out.prepped_pdb, by:0))
// Visualize the network using OpenFE tools
VISUALIZE_NETWORK(MAKE_FEC_INPUTS.out.network_graph)
}