Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 38 additions & 15 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,41 @@ workflow WF_WISPS {
params.colabfold_batch_size,
params.interaction_neighbours,
params.pool,
params.pool_size,
params.iptm_threshold
params.pool_size
)
ch_versions = ch_versions.mix(WISPS.out.versions)

emit:
colabfold_predictions = WISPS.out.colabfold_predictions
boltz_predictions = WISPS.out.boltz_predictions
af3_predictions = WISPS.out.af3_predictions
multiqc_report = WISPS.out.multiqc_report
versions = WISPS.out.versions
collated_versions = WISPS.out.collated_versions
ipsae_report = WISPS.out.ipsae_report
msa_a3m = WISPS.out.msa_a3m
msa_json = WISPS.out.msa_json
msa_yaml = WISPS.out.msa_yaml
msa_csv = WISPS.out.msa_csv
msa_a3m = WISPS.out.msa_a3m.map{['a3m': it[1]]}
msa_json = WISPS.out.msa_json.map{['json': it[1]]}
msa_yaml = WISPS.out.msa_yaml.map{['yaml': it[1]]}
msa_csv = WISPS.out.msa_csv.map{['csv': it[1]]}
colabfold_predictions = WISPS.out.colabfold_scores
.join(WISPS.out.colabfold_pdb)
.map { ['score': params.iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[1].text).iptm : null,
'pdb': it[2],
'confidence': it[1]] }
.filter{params.iptm_threshold == 0 || it.score >= params.iptm_threshold}

boltz_predictions = WISPS.out.boltz_pae
.join(WISPS.out.boltz_cif)
.join(WISPS.out.boltz_confidence)
.map { ['confidence': it[3],
'cif': it[2],
'pae': it[1],
'score': params.iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[3].text).iptm : null] }
.filter{params.iptm_threshold == 0 || it.score >= params.iptm_threshold}

af3_predictions = WISPS.out.alphafold3_confidence
.join(WISPS.out.alphafold3_cif)
.map { ['confidence': it[1],
'cif': it[2],
'score': params.iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[1].text).iptm : null] }
.filter{params.iptm_threshold == 0 || it.score >= params.iptm_threshold}
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -139,10 +157,11 @@ workflow {
multiqc_report = WF_WISPS.out.multiqc_report // channel: /path/to/multiqc_report.html
//collated_versions = WF_WISPS.out.collated_versions
ipsae_report = WF_WISPS.out.ipsae_report
msa_a3m = WF_WISPS.out.msa_a3m.map{it[1]}
msa_a3m = WF_WISPS.out.msa_a3m.ifEmpty([])
msa_json = WF_WISPS.out.msa_json.ifEmpty([])
msa_yaml = WF_WISPS.out.msa_yaml.ifEmpty([])
msa_csv = WF_WISPS.out.msa_csv.ifEmpty([])

}

output {
Expand Down Expand Up @@ -175,16 +194,20 @@ output {
path "ipsae/"
}
msa_a3m {
path "mmseqs/"
path "mmseqs/a3m/"
enabled params.save_mmseqs_out
}
msa_json {
path "mmseqs/"
path "mmseqs/json/"
enabled params.save_mmseqs_out
}
msa_yaml {
path 'mmseqs/'
path "mmseqs/yaml/"
enabled params.save_mmseqs_out
}
msa_csv {
path 'mmseqs/'
msa_csv {
path "mmseqs/csv/"
enabled params.save_mmseqs_out
}

}
Expand Down
6 changes: 3 additions & 3 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ params {
colabfold_num_recycles = 3
tools = "boltz,colabfold"
db = null
iptm_threshold = 0.6

iptm_threshold = 0
save_mmseqs_out = true
ipsae_pae_cutoff = 10
ipsae_dist_cutoff = 10

Expand Down Expand Up @@ -78,7 +78,7 @@ params {
}

outputDir = params.outdir

workflow.output.mode = params.publish_dir_mode

// Load base.config by default for all pipelines
includeConfig 'conf/base.config'
Expand Down
6 changes: 6 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@
"description": "Use spire DB for search",
"fa_icon": "fas fa-folder-open"
},
"save_mmseqs_out": {
"type": "boolean",
"default": true,
"description": "Save the output of mmseqs in the output directory. (disable if you want to reduce storage foot print)",
"fa_icon": "fas fa-microchip"
},
"email": {
"type": "string",
"description": "Email address for completion summary.",
Expand Down
34 changes: 9 additions & 25 deletions workflows/wisps.nf
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ workflow WISPS {
interaction_neighbours
pool
pool_size
iptm_threshold


main:
ch_multiqc_files = Channel.empty()
ch_confidence_scores = Channel.empty()
Expand Down Expand Up @@ -783,28 +782,13 @@ workflow WISPS {
msa_json = MMSEQS_COLABFOLDSEARCH.out.json
msa_yaml = MMSEQS_COLABFOLDSEARCH.out.yaml
msa_csv = MMSEQS_COLABFOLDSEARCH.out.msa_csv

colabfold_predictions = ch_colabfold_scores
.join(ch_colabfold_pdb)
.map { ['score': iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[1].text).iptm : null,
'pdb': it[2],
'confidence': it[1]] }
.filter{iptm_threshold == 0 || it.score >= iptm_threshold}

boltz_predictions = ch_boltz_pae
.join(ch_boltz_cif)
.join(ch_boltz_confidence)
.map { ['confidence': it[3],
'cif': it[2],
'pae': it[1],
'score': iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[3].text).iptm : null] }
.filter{iptm_threshold == 0 || it.score >= iptm_threshold}

af3_predictions = ch_alphafold3_confidence
.join(ch_alphafold3_cif)
.map { ['confidence': it[1],
'cif': it[2],
'score': iptm_threshold > 0 ? new groovy.json.JsonSlurper().parseText(it[1].text).iptm : null] }
.filter{iptm_threshold == 0 || it.score >= iptm_threshold}
colabfold_scores = ch_colabfold_scores
colabfold_pdb = ch_colabfold_pdb
boltz_pae = ch_boltz_pae
boltz_cif = ch_boltz_cif
boltz_confidence = ch_boltz_confidence
alphafold3_confidence = ch_alphafold3_confidence
alphafold3_cif = ch_alphafold3_cif

}

Loading