Skip to content

Commit

Permalink
Merge pull request #160 from aertslab/157-display-trajectory
Browse files Browse the repository at this point in the history
157-display-trajectory
  • Loading branch information
dweemx authored Jul 6, 2018
2 parents be122b7 + 3f2fa8c commit 713c72a
Show file tree
Hide file tree
Showing 9 changed files with 409 additions and 122 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
# SCope v1.1.0: Visualization of large-scale and high dimensional single cell data
# SCope v1.2.0: Visualization of large-scale and high dimensional single cell data
<img src="images/SCope_Logo.png" width="640">

SCope is a fast visualization tool for large-scale and high dimensional scRNA-seq datasets.
Currently the data format supported by SCope is `.loom`. This file format for very large omics datasets is maintained by the Linnarsson Lab through the `loompy` Python package (https://github.com/linnarsson-lab/loompy).

## Version History

July 6, 2018

* Version 1.2.0
* Changes:
* Add feature to display trajectory data in the viewer. Currently the only way we provide to add trajectory data to .loom files is through [SCopeLoomR](https://github.com/aertslab/SCopeLoomR/).


July 4, 2018

* Version 1.1.0
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.2.0
325 changes: 240 additions & 85 deletions opt/scopeserver/dataserver/modules/gserver/s_pb2.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion opt/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
'scope-server = scopeserver.dataserver:dev'
]
},
version='1.1.0',
version='1.2.0',
description='SCope Data Server: a server to load and serve the data to the SCope Client',
url='',
author='Maxime De Waegeneer',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "SCope",
"version": "1.1.0",
"version": "1.2.0",
"description": "Visualization tool for large-scale and high dimensional single-cell data",
"main": "index.js",
"scripts": {
Expand Down
19 changes: 19 additions & 0 deletions src/components/AppSidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ class AppSidebar extends Component {
<Menu.Item>
<Dropdown inline value={activeCoordinates} options={coordinates} onChange={this.setActiveCoordinates.bind(this)} />
</Menu.Item>
{ BackendAPI.hasActiveCoordinatesTrajectory() &&
<div>
<Menu.Item>Trajectory</Menu.Item>
<Menu.Item>
<Checkbox toggle label="Hide" checked={settings.hideTrajectory} onChange={this.toggleHideTrajectory.bind(this)} />
</Menu.Item>
</div>
}
</Menu.Menu>
}
{ showTransforms &&
Expand Down Expand Up @@ -399,6 +407,17 @@ class AppSidebar extends Component {
});
}


toggleHideTrajectory() {
let settings = BackendAPI.setSetting('hideTrajectory', !this.state.settings.hideTrajectory);
this.setState({settings: settings});
ReactGA.event({
category: 'settings',
action: 'toggle hide trajectory',
label: settings.hideTrajectory ? 'on' : 'off'
});
}

setActiveCoordinates(evt, coords) {
BackendAPI.setActiveCoordinates(coords.value);
this.setState({ activeCoordinates: coords.value });
Expand Down
19 changes: 18 additions & 1 deletion src/components/common/API.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class API {
this.featureChangeListeners = {};

this.settings = {
hideTrajectory: false,
sortCells: true,
hasLogTransform: true,
hasCpmNormalization: false,
Expand Down Expand Up @@ -107,7 +108,7 @@ class API {
'activeLooms',
'activeCoordinates',
'features', 'gene', 'regulon', 'compare', 'feature', 'featureType', 'threshold', 'type', 'metadata', 'description',
'settings', 'hasCpmNormalization', 'hasLogTransform', 'sortCells', 'dissociateViewers',
'settings', 'hasCpmNormalization', 'hasLogTransform', 'sortCells', 'dissociateViewers', 'hideTrajectory',
'viewerTool',
'viewerSelections',
'viewerTransform',
Expand Down Expand Up @@ -243,6 +244,14 @@ class API {
return this.loomFiles[this.activeLooms[0]];
}

getActiveLoomMetadataEmbeddings() {
return this.loomFiles[this.activeLooms[0]].cellMetaData.embeddings;
}

getActiveLoomMetaDataEmbedding() {
return this.getActiveLoomMetadataEmbeddings().filter(x => x.id == this.getActiveCoordinates())[0]
}

onActiveLoomChange(listener) {
this.activeLoomChangeListeners.push(listener);
}
Expand All @@ -258,6 +267,14 @@ class API {
return this.activeCoordinates;
}

hasActiveCoordinatesTrajectory() {
return this.getActiveLoomMetaDataEmbedding().trajectory != null
}

getActiveCoordinatesTrajectory() {
return this.getActiveLoomMetaDataEmbedding().trajectory
}

queryLoomFiles(uuid, callback) {
let query = {
UUID: uuid
Expand Down
Loading

0 comments on commit 713c72a

Please sign in to comment.