Stoptrain after trinity#1165
Merged
Merged
Conversation
…is in pipelines which have multiple strains per species
…fault auto-discovers adaptor sequences but user can provide adapter_fasta with own sequences if needed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends funannotate train to support stopping after the Trinity step, improves NCBI submission tool compatibility by supporting the newer table2asn dialect alongside legacy tbl2asn, and introduces a pixi.toml environment definition.
Changes:
- Add
--stop_after_trinityto exit cleanly after Trinity genome-guided assembly (before PASA). - Make tbl2asn command construction dialect-aware (
table2asnvstbl2asn), including parallel runner updates and new unit tests. - Add
pixi.tomland update the test.sbttemplate.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_tbl2asn.py |
Adds unit tests for dialect-aware tbl2asn command generation and binary resolution. |
pixi.toml |
Introduces a pixi workspace/environment definition for the project. |
funannotate/train.py |
Adds --stop_after_trinity, adds --trimmer (trimmomatic/fastp/none), and compresses Trinity normalization outputs. |
funannotate/library.py |
Adds/updates tbl2asn binary resolution and dialect-aware command generation; updates countfasta to handle gz input. |
funannotate/funannotate.py |
Updates CLI help text to include --stop_after_trinity. |
funannotate/config/test.sbt |
Updates the example submission template fields and adds additional Seqdesc blocks. |
funannotate/aux_scripts/tbl2asn_parallel.py |
Makes parallel tbl2asn execution dialect-aware and resolves binary choice automatically. |
CHANGES.md |
Documents the new flags and normalization compression behavior for the branch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
144
to
152
| if readTuple[2]: # single reads present, so run normalization just on those reads | ||
| cmd = cmd + ['--single', readTuple[2]] | ||
| lib.runSubprocess(cmd, '.', lib.log, capture_output=SENormalLog) | ||
| single_norm = os.path.join(tmpdir, 'normalize', 'single.norm.fq') | ||
| single_norm = _compress_norm_fq( | ||
| os.path.join(tmpdir, 'normalize', 'single.norm.fq'), cpus) | ||
| if readTuple[0] and readTuple[1]: | ||
| cmd = cmd + ['--pairs_together', '--left', | ||
| readTuple[0], '--right', readTuple[1]] | ||
| left_norm = os.path.join(tmpdir, 'normalize', 'left.norm.fq') | ||
| right_norm = os.path.join(tmpdir, 'normalize', 'right.norm.fq') | ||
| readTuple[0], '--right', readTuple[1]] | ||
| lib.runSubprocess(cmd, '.', lib.log, capture_output=PENormalLog) |
Contributor
There was a problem hiding this comment.
Already addressed in commit 0742272. The function now builds base_cmd once and creates separate cmd lists via base_cmd + [...] for single-end (line 145) and paired-end (line 150) runs, so neither branch mutates the shared base.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Replace Fzip_inplace with Fzip to write compressed copies to the normalize working directory instead of modifying user-supplied --left_norm/--right_norm/--single_norm files in place.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
support table2asn dialect better and fix sbt issues.
new feature allow stop funannotate after train step to support building trinity transcript but not run pasa.
establish a pixi.toml for this project