Repository navigation
Infer orthogroups across all seven species and attach them at harmonization (WP6, part 1) - #51
Merged
Merged
Conversation
…zation (WP6, part 1) - fetch-reference --proteins writes primary_proteins.faa: one protein per NCBI GeneID (the longest, by the feature table's product_length; ties to the lowest accession), recorded in the bundle provenance. All seven reference assemblies have one, 100% covered by their crosswalks (228,833 proteins). - aree build-orthogroups runs OrthoFinder (3.1.5, -M dendroblast; v3 has no orthogroups-only mode) on those proteomes and commits data/reference/orthogroups/<run_id>/: gene_orthogroups.tsv, orthogroups.tsv (copy class and copies per species), provenance.json (version, command, proteome checksums, assignment rates). - The run orthofinder3.1.5_2026-10-13 is committed and active: 38,507 orthogroups; 5,552 single-copy in all seven species, 7,031 single-copy where present, 11,877 multi-copy, 14,047 species-specific. - resolve_identifier attaches the active run's orthogroup to resolved real GeneIDs (crosswalks stay NCBI-only; the demo keeps its own); harmonize manifests record the run and its checksum. On HESSER2024_VCOR 274 of 306 resolved genes get one, and 190 of those are multi-copy. - fetch-reference no longer flags M. californianus: the GTF inserts "RefSeq" into a release name the registry records without it. - Tests: proteome selection, orthogroup parsing, copy classes, the written run, lookup and resolution, and invariants on the committed run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
First part of WP6 of the mussel and clam integration plan. It infers orthogroups across all seven registered species and attaches them to evidence at harmonization. Cross-species pooling on them is the next PR.
Why OrthoFinder on our own proteomes
The proteomes come from the same RefSeq annotations the crosswalks are built on, so every orthogroup member is a GeneID the harmonizer already resolves. OrthoDB's precomputed groups would need a second identifier mapping, and its coverage of these assemblies is uncertain.
What this adds
aree fetch-reference --proteins. Fetches NCBI's protein FASTA and feature table, MD5-verified, and writesprimary_proteins.faa: one protein per GeneID, the longest, with ties going to the lowest accession. The rule and counts are recorded in the bundle provenance. All seven reference assemblies have one, each 100% covered by its crosswalk: 228,833 proteins in all.aree build-orthogroups. Runs OrthoFinder in its own conda environment, so theareeenvironment andenvironment.ymlare untouched. It commitsdata/reference/orthogroups/<run_id>/:gene_orthogroups.tsv;orthogroups.tsv, with a copy class and the copies in each species;provenance.json, with the OrthoFinder version and command, proteome checksums, and assignment rates.resolve_identifierattaches the active run's orthogroup to resolved real GeneIDs. Crosswalks stay NCBI-only, and the demo crosswalk keeps its own illustrative orthogroups. Harmonize manifests record the run ID and the checksum of its gene table.fetch-referencefalsely failed M. californianus. Its GTF writes "NCBI RefSeq Mytilus californianus Annotation Release 100", while the registry has the same release without "RefSeq". The check now ignores that word.The run:
orthofinder3.1.5_2026-10-13(committed, 7.2 MB, active)OrthoFinder 3.1.5 ran with
-M dendroblast, since version 3 has no orthogroups-only mode. It took 6 threads and 55 minutes on Pori. OnlyOrthogroups.tsvis used.Shared with at least one other species: 95 to 98% of each mussel's genes, 85 to 88% of each clam's, and 77% of the oyster's. The oyster is the most distant lineage here.
Sanity checks:
On real evidence: re-harmonizing HESSER2024_VCOR attached an orthogroup to 274 of 306 resolved genes; the rest are non-coding. 190 of those 274 are in multi-copy orthogroups and only 18 are single-copy. Most genes stress studies report sit in expanded families, so cross-species pooling must say which copy class it rests on.
Tests
--proteins.active.yaml.test_real_crosswalk_resolves_a_known_genenow expects the active run's orthogroup instead of none.ruffis clean.Not in this PR
Evidence already harmonized before this merges, including the Manila clam study in #41, gains orthogroups when it is re-harmonized; the Pages build re-harmonizes committed results.
🤖 Generated with Claude Code