-
Notifications
You must be signed in to change notification settings - Fork 5
Sort output #64
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
Sort output #64
Conversation
|
I think we could do something like: order_cols = []
if "gene" in tables:
order_cols += ["seq_name", "gene_seq_start"]
if "tx" in tables:
order_cols += ["tx_seq_start"]
if "exon" in tables:
order_cols += ["exon_seq_start"]to have a consistent total order. But idk for sure. Can this get some tests for expected behavior? |
|
I updated it like that. It now sorts in a consistent order. I also added assertions to the tests to validate this functionality. |
ivirshup
left a comment
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.
Could you add tests where we are selecting columns from a different table, e.g. .genes(["seq_name", "gene_...", "exon_id"]) and checking that the results are sorted?
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #64 +/- ##
==========================================
+ Coverage 92.94% 93.55% +0.61%
==========================================
Files 6 6
Lines 340 357 +17
==========================================
+ Hits 316 334 +18
+ Misses 24 23 -1
🚀 New features to boost your workflow:
|
|
Sorry for the delay on review/ approval but I wanted to dig into the duckdb behaviour we saw a bit more. An ibis maintainer believes this might be a duckdb bug. |
This PR orders the results. By default, it's ordered by chrom, start, and id. Custom ordering can be provided using
order_by.If subsets of columns are selected, then the columns are sorted with available columns and finally by
id.