joyplots working

This commit is contained in:
Colin Megill
2017-09-06 22:19:55 -07:00
parent 129ffa1ec6
commit 0e36aaf830
20 changed files with 680 additions and 146 deletions
+30
View File
@@ -0,0 +1,30 @@
const joyParser = (data, count = 20) => {
const genes = [];
/* setup */
for (let i = 0; i < count; i++) {
const gene = {
key: data.genes[i], /* key values naming: https://bl.ocks.org/armollica/3b5f83836c1de5cca7b1d35409a013e3 */
values: []
}
data.cells.forEach((cell) => {
gene.values.push({
value: cell["e"][i]
})
})
genes.push(gene)
}
return genes;
}
export default joyParser;