diff --git a/src/components/expression/expression.js b/src/components/expression/expression.js
index 1b472030..0484d92a 100644
--- a/src/components/expression/expression.js
+++ b/src/components/expression/expression.js
@@ -12,40 +12,130 @@ import actions from "../../actions";
}
})
class DiffExp extends React.Component {
+ handleGeneColorScaleClick(gene) {
+ return () => {
+ this.props.dispatch(actions.requestSingleGeneExpressionCountsForColoringPOST(gene))
+ }
+ }
render() {
if (!this.props.differential.diffExp) return null
-
const topGenesForCellSet1 = this.props.differential.diffExp.data.celllist1;
const topGenesForCellSet2 = this.props.differential.diffExp.data.celllist2;
const rectSide = 10;
const rightMargin = 0;
+ const extent = d3.extent(
+ _.union(
+ topGenesForCellSet1.mean_expression_cellset1,
+ topGenesForCellSet1.mean_expression_cellset2,
+ topGenesForCellSet2.mean_expression_cellset1,
+ topGenesForCellSet2.mean_expression_cellset2
+ )
+ )
+
+ console.log('diffexp', this.props)
+ console.log('extent', extent)
+
+ const greyColorScale = d3.scaleSequential()
+ .domain(extent)
+ .interpolator(d3.interpolateGreys);
+
return (
-
Top genes expressed by cellset 1
-
Gene {"............"} Exp in set 1 {"............"} Exp in set 2
+
+
Gene
+
Set 1 exp
+
Set 2 exp
+
{
topGenesForCellSet1.topgenes.map((gene, i) => {
return (
-
- {gene} {"...................... "}
- {Math.floor(topGenesForCellSet1.mean_expression_cellset1[i])} {" ................... "}
- {Math.floor(topGenesForCellSet1.mean_expression_cellset2[i])}
-
+
+
+ 🎨
+ {gene}
+
+
+ {Math.floor(topGenesForCellSet1.mean_expression_cellset1[i])}
+
+
+ {Math.floor(topGenesForCellSet1.mean_expression_cellset2[i])}
+
+
)
})
}
-
Top genes expressed by cellset 2
-
Gene {"............"} Exp in set 1 {"............"} Exp in set 2
{
topGenesForCellSet2.topgenes.map((gene, i) => {
return (
-
- {gene} {"...................... "}
- {Math.floor(topGenesForCellSet2.mean_expression_cellset1[i])} {" ................... "}
- {Math.floor(topGenesForCellSet2.mean_expression_cellset2[i])}
-
+
+
+ 🎨
+ {gene}
+
+
+ {Math.floor(topGenesForCellSet2.mean_expression_cellset1[i])}
+
+
+ {Math.floor(topGenesForCellSet2.mean_expression_cellset2[i])}
+
+
)
})
}
@@ -54,6 +144,9 @@ class DiffExp extends React.Component {
}
}
+//
Top genes expressed by cellset 2
+//
Gene {"............"} Exp in set 1 {"............"} Exp in set 2
+
@connect((state) => {
return {
@@ -120,46 +213,74 @@ class Expression extends React.Component {
) {
return null
}
-
- console.log('expression render sees', this.props.differential)
return (
-
-
-
-