Repository navigation
Take the taxonomy ID from the source's taxon db_xref - #1174
Open
josemduarte wants to merge 2 commits into
Open
josemduarte wants to merge 2 commits into
josemduarte wants to merge 2 commits into
Conversation
) 152970917.gb lists db_xref "ATCC:700721" before "taxon:272620" in its source feature. The proxy reader takes the first db_xref (ATCC:700721), and GenbankReader takes the last db_xref of the whole file (a CDS GeneID), so neither gives the taxon. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AbstractSequence used the first db_xref of the source feature, which can be a culture collection. GenbankReader used the parser's database references, which keep only the last db_xref of the file. Both now look for the db_xref whose database is "taxon" in the source feature, and set no taxonomy if there is none. 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.
Fixes #617.
Problem
The taxonomy ID was taken from the wrong
db_xref:AbstractSequence(proxy readers) used the firstdb_xrefof the source feature. When the source lists another reference first, e.g. a culture collection (ATCC:700721beforetaxon:272620), that became the taxonomy ID.GenbankReaderusedGenbankSequenceParser.getDatabaseReferences(), which is overwritten on everydb_xrefand so holds only the last one in the file. For152970917.gbthat is a CDSGeneID:5340071.Change
Both now take the
db_xrefwhose database istaxonfrom the source feature, and set no taxonomy if there is none.getDatabaseReferences()itself is unchanged.Testing
152970917.gb: a newGenbankReaderTest.testTaxonomyFromTaxonDbXref, andGenbankProxySequenceReaderTestnow requires the ID to start withtaxon:(it used to check only that the part after the colon is a number, whichATCC:700721happened to pass).biojava-coretests pass.🤖 Generated with Claude Code