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

Multiple sequences as input and restructuring of output #204

Open
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

luisas
Copy link
Contributor

@luisas luisas commented Oct 25, 2024

Fixing issues #198 and #199

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/proteinfold branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@luisas luisas added the WIP Work in progress label Oct 25, 2024
Copy link

github-actions bot commented Oct 25, 2024

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit 58a19c8

+| ✅ 206 tests passed       |+
#| ❔   4 tests were ignored |#
!| ❗   9 tests had warnings |!

❗ Test warnings:

  • files_exist - File not found: conf/igenomes.config
  • files_exist - File not found: conf/igenomes_ignored.config
  • pipeline_todos - TODO string in usage.md: Add documentation about anything specific to running your pipeline. For general topics, please point to (and add to) the main nf-core website.
  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • pipeline_todos - TODO string in base.config: Check the defaults for all processes
  • pipeline_todos - TODO string in base.config: Customise requirements for specific processes.
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 3.0.2
  • Run at 2024-10-25 15:47:06

@luisas
Copy link
Contributor Author

luisas commented Oct 25, 2024

@nf-core-bot fix-linting

@luisas
Copy link
Contributor Author

luisas commented Oct 25, 2024

@nf-core-bot fix linting

Copy link
Member

@JoseEspinosa JoseEspinosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some suggestions, but let's keep the PR open for discussion as we have to double-check how the different modes use multifasta:

  • does colabfold process them in batch to improve accuracy?
  • does esmfold/colabfold use the sequence tag in the file?

@@ -1,3 +0,0 @@
sequence,fasta
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this file is removed?
It will need to be updated due to #205 instead

pattern: '*.*'
],
[
path: { "${params.outdir}/alphafold2_${params.alphafold2_mode}/best_structures" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: { "${params.outdir}/alphafold2_${params.alphafold2_mode}/best_structures" },
path: { "${params.outdir}/alphafold2_${params.alphafold2_mode}/top_ranked_structures" },

pattern: '*.*'
],
[
path: { "${params.outdir}/alphafold2_${params.alphafold2_mode}/best_structures" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: { "${params.outdir}/alphafold2_${params.alphafold2_mode}/best_structures" },
path: { "${params.outdir}/alphafold2_${params.alphafold2_mode}/top_ranked_structures" },

pattern: '*.*'
],
[
path: { "${params.outdir}/colabfold_${params.colabfold_server}/best_structures" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: { "${params.outdir}/colabfold_${params.colabfold_server}/best_structures" },
path: { "${params.outdir}/colabfold_${params.colabfold_server}/top_ranked_structures" },

pattern: '*.*'
],
[
path: { "${params.outdir}/colabfold_${params.colabfold_server}/best_structures" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: { "${params.outdir}/colabfold_${params.colabfold_server}/best_structures" },
path: { "${params.outdir}/colabfold_${params.colabfold_server}/top_ranked_structures" },

pattern: '*'
],
[
path: { "${params.outdir}/esmfold/best_structures" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
path: { "${params.outdir}/esmfold/best_structures" },
path: { "${params.outdir}/esmfold/top_ranked_structures" },

- `<SEQUENCE NAME>.alphafold.pdb` that is the structure with the highest pLDDT score (ranked first)
- `<SEQUENCE NAME>_plddt_mqc.tsv` that presents the pLDDT scores per residue for each of the 5 predicted models
- `alphafold_standard/` or `alphafold_split_msa_prediction/` based on the selected mode. Contain the computed MSAs, unrelaxed structures, relaxed structures, ranked structures, raw model outputs, prediction metadata, and section timings. Specifically, `<SEQUENCE NAME>_plddt_mqc.tsv` presents the pLDDT scores per residue for each of the 5 predicted models.
- `best_structures/<SEQUENCE NAME>.pdb` that is the structure with the highest pLDDT score per input (ranked first)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `best_structures/<SEQUENCE NAME>.pdb` that is the structure with the highest pLDDT score per input (ranked first)
- `top_ranked_structures/<SEQUENCE NAME>.pdb` that is the structure with the highest pLDDT score per input (ranked first)

@@ -35,6 +35,8 @@ The samplesheet can have as many columns as you desire, however, there is a stri

An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline.

Each FASTA file is assumed to contain a single protein sequence unless you are using multimer mode. If you want to provide a FASTA file with multiple protein sequences, each to be folded individually, you can supply one or more FASTA files containing one or more sequences and use the --split_fasta parameter. In this case, each sequence in the FASTA file will be folded individually and in parallel, as if you had listed each sequence separately in the samplesheet.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Each FASTA file is assumed to contain a single protein sequence unless you are using multimer mode. If you want to provide a FASTA file with multiple protein sequences, each to be folded individually, you can supply one or more FASTA files containing one or more sequences and use the --split_fasta parameter. In this case, each sequence in the FASTA file will be folded individually and in parallel, as if you had listed each sequence separately in the samplesheet.
Each FASTA file should contain a single protein sequence unless using multimer mode. To provide a FASTA file with multiple sequences for individual folding, you can use one or more FASTA files with the --split_fasta parameter. This will treat each sequence in the FASTA file as a separate entry, folding them individually and in parallel, as if each sequence were listed separately in the samplesheet.

@@ -40,6 +40,11 @@
"description": "Run on CPUs (default) or GPUs",
"fa_icon": "fas fa-microchip"
},
"split_fasta": {
"type": "boolean",
"description": "Split input fasta file in multiple fasta files each of them containing one sequence to be folded",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Split input fasta file in multiple fasta files each of them containing one sequence to be folded",
"description": "Split input multi-fasta file in separated fasta files each of them containing one sequence to be folded",

Copy link
Member

@JoseEspinosa JoseEspinosa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some suggestions, but let's keep the PR open for discussion as we have to double-check how the different modes use multifasta:

  • does colabfold process them in batch to improve accuracy?
  • does esmfold/colabfold use the sequence tag in the file?
  • should we anyway implement the split_fasta parameter for all modes so that users can process the sequences in parallel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants