diff --git a/src/components/expression/expression.js b/src/components/expression/expression.js index a282afe6..1b472030 100644 --- a/src/components/expression/expression.js +++ b/src/components/expression/expression.js @@ -6,6 +6,55 @@ import styles from "./expression.css"; import SectionHeader from "../framework/sectionHeader" import actions from "../../actions"; +@connect((state) => { + return { + differential: state.differential + } +}) +class DiffExp extends React.Component { + 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; + + return ( +
Top genes expressed by cellset 1
+Gene {"............"} Exp in set 1 {"............"} Exp in set 2
+ { + topGenesForCellSet1.topgenes.map((gene, i) => { + return ( ++ {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])} +
+ ) + }) + } +