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

rangeSet does not support sex chromosomes #338

Open
mflevine opened this issue Feb 24, 2023 · 4 comments
Open

rangeSet does not support sex chromosomes #338

mflevine opened this issue Feb 24, 2023 · 4 comments

Comments

@mflevine
Copy link

I am trying to add coloring and annotation to CNVs using rangeSet but the coloring does not appear on sex chromosomes.
image

@eweitz
Copy link
Owner

eweitz commented Feb 26, 2023

Hi there, and thanks for using Ideogram! Could you provide data and configuration for a minimal reproducible example?

@mflevine
Copy link
Author

Thanks for the speedy response! It is a great library.

Here is an example. Loss of 22q and Yp, should be dark blue, but only 22 is rendered.

  var config = {
    organism: 'human',
    assembly: "GRCh37",
    chrHeight: 300,
    chrMargin: 2,
    annotationHeight: 0.1,
    annotations: [{"chr":"22","start":14500000,"stop":51304566,"color":"rgba(0, 0, 0, 0)","name":"0+0"},{"chr":"Y","start":1,"stop":11604552,"color":"rgba(0, 0, 0, 0)","name":"0+0"}],
    rangeSet: [{"chr":"22","start":14500000,"stop":51304566,"color":"#000F4A","name":"0+0"},{"chr":"Y","start":1,"stop":11604552,"color":"#000F4A","name":"0+0"}],
    annotationsLayout: 'overlay',
    orientation: 'horizontal',
    rotatable: false,
  };

  var ideogram = new Ideogram(config);

@zorgster
Copy link

I am also having trouble with annotations on GRCh37. When I press F12 (dev tools) in Edge, there is an error in the console which remains even when I remove annotations on the sex chromosomes:

Uncaught (in promise) Error: Base pair out of range. bp: 0; length of chrX: 155270560
at throwBpToPxError (coordinate-converters.js:13:9)
at Ideogram2.convertBpToPx (coordinate-converters.js:64:3)
at addAnnotsForChr (process.js:147:26)
at addAnnots (process.js:203:9)
at Ideogram2.processAnnotData (process.js:251:29)
at processAnnots (finish-init.js:38:24)
at Ideogram2.finishInit (finish-init.js:111:7)
at Ideogram2.writeContainer (write-container.js:113:8)
at init.js:234:10

@zorgster
Copy link

I've resolved my issue - the annotation I was using had one annot starting with 0, not 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants