Skip to content

Commit

Permalink
bugfix for #14
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz Kreft committed Mar 5, 2018
1 parent aab32a4 commit 9f74b34
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 125 deletions.
57 changes: 28 additions & 29 deletions scope-client/src/components/pages/Comparison.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,38 +128,37 @@ export default class Comparison extends Component {
</Grid.Column>
));

return (
if (!activeLoom) return (
<div>
<div style={{display: activeLoom == null ? 'block' : 'none'}}>
Select the dataset to be analyzed
</div>
<div style={{display: activeLoom != null ? 'block' : 'none'}}>
<Grid>
<Grid.Row columns="4">
<Grid.Column width={2} />
{featureSearch}
</Grid.Row>
<Grid.Row columns={3}>
<Grid.Column width={2}>
<Accordion styled>
{annotationTabs()}
</Accordion>
{/*
<br />
<Accordion styled>
{clusteringTabs()}
</Accordion>
*/}
<ViewerToolbar />
</Grid.Column>
<Grid.Column width={12}>
{viewers}
</Grid.Column>
</Grid.Row>
</Grid>
</div>
Select the dataset to be analyzed
</div>
);

return (
<Grid>
<Grid.Row columns="4">
<Grid.Column width={2} />
{featureSearch}
</Grid.Row>
<Grid.Row columns={3}>
<Grid.Column width={2}>
<Accordion styled>
{annotationTabs()}
</Accordion>
{/*
<br />
<Accordion styled>
{clusteringTabs()}
</Accordion>
*/}
<ViewerToolbar />
</Grid.Column>
<Grid.Column width={12}>
{viewers}
</Grid.Column>
</Grid.Row>
</Grid>
);
}

componentWillMount() {
Expand Down
63 changes: 31 additions & 32 deletions scope-client/src/components/pages/DNDCompare.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,41 +136,40 @@ class DNDCompare extends Component {
</Grid.Column>
));

return (
if (!activeLoom) return (
<div>
<div style={{display: activeLoom == null ? 'block' : 'none'}}>
Select the dataset to be analyzed
</div>
<div style={{display: activeLoom != null ? 'block' : 'none'}}>
<Grid>
<Grid.Row columns="4">
<Grid.Column width={2} >
Number of displays:
<Dropdown selection options={this.displayConf} defaultValue={4} onChange={this.displayNumberChanged.bind(this)}/>
</Grid.Column>
{featureSearch}
</Grid.Row>
<Grid.Row columns={3}>
<Grid.Column width={2}>
<Accordion styled>
{annotationTabs()}
</Accordion>
{/*
<br />
<Accordion styled>
{clusteringTabs()}
</Accordion>
*/}
<ViewerToolbar />
</Grid.Column>
<Grid.Column width={12}>
{viewers()}
</Grid.Column>
</Grid.Row>
</Grid>
</div>
Select the dataset to be analyzed
</div>
);

return (
<Grid>
<Grid.Row columns="4">
<Grid.Column width={2} >
Number of displays:
<Dropdown selection options={this.displayConf} defaultValue={4} onChange={this.displayNumberChanged.bind(this)}/>
</Grid.Column>
{featureSearch}
</Grid.Row>
<Grid.Row columns={3}>
<Grid.Column width={2}>
<Accordion styled>
{annotationTabs()}
</Accordion>
{/*
<br />
<Accordion styled>
{clusteringTabs()}
</Accordion>
*/}
<ViewerToolbar />
</Grid.Column>
<Grid.Column width={12}>
{viewers()}
</Grid.Column>
</Grid.Row>
</Grid>
);
}

isDropped(boxName) {
Expand Down
16 changes: 9 additions & 7 deletions scope-client/src/components/pages/Dataset.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ export default class Dataset extends Component {

render() {
const { activeLoom, metadata } = this.state;

if (!activeLoom) return (
<div>
Select the dataset to be analyzed
</div>
)

return (
<div>
<div style={{display: activeLoom == null ? 'block' : 'none'}}>
Select the dataset to be analyzed
</div>
<div style={{display: activeLoom != null ? 'block' : 'none'}}>
Active loom file: <b>{activeLoom}</b><br /><br />
<ReactJson src={metadata} collapsed={2} />
</div>
Active loom file: <b>{activeLoom}</b><br /><br />
<ReactJson src={metadata} collapsed={2} />
</div>
);
}
Expand Down
48 changes: 24 additions & 24 deletions scope-client/src/components/pages/Expression.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,33 +46,33 @@ export default class Expression extends Component {
})
}
*/
return (

if (!activeLoom) return (
<div>
<div style={{display: activeLoom == null ? 'block' : 'none'}}>
Select the dataset to be analyzed
</div>
<div style={{display: activeLoom != null ? 'block' : 'none'}}>
<Grid>
<Grid.Row columns="3">
{featureSearch}
</Grid.Row>
<Grid.Row columns="3">
<Grid.Column width={1}>
<ViewerToolbar />
</Grid.Column>
<Grid.Column width={sidebar ? 10 : 12}>
<b>Expression levels</b>
<Viewer name="expr" height={this.height} loomFile={activeLoom} activeFeatures={activeFeatures} activeCoordinates={activeCoordinates} />
</Grid.Column>
<Grid.Column width={3}>
<b>Cell selections</b><hr />
<ViewerSidebar />
</Grid.Column>
</Grid.Row>
</Grid>
</div>
Select the dataset to be analyzed
</div>
);

return (
<Grid>
<Grid.Row columns="3">
{featureSearch}
</Grid.Row>
<Grid.Row columns="3">
<Grid.Column width={1}>
<ViewerToolbar />
</Grid.Column>
<Grid.Column width={sidebar ? 10 : 12}>
<b>Expression levels</b>
<Viewer name="expr" height={this.height} loomFile={activeLoom} activeFeatures={activeFeatures} activeCoordinates={activeCoordinates} />
</Grid.Column>
<Grid.Column width={3}>
<b>Cell selections</b><hr />
<ViewerSidebar />
</Grid.Column>
</Grid.Row>
</Grid>
);
}

componentWillMount() {
Expand Down
65 changes: 32 additions & 33 deletions scope-client/src/components/pages/Regulon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,41 +49,40 @@ export default class Regulon extends Component {
</Grid.Column>
));

return (
if (!activeLoom) return (
<div>
<div style={{display: activeLoom == null ? 'block' : 'none'}}>
Select the dataset to be analyzed
</div>
<div style={{display: activeLoom != null ? 'block' : 'none'}}>
<Grid>
<Grid.Row columns="3">
{featureSearch}
</Grid.Row>
<Grid.Row columns="3">
{featureThreshold}
</Grid.Row>
<Grid.Row columns="4">
<Grid.Column width={1}>
<ViewerToolbar />
</Grid.Column>
<Grid.Column width={sidebar ? 6 : 7}>
<b>Regulon AUC values</b>
<Viewer name="reg" height={3 * this.height - 15} loomFile={activeLoom} activeFeatures={activeFeatures} scale={true} activeCoordinates={activeCoordinates} />
</Grid.Column>
<Grid.Column width={sidebar ? 4 : 5}>
<b>Cells passing thresholds</b>
<Viewer name="auc" height={3 * this.height / 2 - 15} loomFile={activeLoom} activeFeatures={activeFeatures} scale={false} activeCoordinates={activeCoordinates} />
<b>Expression levels</b>
<Viewer name="expr" height={3 * this.height / 2 - 15} loomFile={activeLoom} activeFeatures={geneFeatures} activeCoordinates={activeCoordinates} />
</Grid.Column>
<Grid.Column width={3}>
<b>Cell selections</b><hr />
<ViewerSidebar />
</Grid.Column>
</Grid.Row>
</Grid>
</div>
Select the dataset to be analyzed
</div>
)

return (
<Grid>
<Grid.Row columns="3">
{featureSearch}
</Grid.Row>
<Grid.Row columns="3">
{featureThreshold}
</Grid.Row>
<Grid.Row columns="4">
<Grid.Column width={1}>
<ViewerToolbar />
</Grid.Column>
<Grid.Column width={sidebar ? 6 : 7}>
<b>Regulon AUC values</b>
<Viewer name="reg" height={3 * this.height - 15} loomFile={activeLoom} activeFeatures={activeFeatures} scale={true} activeCoordinates={activeCoordinates} />
</Grid.Column>
<Grid.Column width={sidebar ? 4 : 5}>
<b>Cells passing thresholds</b>
<Viewer name="auc" height={3 * this.height / 2 - 15} loomFile={activeLoom} activeFeatures={activeFeatures} scale={false} activeCoordinates={activeCoordinates} />
<b>Expression levels</b>
<Viewer name="expr" height={3 * this.height / 2 - 15} loomFile={activeLoom} activeFeatures={geneFeatures} activeCoordinates={activeCoordinates} />
</Grid.Column>
<Grid.Column width={3}>
<b>Cell selections</b><hr />
<ViewerSidebar />
</Grid.Column>
</Grid.Row>
</Grid>
);
}

Expand Down

0 comments on commit 9f74b34

Please sign in to comment.