From: Vaneet L. <van...@uc...> - 2019-02-26 17:57:32
|
Thanks Colin, it actually seemed to blank out all of the previous metadata referenced in trackList2.json and allow me to add my own fields if I enable all the unsafe attributes (unsafePopup, unsafeHTMLFeatures, unsafeMouseover). Is there any way to sort the list of metadata fields in ‘About this track’ box? It defaults to alphabetical order right now. Vaneet From: Colin <col...@gm...> Sent: Thursday, February 21, 2019 12:58 PM To: Vaneet Lotay <van...@uc...> Cc: gmod-ajax <gmo...@li...> Subject: Re: FW: JBrowse: override metadata display in 'About this track' box I wish I could say that there was a really elegant solution to all this. It is kind of a clunky solution to use all these fmt callbacks so to make it work currently is not elegant. But, if you want, some workarounds include 1. Adding a new field cannot be done straightforwardly, you can create a "dummy" value in the metadata section of your track and then use fmtMetaValue_dummy to customize it 2. fmtMetaValue_fieldname can modify existing fields also 3. To remove a field, return null from a fmtMetaField_fieldname As this applies to hundreds of tracks that sounds pretty annoying. If you want to formulate this as a github issue then please provide detail to reproduce and what you expect to have. -Colin On Thu, Feb 21, 2019 at 1:49 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hey Colin, I don’t think this is ComboTrackSelector specific as you can always specify the fields in the ‘About this track’ box and also have a faceted track selector as well, without the plugin. I was testing out these functions, and while fmtMetaValue_* allows you to change the value of an existing field already on the ‘About’ popup box, I don’t know how to remove fields that are being shown on it. As I said I have an external metadata CSV file being used in the faceted track selector to display the metadata for each track, but I don’t want that same metadata to be displayed in the ‘About’ popup box, I want to choose the fields and values that are displayed there. Do you know how I would specify for a field to be not visible in the popup box using the fmtMetaValue or fmtMetaField callback functions or others? Also I thought that fmtMetaField_* would allow me to specify a new data field to be shown in the popup box but I guess I didn’t figure out how to use it properly. There isn’t any documentation of use cases or examples for these 2 callback functions on the JBrowse websites, can you show me some examples of how to use them…specifically for these scenarios would help: -Specify a new ‘About this track’ field and value -Modify the value of an existing field in ‘About this track’ box -Specify which existing ‘About this track’ field should be removed or not visible when it pops up Basically if there is metadata used in the faceted track selector via tracklist2.json file, JBrowse seems to by default display that metadata in the ‘About this track’ box and I’m looking for a way to override that functionality or at least change the text content of it. Any help would be appreciated as I’m dealing with hundreds of tracks in this scenario. Thanks, Vaneet From: Colin <col...@gm...<mailto:col...@gm...>> Sent: Friday, January 25, 2019 10:51 AM To: Vaneet Lotay <van...@uc...<mailto:van...@uc...>>; gmod-ajax <gmo...@li...<mailto:gmo...@li...>> Subject: Re: FW: JBrowse: override metadata display in 'About this track' box I'm not sure if it is ComboTrackSelector specific but there are callbacks called fmtMetaValue_* and fmtMetaField_* callbacks in the config That can help customize the About popups -Colin On Fri, Jan 25, 2019 at 12:37 PM Vaneet Lotay <van...@uc...<mailto:van...@uc...>> wrote: Hey Colin, Any thoughts on how I can get around this? Or this metadata locked in once I have a reference to an external metadata CSV file? Thanks, Vaneet From: Vaneet Lotay Sent: Tuesday, January 22, 2019 2:47 PM To: gmo...@li...<mailto:gmo...@li...> Subject: JBrowse: override metadata display in 'About this track' box Hello, I am using the ComboTrackSelector plugin to have both the Hierarchical and Faceted track selectors active at the same time currently in my JBrowse. This is because I have metadata to display in the faceted track selector which comes from a CSV file. What I notice is that every column of this same metadata is displayed in the pop up box when I click on the track label drop down bar and select ‘About this track’. I’ve tried adding additional metadata fields or overwriting the content of some of the fields there because I didn’t like the format in which they are displayed but that doesn’t work it seems locked in to displaying the metadata from the CSV file referenced in the tracklist2.json file. Do you know if there’s any way I can stop it from displaying the metadata show in the faceted track selector and specify my own metadata fields to be displayed in the ‘About this track’ box possibly via the original tracklist.json file? Thanks, Vaneet Vaneet Lotay Xenbase Bioinformatician 716 ICT Building – University of Calgary 2500 University Drive NW Calgary, AB T2N 1N4 CANADA |