[InterMine Dev] 'Download' button on bag report

Joe Carlson jwcarlson at lbl.gov
Sat May 30 00:23:23 BST 2015

Hello again,

It took a while, but now I see how to add the GO identifier back into the list generated by the ‘Download’ button on the enhancement widget.

line 1323 of intermine.widgets.js (version 1.12.6) is now:

result.push([model.get('description'), model.get('p-value')].join("\t") + "\t" + dict[model.get('identifier')].join(','));

but needs to be:

result.push([model.get('identifier’), model.get('description'), model.get('p-value')].join("\t") + "\t" + dict[model.get('identifier')].join(','));

While looking through the code a bit more, I see a few spots where there are routines loading specific javascript files from cdn.intermine.org. I’d like to replace these with our local copies so that we can host all of these files. But before I get into this too seriously, I was curious if there was going to be any structural changes in the javascript that will make this irrelevant in the near future. I’ve heard rumors of a new architecture of the front end; will those changes make a difference in here? And, if so, is there an estimated date on this release?

In order to make these changes, I’ll want to fork the github repository make it part of our build process. But if this is going to go away, maybe it’s not worth it.



On May 26, 2015, at 11:20 PM, Joe Carlson <jwcarlson at lbl.gov> wrote:

> Hi,
> I’m having a little trouble understand how some magic occurs in the enhancement widgets.
> On a gene ontology enrichment widget, there are buttons for ‘view’ and ‘download’. The download button results in a tab separated list of GO descriptions, p-values and genes. The GO identifier is not present.
> When I trace through what happens when the download button is pressed, I get something of type application/javascript which includes a jQuery function call with a JSON argument:
> jQuery18206181168801502899_1432704112334({"extraAttribute":"{\"gene_length\":{\"percentage_gene_length_not_null\":null,\"pathQueryGeneLengthNull\":null,\"gene_length_correction\":false}}","externalLink":"http://amigo.geneontology.org/cgi-bin/amigo/term_details?term=","filterSelectedValue":"biological_process","description":"GO terms enriched for items in this list.","label":"GO Term","filters":"biological_process,cellular_component,molecular_function","type":"Gene","list":"Demo: Poplar list in a pathway","title":"Gene Ontology Enrichment","pathConstraint":"Gene.goAnnotation.ontologyTerm.parents.identifier","notAnalysed":2,"pathQueryForMatches":"{\"model\":{\"name\":\"genomic\"},\"select\":[\"Gene.goAnnotation.ontologyTerm.parents.identifier\",\"Gene.primaryIdentifier\"],\"orderBy\":[{\"Gene.goAnnotation.ontologyTerm.parents.identifier\":\"ASC\"}],\"where\":[{\"path\":\"Gene\",\"op\":\"IN\",\"code\":\"A\",\"value\":\"Demo: Poplar list in a pathway\"}]}","requestedAt":"27 May 2015 06:01:15 GMT","is_logged":false,"current_population":null,"pathQuery":"{\"model\":{\"name\":\"genomic\"},\"select\":[\"Gene.secondaryIdentifier\",\"Gene.symbol\",\"Gene.primaryIdentifier\",\"Gene.organism.name\",\"Gene.goAnnotation.ontologyTerm.identifier\",\"Gene.goAnnotation.ontologyTerm.name\",\"Gene.goAnnotation.ontologyTerm.parents.identifier\",\"Gene.goAnnotation.ontologyTerm.parents.name\"],\"where\":[{\"path\":\"Gene\",\"op\":\"IN\",\"code\":\"A\",\"value\":\"Demo: Poplar list in a pathway\"}]}","filterLabel":"Ontology","results":[
> {"identifier":"GO:0009132","p-value":1.2417879361495878E-9,"description":"nucleoside diphosphate metabolic process","matches":4},
> ….
> I’m a little lost at this point in understanding the code. Firebug tells me that the routine jQuery18206181168801502899_1432704112334 is null.
> Not knowing anything about the intermine javascript api or bootstrap, I’m sort of lost in trying to see where this function gets defined. is is bootstrap? or intermine.js? Is this described in the section on Cell Formatters? I’m a little lost here.
> My goal is to get the GO identifier included in the tsv file you get when you press the Download button. Here is a URL that has some of our enhancement widgets:
> http://phytozome.jgi.doe.gov/phytomine/bagDetails.do?scope=all&bagName=Demo%3A+Poplar+list+in+a+pathway 
> By the way, I tried the download button on flymine. The button looks ineffective there. firebug tells me there is a javascript error.
> Thanks,
> Joe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.intermine.org/pipermail/dev/attachments/20150529/0461b938/attachment.html>

More information about the dev mailing list