Skip to content
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 annotations on Roman-numeral chromosomes, report duplicate chromosomes #253

Merged
merged 5 commits into from
Nov 6, 2020

Conversation

eweitz
Copy link
Owner

@eweitz eweitz commented Nov 6, 2020

This improves error handling for raw annotations. It eliminates one class of user error, and provides helpful error messaging for another. In cases like #239, developer experience is now smoother and richer, letting client developers focus less on appeasing Ideogram.js and more on building useful genome visualizations.

Pass yeast annotations in any chromosome order

Client developers provide raw annotations to show genomic features in Ideogram -- locations of genes, etc.

Previously, raw annotations had to be sorted by chromosome. This was error-prone in organisms like yeast (Saccharomyces cerevisiae), which have chromosomes labeled with Roman numerals and domain-specific names like "MT". Client developers either needed to hard-code chromosome order for such organisms, or re-implement much of Ideogram's chromosome sorting algorithm. That's too much work!

Now, raw annotations can be passed in any chromosome order. Ideogram sorts raw annotations internally, as it does for its own chromosome objects. Client developers no longer need to worry about it.

Get notified about duplicate-chromosome errors

Raw annotation datasets can have errors, like specifying a given chromosome redundantly. Previously, this kind of user error passed by silently -- annotations were simply done twice. Such duplicate annotations are problematic in layouts that show feature count distribution, e.g. histograms as used in #239.

Now, an error is thrown in the console. It includes instructions on how to fix the problem. Here's what it looks like:

detect_duplicate_chromosomes_in_raw_annotations_ideogram_2020-11-06

@coveralls
Copy link

Coverage Status

Coverage increased (+0.003%) to 89.697% when pulling 56aecee on sort-roman-annotations into 3ebfb41 on master.

@eweitz eweitz merged commit 52334ae into master Nov 6, 2020
@eweitz eweitz deleted the sort-roman-annotations branch January 8, 2022 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants