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
In my scenario I have an overview with a brush and a detailed view. I want to get some of the data displayed in the detailed view in order to show it in a table. I'm using this event in the IslandVIewer example:
gosRef.current.api.subscribe('rawData',(type,rawdata)=>{// get range from highglass APIconstrange=gosRef.current.hgApi.api.getLocation(detailID).xDomain// filter to get the desired data set for the desired componentif(rawdata.data.length>0&&rawdata.id===detailID&&'Accnum'inrawdata.data[0]){// filter by range to get exactly the data displayed in the detailed viewconstdataInRange=rawdata.data.filter(entry=>(entry['Gene start']>range[0]&&entry['Gene start']<range[1])||(entry['Gene end']>range[0]&&entry['Gene end']<range[1]))// filter out duplicates constuniqueInRange=dataInRange.filter((v,i,a)=>a.findIndex(v2=>(v2['Gene name']===v['Gene name']))===i)setData(uniqueInRange)}});
When using the rawdata event using this function, rawdata has an attribute id and data, to show which data is currently displayed in the view with id. I found some issues with this that I am still trying to explore:
The data I get returned for the detailed view is not in the range that I get when retrieving the range manually using the highglass API (related to API for getting the current X domain #845) (Could this be because more data is rendered than displayed for smooth scrolling?)
Some elements in the raw data arrays occur multiple times
Not only the data for the track is returned but all data from the view.
In general, it would be a great enhancement to make the event listener a bit more fine-grained for example by specifying a view ID and a data set for which the data should be returned. Right now I need to manually filter for both.
The text was updated successfully, but these errors were encountered:
In my scenario I have an overview with a brush and a detailed view. I want to get some of the data displayed in the detailed view in order to show it in a table. I'm using this event in the IslandVIewer example:
When using the rawdata event using this function,
rawdata
has an attributeid
anddata
, to show which data is currently displayed in the view withid
. I found some issues with this that I am still trying to explore:In general, it would be a great enhancement to make the event listener a bit more fine-grained for example by specifying a view ID and a data set for which the data should be returned. Right now I need to manually filter for both.
The text was updated successfully, but these errors were encountered: