mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-23 15:18:12 +08:00
prototyping
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
// jshint esversion: 6
|
||||
/* rc slider https://www.npmjs.com/package/rc-slider */
|
||||
|
||||
import React from "react";
|
||||
import _ from "lodash";
|
||||
import { connect } from "react-redux";
|
||||
import HistogramBrush from "../brushableHistogram";
|
||||
import * as globals from "../../globals";
|
||||
import actions from "../../actions";
|
||||
|
||||
@connect(state => {
|
||||
return {};
|
||||
})
|
||||
class GeneSet extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {};
|
||||
}
|
||||
|
||||
render() {
|
||||
const { setName, setGenes } = this.props;
|
||||
return (
|
||||
<div>
|
||||
{setName}
|
||||
{_.map(setGenes, gene => {
|
||||
return <p key={gene}> {gene} </p>;
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default GeneSet;
|
||||
@@ -4,8 +4,8 @@
|
||||
import React from "react";
|
||||
import _ from "lodash";
|
||||
import fuzzysort from "fuzzysort";
|
||||
|
||||
import { connect } from "react-redux";
|
||||
import { Suggest } from "@blueprintjs/select";
|
||||
import {
|
||||
MenuItem,
|
||||
Button,
|
||||
@@ -13,7 +13,6 @@ import {
|
||||
InputGroup,
|
||||
ControlGroup
|
||||
} from "@blueprintjs/core";
|
||||
import { Suggest } from "@blueprintjs/select";
|
||||
import HistogramBrush from "../brushableHistogram";
|
||||
import * as globals from "../../globals";
|
||||
import actions from "../../actions";
|
||||
@@ -21,8 +20,10 @@ import {
|
||||
postUserErrorToast,
|
||||
keepAroundErrorToast
|
||||
} from "../framework/toasters";
|
||||
import GeneSet from "./geneSet";
|
||||
|
||||
import { memoize } from "../../util/dataframe/util";
|
||||
import testGeneSets from "./test_data";
|
||||
|
||||
const renderGene = (fuzzySortResult, { handleClick, modifiers }) => {
|
||||
if (!modifiers.matchesPredicate) {
|
||||
@@ -142,6 +143,18 @@ class GeneExpression extends React.Component {
|
||||
return undefined;
|
||||
};
|
||||
|
||||
renderTestGeneSets = () => {
|
||||
const sets = [];
|
||||
|
||||
_.forEach(testGeneSets, (setGenes, setName) => {
|
||||
sets.push(
|
||||
<GeneSet key={setName} setGenes={setGenes} setName={setName} />
|
||||
);
|
||||
});
|
||||
|
||||
return sets;
|
||||
};
|
||||
|
||||
placeholderGeneNames() {
|
||||
/*
|
||||
return a string containing gene name suggestions for use as a user hint.
|
||||
@@ -362,6 +375,7 @@ class GeneExpression extends React.Component {
|
||||
})
|
||||
: null}
|
||||
</div>
|
||||
<div>{this.renderTestGeneSets()}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user