Repository navigation
Protein trace: record what happens to every input protein - #106
Merged
Merged
Conversation
ali-yz
force-pushed
the
feat/protein-trace
branch
from
October 19, 2026 14:02
adcb620 to
c4bda92
Compare
alpae
requested changes
Oct 20, 2026
Member
|
the broken tests are unrelated. I fixed them in #107. If you rebase, things should become green again ;-) |
- Event logging in infer_roothogs and infer_subhogs is now off unless --protein-trace is given; Nextflow passes it when params.protein_trace is set. When off, no .events files are written and the extra bookkeeping (rootHOG assignment dicts, per-level member sets) is skipped. - fastoma-protein-trace sorts the event files on disk (GNU sort, stable) and processes one protein at a time instead of holding all events in memory; repeated strings (species, step, event, rootHOG) are interned. Peak memory on 500k synthetic proteins: 949 MB -> 224 MB, same output. protein_fates.tsv is now sorted by species and protein. - New withName "protein_trace" resources scaled by the event file size.
…der_id_transformer
ali-yz
force-pushed
the
feat/protein-trace
branch
from
October 22, 2026 09:06
c4bda92 to
a9dd74d
Compare
Author
|
@alpae Thank you so much for your comments, I believe they are addressed now. You can go ahead with the merge whenever ready. |
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.
Adds an optional protein trace (
--protein_trace true) that records, for every input protein, what happened to it during the run, and writes:protein_fates.tsv: one row per input protein with exactly one final fate (e.g.in_orthoxml,too_short,lost_in_split_hog,singleton_roothog_dropped, ...)protein_events.tsv.gz: all recorded events, sorted by species and proteinprotein_trace_summary.txt: counts per fate, the rootHOGs that lose the most proteins, and consistency checksHow it works
infer_roothogsandinfer_subhogswrite per-taskprotein_events_*.eventsfiles, but only when the new--protein-traceoption is given. Nextflow passes it whenparams.protein_traceis set; it is off by default, and then nothing is written and no extra work is done.protein_traceprocess merges the event files at the end. It sorts them on disk (GNUsort) and handles one protein at a time, so memory stays at a few hundred bytes per protein. Its memory request scales with the size of the event files (conf/base.config).How to use it
To turn it on, add
--protein_tracetrue to your Nextflow command. e.g.