Last active
August 29, 2015 14:07
-
-
Save cmdcolin/5d4e2a1c055ef66640dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="require.js"></script> | |
// uses https://github.com/alexkalderimis/imjs | |
<script> | |
require(['js/im'], function(im) { | |
console.log(im); | |
var flymine = new im.Service({root: 'www.flymine.org/query'}); | |
var query = { | |
from: 'Gene', | |
select: [ | |
'exons.symbol', | |
'chromosome.primaryIdentifier', | |
'exons.chromosomeLocation.start', | |
'exons.chromosomeLocation.end' | |
], | |
where: { | |
symbol: 'eve', | |
organism: {lookup: 'D. melanogaster'}} | |
}; | |
flymine.rows(query).then(function(rows) { | |
console.log("No. of exons: " + rows.length); | |
rows.forEach(function printRow(row) { | |
console.log("[" + row[0] + "] " + row[1] + ":" + row[2] + ".." + row[3]); | |
}); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment