You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Okay, I thought this was me not being able to figure out how the data was meant to be formatted. It's not though.
Annotation tracks are not being loaded for ideograms, either through a URL, or through a local list of dicts with the specified inputs (name, chr, start, stop) listed in the documentation.
If I load the example provided, using the url for the json in the example code, it works and annotations are loaded, but only for the X and Y chromosome. If I change the specified chromosomes to 1 and 2, the chromosomes display, but annotations do not. If I change only one of the chromosomes, i.e. to ["1","Y"], both chromosomes display, but neither have annotations. There are definitely annotations in the example json file for the specified chromosomes.
Loading annotations from a local file using annotationsPath does not work. I'm not the only person to report this. If I download the example file from the url and restrct the ideogram to the two chromosomes, X and Y, that work when loading from a url, then the chromosomes are displayed, but the annotations are not.
Loading from a list of dicts using the annotations identifier does not work. The documentation suggests that when using this method, one should specify name, chr, start and stop. Creating a list:
results in the chromosomes being displayed, but again, without annotations. If I switch to annotationsLayout="tracks", again, no annotations are displayed. Switching to annotationsLayout="histogram", annotations are displayed, though if you rotate the chromosome it causes the length of the chromosome to be compressed.
Additionally, it is not possible to have multiple tracks, as suggested by the documentation. Constructing the following annotation List and track list:
In addition to annotations displaying in a single track, as best I can understand from the documentation, I should be able to specify multiple tracks with different colours using annotationTracks.
This is using Python 3.6.11 in a new conda.
The text was updated successfully, but these errors were encountered:
I would suggest first copying the example JSONs and hosting it somewhere yourself where you can edit later (try github pages for the easiest path). It is true the Dash ideogram can't yet serve local JSONs. I forget where I found specific info about this but it's related to remote HTTPS requests through flask running locally.
The annotations documentation is incorrect. Supply just a list of lists with your values and omit the dict/keys. Supplying an actual remote json (via https) requires the dicts/lists format you see in the examples.
The documentation for the ideogram.js is not great but the source is there to see the actual implementation. I think a lot of functionality from the source has not been ported to the Dash platform yet.
Thanks for raising this issue, there's a lot of good feedback here.
One way to import local files for use with the Ideogram is to create an assets folder at the root of your app directory, and store your local datasets there.
Then, we can use annotationsPath=app.get_asset_url('10_virtual_cnvs.json') to set the local annotations path.
With #575, some of these annotation issues are fixed and annotations themselves are more consistent, but there's still a number of documentation updates planned which will make this a little more clear.
Okay, I thought this was me not being able to figure out how the data was meant to be formatted. It's not though.
Annotation tracks are not being loaded for ideograms, either through a URL, or through a local list of dicts with the specified inputs (name, chr, start, stop) listed in the documentation.
If I load the example provided, using the url for the json in the example code, it works and annotations are loaded, but only for the X and Y chromosome. If I change the specified chromosomes to 1 and 2, the chromosomes display, but annotations do not. If I change only one of the chromosomes, i.e. to ["1","Y"], both chromosomes display, but neither have annotations. There are definitely annotations in the example json file for the specified chromosomes.
Loading annotations from a local file using annotationsPath does not work. I'm not the only person to report this. If I download the example file from the url and restrct the ideogram to the two chromosomes, X and Y, that work when loading from a url, then the chromosomes are displayed, but the annotations are not.
Loading from a list of dicts using the annotations identifier does not work. The documentation suggests that when using this method, one should specify name, chr, start and stop. Creating a list:
and then calling
results in the chromosomes being displayed, but again, without annotations. If I switch to annotationsLayout="tracks", again, no annotations are displayed. Switching to annotationsLayout="histogram", annotations are displayed, though if you rotate the chromosome it causes the length of the chromosome to be compressed.
Additionally, it is not possible to have multiple tracks, as suggested by the documentation. Constructing the following annotation List and track list:
and then using those in the layout
again results in no annotations being displayed.
In addition to annotations displaying in a single track, as best I can understand from the documentation, I should be able to specify multiple tracks with different colours using annotationTracks.
This is using Python 3.6.11 in a new conda.
The text was updated successfully, but these errors were encountered: