Question about accessing popoverData without an Event

28 views
Skip to first unread message

math...@gmail.com

unread,
Nov 4, 2020, 9:36:48 PM11/4/20
to igv-help
Hello, 

Thanks to the igv.js team for the fantastic tool and their responses to questions & feature suggestions.  


I had a somewhat naive question about directly accessing data for an annotation track:

The igv.js clickTrack event has a handler "popoverData" that gives information for the clicked feature. An example feature's popoverData is pasted below:
[{"name":"Score","value":0},{"name":"Name","value":"37"},"<hr>","MN908947.3:16,626-17,125 (+)"]

I was wondering if there was a way of accessing the popoverData for all features (i.e. as JSON or an array) without invoking a clickTrack event? My use case would be matching names to filter out features that do not satisfy some criteria. 


Thank you in advance!

Hunter Gill
Ph.D. Student, IU School of Informatics & Computing @ IUPUI

James Robinson

unread,
Nov 4, 2020, 10:53:05 PM11/4/20
to igv-help
No its not, and I don't see how you would expect to filter features even if it were.    If you want to filter a more promising route would be to create a custom reader or feature source.    See examples/custom-reader.html.

--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/1ac75fb1-63f8-4c2c-8083-6411a9a06716o%40googlegroups.com.

Hunter Gill

unread,
Nov 5, 2020, 3:47:15 PM11/5/20
to igv-help
Hi, 

Thanks for the quick response and pointing me in right direction with custom readers. 

Just to clarify:
From the igv.js custom-reader example, it looks like the reader accepts a list of JSON-formatted objects? I'm looking at https://lk85l6ycte.execute-api.us-east-1.amazonaws.com/dev/testservice/bands?chr=chr1&start=0&end=248956422

I was also wondering if the reader could accept strand/strand-value as a JSON key-value pair? (i.e. "strand":"+")


Best, 
Hunter

Hunter Gill

unread,
Nov 5, 2020, 6:13:55 PM11/5/20
to igv-help
** Disregard the last sentence, I saw that this is in fact a key-value pair for annotation features:  https://github.com/igvteam/igv.js/wiki/Annotation-Track . 

James Robinson

unread,
Nov 5, 2020, 10:55:02 PM11/5/20
to igv-help
I don't really understand your question, but this isn't the appropriate forum for developer discussions.   Please open a ticket at github.com/igvteam/igv.js/issues.    Specify there exactly what you want to do,  including if applicable what track type and file format if possible,  the discussion so far is too vague.    I assume you've read the documentation github.com/igvteam/igv.js/wiki 


Reply all
Reply to author
Forward
0 new messages