forked from cogent3/ensembldb3
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug fixes and enhancements #186
Merged
Merged
Conversation
This file contains 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
[FIXED] a side-effect of using python magic to get local variables, needed to exclude the local_vars variable which was added to address a python 3.13 side-effect
[FIXED] Genome.get_features(name=) has to be changed to Annotation.get_features(stable_id=) the first one has that name to match the cogent3 API. [CHANGED] the GeneView.get_features_matching() method now corrects for usage of name too
[CHANGED] Genome.get_ids_for_biotype() requires keyword args and now allows seqid to be a list of strings
[NEW] can provide a comma separated list of coordinate names, 'I,II' or a file with a coordinate name per line, to homologs --coord_names. Related to cogent3#168
Reviewer's Guide by SourceryThis pull request introduces a new feature to filter homologs by coordinate names and fixes a bug in the test suite. Sequence diagram for homolog filtering by coordinate namessequenceDiagram
participant User
participant CLI
participant Genome
participant AnnotationDB
User->>CLI: homologs command with coord_names
CLI->>CLI: _get_coord_names()
Note over CLI: Parse coord_names from file or comma-separated list
CLI->>Genome: get_ids_for_biotype()
Genome->>AnnotationDB: get_ids_for_biotype()
Note over AnnotationDB: Filter genes by biotype and seqid
AnnotationDB-->>Genome: filtered gene IDs
Genome-->>CLI: filtered gene IDs
CLI-->>User: filtered homolog results
Class diagram showing updated Genome and AnnotationDB methodsclassDiagram
class Genome {
+get_ids_for_biotype(biotype: str, seqid: str|list[str], limit: int) Iterator[str]
+get_features(biotype: str, seqid: str, name: str, start: int, stop: int, limit: int) Iterator[Feature]
}
class AnnotationDB {
+get_features_matching(stable_id: str, description: str, limit: int)
+genes: GeneData
}
Genome --> AnnotationDB
note for Genome "Modified to support filtering by seqid"
note for AnnotationDB "Updated feature matching logic"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @GavinHuttley - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Pull Request Test Coverage Report for Build 13065303803Details
💛 - Coveralls |
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.
Summary by Sourcery
Add the ability to specify reference coordinates when retrieving homologs.
New Features:
Tests: