Skip to content

Stoptrain after trinity#1165

Merged
hyphaltip merged 19 commits into
masterfrom
stoptrain_after_trinity
May 24, 2026
Merged

Stoptrain after trinity#1165
hyphaltip merged 19 commits into
masterfrom
stoptrain_after_trinity

Conversation

@hyphaltip

Copy link
Copy Markdown
Collaborator

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_trinity to exit cleanly after Trinity genome-guided assembly (before PASA).
  • Make tbl2asn command construction dialect-aware (table2asn vs tbl2asn), including parallel runner updates and new unit tests.
  • Add pixi.toml and update the test .sbt template.

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 thread funannotate/train.py
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread funannotate/train.py Outdated
Comment thread funannotate/train.py Outdated
Comment thread funannotate/train.py Outdated
Comment thread pixi.toml
Comment thread pixi.toml
Comment thread funannotate/config/test.sbt Outdated
Comment thread funannotate/config/test.sbt Outdated
Comment thread funannotate/config/test.sbt Outdated
Comment thread pixi.toml Outdated
hyphaltip and others added 6 commits May 24, 2026 08:01
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>
@hyphaltip hyphaltip merged commit ba96279 into master May 24, 2026
1 check passed
@hyphaltip hyphaltip deleted the stoptrain_after_trinity branch June 3, 2026 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants