diff --git a/src/components/app.js b/src/components/app.js
index c18cd873..584ab33c 100644
--- a/src/components/app.js
+++ b/src/components/app.js
@@ -41,32 +41,6 @@ class App extends React.Component {
}
- createExpressionsCountsMap () {
-
- const CHANGE_ME_MAGIC_GENE_INDEX = 5;
-
- const expressionsCountsMap = {};
-
- /* currently selected gene */
- expressionsCountsMap.geneName = this.state.expressions.data.genes[3];
-
- let maxExpressionValue = 0;
-
- /* create map of expressions for every cell */
- this.state.expressions.data.cells.map((c) => {
- /* cellname = 234 */
- expressionsCountsMap[c.cellname] = c["e"][CHANGE_ME_MAGIC_GENE_INDEX];
- /* collect the maximum value as we iterate */
- if (c["e"][CHANGE_ME_MAGIC_GENE_INDEX] > maxExpressionValue) {
- maxExpressionValue = c["e"][CHANGE_ME_MAGIC_GENE_INDEX]
- }
- })
-
- expressionsCountsMap.maxValue = maxExpressionValue;
-
- return expressionsCountsMap;
- }
-
render() {
// console.log('app:', this.props, this.state)
@@ -86,11 +60,7 @@ class App extends React.Component {
{false ? : ""}
-
+
)
}
diff --git a/src/components/graph/util.js b/src/components/graph/util.js
new file mode 100644
index 00000000..2415ebc1
--- /dev/null
+++ b/src/components/graph/util.js
@@ -0,0 +1,25 @@
+createExpressionsCountsMap () {
+
+ const CHANGE_ME_MAGIC_GENE_INDEX = 5;
+
+ const expressionsCountsMap = {};
+
+ /* currently selected gene */
+ expressionsCountsMap.geneName = this.state.expressions.data.genes[3];
+
+ let maxExpressionValue = 0;
+
+ /* create map of expressions for every cell */
+ this.state.expressions.data.cells.map((c) => {
+ /* cellname = 234 */
+ expressionsCountsMap[c.cellname] = c["e"][CHANGE_ME_MAGIC_GENE_INDEX];
+ /* collect the maximum value as we iterate */
+ if (c["e"][CHANGE_ME_MAGIC_GENE_INDEX] > maxExpressionValue) {
+ maxExpressionValue = c["e"][CHANGE_ME_MAGIC_GENE_INDEX]
+ }
+ })
+
+ expressionsCountsMap.maxValue = maxExpressionValue;
+
+ return expressionsCountsMap;
+}