Repository navigation
Defective-gene flag: per-species isolate count in loci.tsv and defective_by_species.tsv (#291) - #371
Merged
Merged
Conversation
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.
Presentation only (#291); no change to detection, calls or tiers. Nothing reads the new fields.
loci.tsvgetsdefective_isolatesbesidedefective_genes: for each listed defective genegene:k/n, the number of genomes of the same species (BFD species) with the gene flagged over the number whose locus of the same family lists it. Blank when nothing is flagged or the species is unknown.defective_by_species.tsv(species, family_called, gene, genomes_with_gene, genomes_flagged, fraction_flagged), sorted by flagged genomes.scripts/build_cleanrun_tables.py.Checked on the real v0.9.0 tables (
results/2026-11-09_v090_{ascomycota,basidiomycota}, function run on theirgenomes.tsvandloci.tsv, not a rebuild): C. auris flank genes are flagged in 1.0 to 1.5% of their genomes (OBP1 and PAP1 14 of 906, PIK1 9 of 940), as the issue says for an assembly indel. Flags that are near-universal in a species are mostly flank genes (A. oryzae APN2 128 of 128, F. asiaticum APN2 257 of 257) and F. oxysporum MAT1-1-2 (421 of 424); 25 species with at least 20 genomes are flagged in 90% or more, 99 in 5% or less; in Basidiomycota none reaches 90%. Caveat, written into the docs: a gene that every isolate models the same wrong way reads like a pseudogene, so the count separates an assembly indel from a shared feature, not a pseudogene from a mis-model. The issue's example (L. parapsilosis MTLA1, 97 of 97) does not appear in the v0.9.0 tables; it came from an earlier run.Tests:
tests/test_build_cleanrun_tables_script.py(a pseudogene pattern 3/3 against an indel 1/4, unknown species blank, families kept apart, a flagged gene counted as present, end-to-end columns and table, determinism); 87 passed with the site-data tests on the HPCC.Not done: the site (
build_site_data.py) does not show the count yet; the table fields are there for it.🤖 Generated with Claude Code