Skip to content

Instantly share code, notes, and snippets.

@joshkh
Last active August 29, 2015 14:25
Show Gist options
  • Save joshkh/97039a5d024d5c374322 to your computer and use it in GitHub Desktop.
Save joshkh/97039a5d024d5c374322 to your computer and use it in GitHub Desktop.
Intermine: SO Term counts by gene
<!doctype html>
<html>
<head>
<script src="http://cdn.intermine.org/js/intermine/imjs/3.14.0/im.js"></script>
</head>
<body>
<script>
var mousemine = new imjs.Service({root: 'www.mousemine.org/mousemine'});
queryjson = {"model":{"name":"genomic"},
"select":[
"Gene.primaryIdentifier",
"Gene.sequenceOntologyTerm.name"
],
"orderBy":[
{"Gene.primaryIdentifier":"ASC"}
]};
// Get each SO Term and the count of the genes that reference it.
mousemine.query(queryjson).then(function(imquery) {
imquery.summarize("Gene.sequenceOntologyTerm.name").then(function(results) {
console.log("reuslts", results);
debugger;
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment