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

Simplify reuse and add automated tests for "Related genes" feature #209

Merged
merged 8 commits into from
May 23, 2020

Conversation

eweitz
Copy link
Owner

@eweitz eweitz commented May 23, 2020

This encapsulates code for the "Related genes" example by moving code for that feature into a "kit" in the Ideogram library.

Kits are a new concept in Ideogram. They are tailored modules that reduce how much code developers need to maintain to recreate specific Ideogram examples. So while kits are part of the library, they are not in the core and will not be reused elsewhere in Ideogram. Kits also make it easier to verify complex use cases with automated tests.

The related genes kit is exposed through the new initRelatedGenes method. Example:

config = {
  organism: 'human',
  chrWidth: 8,
  chrHeight: 90,
  chrLabelSize: 10,
  annotationHeight: 5
}

let ideogram = Ideogram.initRelatedGenes(config);

That's 9 lines to recreate a minimal "Related genes" example -- about 350 lines less than before.

@coveralls
Copy link

Coverage Status

Coverage decreased (-14.9%) to 75.499% when pulling 8d73110 on abstract-related-genes into 33dfdad on master.

@eweitz eweitz merged commit 1919780 into master May 23, 2020
@eweitz eweitz deleted the abstract-related-genes branch May 23, 2020 15:30
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