Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

trackIndex in annotations? #137

Closed
abxka opened this issue Feb 25, 2019 · 7 comments
Closed

trackIndex in annotations? #137

abxka opened this issue Feb 25, 2019 · 7 comments

Comments

@abxka
Copy link

abxka commented Feb 25, 2019

I can’t get trackIndex to work when I simply use it in the annotations option. It only works in json files with annnotationsPath. Am I missing here something? Is there a trick to get it work?

@eweitz
Copy link
Owner

eweitz commented Feb 26, 2019

Hi @KAbdullah. No, you're right: trackIndex is currently only supported in raw annotations passed in via the annotationsPath option, and not the annotations option. This is mostly just a coincidence of development; I had not considered using it as you suggest.

Is using trackIndex via annotationsPath a viable approach for your use case? If not, I can look into also enabling trackIndex via the annotations option.

@abxka
Copy link
Author

abxka commented Feb 26, 2019

Thanks @eweitz for the quick reply.
No. If it is possible, please add trackIndex into the annotations option. I have a database of mutations for different patients. With the annotationsPath option, I would need to create for each patient a json file, which I would like to avoid. Best would be if I could send the trackIndex information on the fly to the ideogram.js library.

@eweitz
Copy link
Owner

eweitz commented Feb 26, 2019

OK, thanks for providing additional context.

I will try adding support for trackIndex to the annotations option. I'll update here by Monday.

@eweitz
Copy link
Owner

eweitz commented Feb 28, 2019

@KAbdullah, I've drafted support for trackIndex in the annotations option. Please:

On line 37 of that annotations-tracks.html file you'll see a truncated, client-side hard-coded version of the "raw annotations" that supports trackIndex, which is passed in via the annotations option. I imagine your data is formatted similarly.

Does that work for your use case?

If trying this as a draft NPM release you can reference in package.json would be easier than using a .tar.gz file, let me know.

@abxka
Copy link
Author

abxka commented Feb 28, 2019

Thanks @eweitz for implementing the ´trackIndex´ support for the ´annotations´ option. I don't see an example folder in the archive file you provided for download.

@eweitz
Copy link
Owner

eweitz commented Mar 1, 2019

My mistake, please try downloading that linked file again.

@abxka
Copy link
Author

abxka commented Mar 2, 2019

Dear @eweitz. Works smoothly now. Thanks for the quick implementation.

@abxka abxka closed this as completed Mar 2, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants