Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ESMFold crash #222

Closed
wants to merge 2 commits into from
Closed
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Thank you to everyone else that has contributed by reporting bugs, enhancements
- [[PR ##163](https://github.com/nf-core/proteinfold/pull/163)] - Fix full test CI.
- [[#150]](https://github.com/nf-core/proteinfold/issues/150)] - Add thanks to the AWS Open Data Sponsorship program in `README.md`.
- [[PR ##166](https://github.com/nf-core/proteinfold/pull/166)] - Create 2 different parameters for Colabfold and ESMfold number of recycles.
- [[PR #222](https://github.com/nf-core/proteinfold/pull/222)] - Fix issue where ESMFold will crash if sample name does not match it's file name

### Parameters

Expand Down
5 changes: 3 additions & 2 deletions modules/local/run_esmfold.nf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ process RUN_ESMFOLD {
val numRec

output:
path ("${fasta.baseName}*.pdb"), emit: pdb
path ("*.pdb"), emit: pdb
path ("${fasta.baseName}_plddt_mqc.tsv"), emit: multiqc
path "versions.yml", emit: versions

Expand All @@ -33,7 +33,8 @@ process RUN_ESMFOLD {
--num-recycles ${numRec} \
$args

awk '{print \$2"\\t"\$3"\\t"\$4"\\t"\$6"\\t"\$11}' "${fasta.baseName}"*.pdb | grep -v 'N/A' | uniq > plddt.tsv
SAMPLE_NAME=\$(head -n 1 ${fasta} | cut -d ' ' -f 1 | sed 's/>//')
awk '{print \$2"\\t"\$3"\\t"\$4"\\t"\$6"\\t"\$11}' "\$SAMPLE_NAME"*.pdb | grep -v 'N/A' | uniq > plddt.tsv
echo -e Atom_serial_number"\\t"Atom_name"\\t"Residue_name"\\t"Residue_sequence_number"\\t"pLDDT > header.tsv
cat header.tsv plddt.tsv > "${fasta.baseName}"_plddt_mqc.tsv

Expand Down