Skip to content

Commit 3570829

Browse files
remove matcher because sort_structures_by_rank() in plot_utils.py handles this more robusts on a per-program basis, can be source of truth
1 parent 1839c30 commit 3570829

2 files changed

Lines changed: 5 additions & 60 deletions

File tree

main.nf

Lines changed: 4 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -139,22 +139,7 @@ workflow NFCORE_PROTEINFOLD {
139139
ch_multiqc = ch_multiqc.mix(ALPHAFOLD2.out.multiqc_report.collect())
140140
ch_versions = ch_versions.mix(ALPHAFOLD2.out.versions)
141141
ch_report_input = ch_report_input
142-
.mix(ALPHAFOLD2
143-
.out
144-
.pdb
145-
.map { it ->
146-
[ it[0],
147-
it[1].sort { path ->
148-
def filename = path.name
149-
def matcher = filename =~ /ranked_(\d+)\.pdb/
150-
if (matcher.matches()) {
151-
return matcher[0][1].toInteger()
152-
} else {
153-
return 0 // fallback if no match
154-
}
155-
}.subList(0, Math.min(5, it[1].size() as int))
156-
]
157-
}
142+
.mix(ALPHAFOLD2.out.pdb
158143
.join(ALPHAFOLD2.out.msa)
159144
.join(ALPHAFOLD2.out.pae)
160145
)
@@ -213,23 +198,7 @@ workflow NFCORE_PROTEINFOLD {
213198
ch_versions = ch_versions.mix(ALPHAFOLD3.out.versions)
214199
ch_report_input = ch_report_input
215200
.mix(
216-
ALPHAFOLD3
217-
.out
218-
.pdb
219-
.map { it ->
220-
[
221-
it[0],
222-
it[1].sort { path ->
223-
def filename = path.name
224-
def matcher = filename =~ /.*_ranked_(\d+)\.pdb/
225-
if (matcher.matches()) {
226-
return matcher[0][1].toInteger()
227-
} else {
228-
return 0 // fallback if no match
229-
}
230-
}.subList(0, Math.min(5, it[1].size() as int))
231-
]
232-
}
201+
ALPHAFOLD3.out.pdb
233202
.join(ALPHAFOLD3.out.msa)
234203
.join(ALPHAFOLD3.out.pae)
235204
)
@@ -273,19 +242,7 @@ workflow NFCORE_PROTEINFOLD {
273242
ch_multiqc = ch_multiqc.mix(COLABFOLD.out.multiqc_report)
274243
ch_versions = ch_versions.mix(COLABFOLD.out.versions)
275244
ch_report_input = ch_report_input
276-
.mix(COLABFOLD.out.pdb.map { it ->
277-
[ it[0],
278-
it[1].sort { path ->
279-
def filename = path.name
280-
def matcher = filename =~ /_relaxed_rank_(\d+)\.pdb/
281-
if (matcher.matches()) {
282-
return matcher[0][1].toInteger()
283-
} else {
284-
return 0 // fallback if no match
285-
}
286-
}.subList(0, Math.min(5, it[1].size() as int))
287-
]
288-
}
245+
.mix(COLABFOLD.out.pdb
289246
.join(COLABFOLD.out.msa)
290247
.join(COLABFOLD.out.pae)
291248
)
@@ -437,19 +394,7 @@ workflow NFCORE_PROTEINFOLD {
437394
ch_multiqc = ch_multiqc.mix(HELIXFOLD3.out.multiqc_report.collect())
438395
ch_versions = ch_versions.mix(HELIXFOLD3.out.versions)
439396
ch_report_input = ch_report_input
440-
.mix(HELIXFOLD3.out.pdb.map { it ->
441-
[ it[0],
442-
it[1].sort { path ->
443-
def filename = path.name
444-
def matcher = filename =~ /ranked_(\d+)\.pdb/
445-
if (matcher.matches()) {
446-
return matcher[0][1].toInteger()
447-
} else {
448-
return 0 // fallback if no match
449-
}
450-
}.subList(0, Math.min(5, it[1].size() as int))
451-
]
452-
}
397+
.mix(HELIXFOLD3.out.pdb
453398
.join(HELIXFOLD3.out.msa)
454399
.join(HELIXFOLD3.out.pae)
455400
)

subworkflows/local/post_processing.nf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ workflow POST_PROCESSING {
139139
.collect()
140140
.map { it -> [it] }
141141
)
142-
.map { it -> [ it[0], it[1] + it[2] ] },
142+
.map { meta, report_files, multiqc_files -> [ meta, report_files + multiqc_files ] },
143143
ch_multiqc_config,
144144
ch_multiqc_custom_config
145145
.collect()

0 commit comments

Comments
 (0)