Closed verne91 closed 8 years ago
Do the genes themselves not have a "Name" field in your gff? You could just try this.feature.get('id') too
@cmdcolin My gff file don't have a "Name" field, but have a "ID" field.
chr01 irgsp1_rep gene 2983 10815 . + . ID=Os01g0100100
However, After I tried this.feature.get('ID'), it still seems the click do not work. And the config file of this track missed "url" within "onClick".
"onClick": { "action": "newWindow", "label": "Search for gene in database" },
When I change the "ID" to "id", it works. Thank you!
Good to hear.
Here is some "documentation" about the feature.get functions in case that helps! http://gmod.org/wiki/JBrowse_FAQ#How_do_I_access_data_about_my_features_in_my_callback_or_plugin
Hi,
When I configure the gff track, the "onClick" option do not work.
"onClick": { "action": "newWindow", "url": "function(track,feature,div) { return 'http://www.ncbi.nlm.nih.gov/gquery/?term='+this.feature.get('name'); }", "label": "Search for gene in database" }
When I click on gene, it seems that this.feature.get('name') returns nothing.
Thank you for your help!