PREPARE_COMMON_DBS() - simplify main.nf by ~30%
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 115
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
Description of feature
Currently main.nf is dominated by PREPARE_[MODE]_DBS() subworkflows that share lots of commonality in used databases (shown after the jump).
If there was a PREPARE_COMMON_DBS() run once at the top, you can:
- Make
main.nfeasier for new contributors to read - Highlight exactly where different
modes differ in custom DB requirements - Massively shrink the size of the actual
/subworkflows/local/prepare_[mode]_db.nffiles to again just what's required from that database.
So we now have
PREPARE_COMMON_DBS(uniref30, uniref90, mgnify, pdb_mmcif, bfd, pdb_seqres, uniprot, pdb100)
PREPARE_ALPHAFOLD2_DBS(COMMON_DBS.out, params.alphafold2_small_bfd_path, params.alphafold2_pdb70_path, ....)
PREPARE_HELIXFOLD3_DBS(COMMON_DBS.out, params.helixfold3_rfam_path, params.helixfold3_maxit_src_link ...)
More compact, less code to add new modes, but also highlights what's unique and might need custom handling.
If #203 is implemented, then we have fewer lines of code to look at downstream.
Hard support for a separate database DL subworkflow, it's time-consuming and should be separate from prediction.
main.nf DB subworkflow repetition
PREPARE_ALPHAFOLD2_DBS (
params.alphafold2_db,
params.alphafold2_full_dbs,
params.alphafold2_bfd_path,
params.alphafold2_small_bfd_path,
params.alphafold2_params_path,
params.alphafold2_mgnify_path,
params.alphafold2_pdb70_path,
params.alphafold2_pdb_mmcif_path,
params.alphafold2_pdb_obsolete_path,
params.alphafold2_uniref30_path,
params.alphafold2_uniref90_path,
params.alphafold2_pdb_seqres_path,
params.alphafold2_uniprot_path,
params.alphafold2_bfd_link,
params.alphafold2_small_bfd_link,
params.alphafold2_params_link,
params.alphafold2_mgnify_link,
params.alphafold2_pdb70_link,
params.alphafold2_pdb_mmcif_link,
params.alphafold2_pdb_obsolete_link,
params.alphafold2_uniref30_link,
params.alphafold2_uniref90_link,
params.alphafold2_pdb_seqres_link,
params.alphafold2_uniprot_sprot_link,
params.alphafold2_uniprot_trembl_link
)
PREPARE_HELIXFOLD3_DBS (
params.helixfold3_db,
params.helixfold3_uniclust30_link,
params.helixfold3_ccd_preprocessed_link,
params.helixfold3_rfam_link,
params.helixfold3_init_models_link,
params.helixfold3_bfd_link,
params.helixfold3_small_bfd_link,
params.helixfold3_uniprot_sprot_link,
params.helixfold3_uniprot_trembl_link,
params.helixfold3_pdb_seqres_link,
params.helixfold3_uniref90_link,
params.helixfold3_mgnify_link,
params.helixfold3_pdb_mmcif_link,
params.helixfold3_obsolete_link,
params.helixfold3_maxit_src_link,
params.helixfold3_uniclust30_path,
params.helixfold3_ccd_preprocessed_path,
params.helixfold3_rfam_path,
params.helixfold3_init_models_path,
params.helixfold3_bfd_path,
params.helixfold3_small_bfd_path,
params.helixfold3_uniprot_path,
params.helixfold3_pdb_seqres_path,
params.helixfold3_uniref90_path,
params.helixfold3_mgnify_path,
params.helixfold3_pdb_mmcif_path,
params.helixfold3_obsolete_path,
params.helixfold3_maxit_src_path
)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in main.nf by comparing the repeated PREPARE_[MODE]DBS() calls and then inspect /subworkflows/local/prepare[mode]_db.nf for shared database handling. Refactor the common inputs into PREPARE_COMMON_DBS() and pass its output to each mode-specific subworkflow, leaving only custom database requirements in those files; done means main.nf and the mode subworkflows are substantially smaller without losing required inputs.
Written by the indexing model from the issue text.
Assessment
- Domain
- bioinformatics
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100