diff --git a/CHANGELOG.md b/CHANGELOG.md index c2720191..f510897c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,6 +99,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [[#455](https://github.com/nf-core/proteinfold/issues/455)] - Fix colabfold monomer inheriting id from fasta header. - [[#457](https://github.com/nf-core/proteinfold/issues/457)] - Fix colabfold multimer always downloading model weights. - [[PR #461](https://github.com/nf-core/proteinfold/pulls/461)] - Update publishdir patterns for HelixFold3 module +- [[PR #462](https://github.com/nf-core/proteinfold/pulls/462)] - Update publishdir patterns for RoseTTAFold-All-Atom modules - [[PR #464](https://github.com/nf-core/proteinfold/pulls/454)] - Update publishdir patterns for Boltz module ### Parameters diff --git a/conf/modules_rosettafold_all_atom.config b/conf/modules_rosettafold_all_atom.config index 63a78c77..ba3c6869 100644 --- a/conf/modules_rosettafold_all_atom.config +++ b/conf/modules_rosettafold_all_atom.config @@ -22,11 +22,36 @@ process { withName: 'RUN_ROSETTAFOLD_ALL_ATOM' { accelerator = params.use_gpu? 1 : 0 publishDir = [ - path: { "${params.outdir}/rosettafold_all_atom/" }, + [ + path: { "${params.outdir}/rosettafold_all_atom/${meta.id}" }, mode: 'copy', - saveAs: { filename -> filename.equals('versions.yml') ? null : filename }, - pattern: '*.*' + pattern: '*_plddt.tsv' + ], + [ + path: { "${params.outdir}/rosettafold_all_atom/${meta.id}" }, + mode: 'copy', + saveAs: { filename -> "paes/$filename" }, + pattern: '*_[0-5]_pae.tsv' + ], + [ + path: { "${params.outdir}/rosettafold_all_atom/${meta.id}" }, + mode: 'copy', + pattern: '*_rosettafold_all_atom_msa.tsv' + ], + [ + enabled: params.save_intermediates, + path: { "${params.outdir}/rosettafold_all_atom/${meta.id}/raw" }, + mode: 'copy', + pattern: 'raw/**', + saveAs: { filename -> filename.toString().replaceFirst(/^raw\//, '') } + ], + [ + path: { "${params.outdir}/rosettafold_all_atom/top_ranked_structures" }, + mode: 'copy', + saveAs: { "${meta.id}.pdb" }, + pattern: '*_rosettafold_all_atom.pdb' ] + ] } withName: 'NFCORE_PROTEINFOLD:ROSETTAFOLD_ALL_ATOM:MULTIQC' { diff --git a/modules/local/run_rosettafold_all_atom/main.nf b/modules/local/run_rosettafold_all_atom/main.nf index 36adcc2a..ef9a217b 100644 --- a/modules/local/run_rosettafold_all_atom/main.nf +++ b/modules/local/run_rosettafold_all_atom/main.nf @@ -18,6 +18,7 @@ process RUN_ROSETTAFOLD_ALL_ATOM { path (fasta_files) output: + path ("raw/**") , emit: raw tuple val(meta), path ("${meta.id}_rosettafold_all_atom.pdb") , emit: pdb tuple val(meta), path ("${meta.id}_plddt.tsv") , emit: multiqc tuple val(meta), path ("${meta.id}_rosettafold_all_atom_msa.tsv") , emit: msa @@ -55,6 +56,14 @@ process RUN_ROSETTAFOLD_ALL_ATOM { mv "${meta.id}_msa.tsv" "${meta.id}_rosettafold_all_atom_msa.tsv" + mkdir -p raw + if [[ -d "\$yaml_name" ]]; then + mv "\$yaml_name" raw/ + fi + if [[ -f "\${yaml_name}_aux.pt" ]]; then + mv "\${yaml_name}_aux.pt" raw/ + fi + cat <<-END_VERSIONS > versions.yml "${task.process}": python: \$(python3 --version | sed 's/Python //g') @@ -65,10 +74,11 @@ process RUN_ROSETTAFOLD_ALL_ATOM { """ touch "${meta.id}_rosettafold_all_atom.pdb" touch "${meta.id}.pdb" - touch "${meta.id}_aux.pt" touch "${meta.id}_plddt.tsv" touch "${meta.id}_rosettafold_all_atom_msa.tsv" touch "${meta.id}_0_pae.tsv" + mkdir -p raw + touch raw/${meta.id}_aux.pt cat <<-END_VERSIONS > versions.yml "${task.process}":