Add DNA Foundation Models - #1965
Draft
aerdasaliko wants to merge 9 commits into
Draft
Conversation
…ool functionalities
aerdasaliko
marked this pull request as draft
August 24, 2026 17:47
Contributor
|
thanks @aerdasaliko for the work! |
anuprulez
reviewed
Aug 27, 2026
| # | ||
| # | ||
| # Classification models | ||
| local-dnabert2-model-1 DNABERT-2-117M fill-mask text dnabert2 1 "path-to-model" No newline at end of file |
Contributor
There was a problem hiding this comment.
Suggested change
| local-dnabert2-model-1 DNABERT-2-117M fill-mask text dnabert2 1 "path-to-model" | |
| DNABERT-2-117M DNABERT-2-117M feature-extraction dna-sequence dnabert2 1 "path-to-model" |
Contributor
There was a problem hiding this comment.
It seems none of the pipeline_tag values from HF is suitable for DNABERT-2 model.
anuprulez
reviewed
Aug 27, 2026
| @@ -0,0 +1,402 @@ | |||
| <tool id="dna_foundation_models" name="DNA Foundation Models" version="0.1.0+galaxy0" profile="21.05"> | |||
Contributor
There was a problem hiding this comment.
Suggested change
| <tool id="dna_foundation_models" name="DNA Foundation Models" version="0.1.0+galaxy0" profile="21.05"> | |
| <tool id="dna_foundation_models" name="DNA Foundation Models" version="0.1.0+galaxy0" profile="24.2"> |
anuprulez
reviewed
Aug 27, 2026
| <param name="lr" value="5e-5"/> | ||
| <param name="weight_decay" value="0.01"/> | ||
| <param name="epochs" value="1"/> | ||
| <param name="save_steps" value="50"/> |
Contributor
There was a problem hiding this comment.
save_steps is not defined in the tool's UI
anuprulez
reviewed
Aug 27, 2026
|
|
||
| </tests> | ||
|
|
||
| <help> |
Contributor
There was a problem hiding this comment.
help section is not formatted .. planemo lint *.xml gives errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a new Galaxy tool, DNA Foundation Models, integrating the DNABERT-2 foundation model into Galaxy.
The tool supports two main execution modes:
In embedding mode, the tool processes a FASTA file by batching sequences through the model to generate embeddings. Pooling is configurable (
CLS, mean, or max), and outputs are written as a tabular file. Optionally, attention visualizations can be enabled, producing additional outputs via BertViz and related utilities.In fine-tuning mode, the tool takes tabular datasets (train/dev/test) in
(sequence, label)format and passes training parameters directly to the underlying training script. It exposes the main Trainer configuration options, such as batch size, learning rate, number of epochs, evaluation steps, and logging frequency.Two training strategies are supported:
Training artifacts (evaluation metrics, predictions, trainer state) are returned as outputs. Optionally, the trained model is returned as a
.tar.gzarchive.Notes
The original DNABERT-2 model is based on a MosaicBERT architecture that relies on a version of Flash Attention not compatible with newer PyTorch releases. This tool instead uses model weights loaded through an updated MosaicBERT implementation to ensure compatibility.
The model can be retrieved using the following script:
model-retrieval.py
FOR CONTRIBUTOR:
There are two labels that allow to ignore specific (false positive) tool linter errors:
skip-version-check: Use it if only a subset of the tools has been updated in a suite.skip-url-check: Use it if github CI sees 403 errors, but the URLs work.