Commit Graph
1060 Commits
Author SHA1 Message Date
Bruce Martin 040dbd3a95 refine load test (#1257) 2020-03-20 14:09:12 -07:00
Bruce Martin 8f09a4b1bc JS package fixes (#1248)
* Remove accidental package install from build

* remove accidental package install
2020-03-18 19:00:28 -07:00
bmccandless e4bf65c54a Improve hosted cellxgene (#1234)
* Improve hosted cellxgene

 - option to turn off the test index page, or supply a page for redirect.
   For EB, The default is to return 404.  For cli launch, the default is the test page.

 - option to select which matrix types are allowed for multi dataset servers.
   For EB, The default is CXG only.  For cli launch, the default is any matrix type.

 - Return early with an error response if diffexp is requested when not configured

 - Verified that reembedings and user annotations also return with an error response
   if used when not enabled.

TODO:  The new options cannot currently be set by the user.
I plan to add a configuration file where these and all other settings can be set.

 Fixes #1210 
 Fixes #1228  
 Fixes #1229
2020-03-18 16:21:03 -07:00
Bruce Martin 38c4ecac8c locust load test script (#1244)
* initial version of a locustfile driver

* README
2020-03-18 11:27:07 -07:00
bmccandless 8a733270d7 fixes for hosted cellxgene (#1227)
* Fix for favicon with --dataroot

* fix static assets in hosted cxg 

The web proxy at aws eb was not finding the static assets.

The solution here is very simple: just copy the directory
containing the static assets to the top level of the artifact.zip.

This is not really the ideal solution.  According to the AWS
docs you can make a mapping to the correct location in an
an ebextentions config file.  I tried this and many combinations but
was not able to get this to work following that pattern.

Since we control the construction of the zip file, the solution
here isn't bad, but it could probably be made better.
2020-03-16 09:47:01 -07:00
Matt WeidenandDonald Paul Herman 86cbe64ae8 Add color mapping to the bar chart (#1218)
* Add color mapping to the bar chart.

* Change histogram color generation from Viridis to InterpolateCool.

* Coloring of Histrogram based up the x axis instead of y axis.

Coloring of Histrogram based up the x axis instead of y axis.

* Respond to feedback from @colinmegill

* Only color histograms that are selected for colorby
* Add some small refactors to BrushableHistogram's componentDidUpdate

* Fix histogram coloring and binning

* Reuse binning functions from util/dataframe/histogram.js; this fixes
an issue with there being near-zero width bins
* Fix color mapping so that it matches the scale in the legend
* Do not attempt to plot bins if the calculated binWidth is zero; this
can happen if all values are the same
* Refactor the function that draws the histogram a bit

* Respond to feedback from @bkmartinjr

Co-authored-by: Donald Paul Herman <Donaldpherman@hotmail.com>
2020-03-14 15:24:52 -07:00
Bruce Martin 1e8d89f8f2 refinements for 0.15 (#1226) 2020-03-13 16:30:47 -07:00
Severiano Badajoz 9c2f57df39 bump version to 0.15.0 (#1222) 0.15.0 2020-03-13 13:11:12 -07:00
Bruce Martin 9bc83fdd02 update contributor process recommendations (#1213)
* update contrib process recommendations

* fix typos

* clarification

* fix build instructions

* updates suggested by Matt

* fix dead link
2020-03-13 11:41:30 -07:00
bmccandless bbfd2e5ac5 Add a simple annotations cache to the server (#1220)
Reading the user annotations had a performance problem.
The same file was read over and over.  Now, the last set of user
annotations are cached.
2020-03-12 20:06:44 -07:00
Bruce Martin f28bd52d79 fix performance regression caused by excessive rendering (#1219) 2020-03-12 15:05:08 -07:00
Bruce Martin 63f1f38f7c use AnchorButton so the tooltip dismisses (#1217) 2020-03-12 08:36:36 -07:00
Severiano Badajoz 3ba4cf4483 fix bug created from master rebase (#1216) 2020-03-11 15:20:20 -07:00
Matt Weiden a862f2b2a4 Further refine compatibility tests (#1215)
* Make sure apt is up to date before pulling hdf5

* Only install py dev reqs in cxg release vs anndata master test

* Don't need bu flag when using sed on ubuntu

* Don't re-install package reqs in python x anndata ver tests

* Minor documentation fix
2020-03-11 14:16:05 -07:00
Severiano Badajoz 3bf72829c2 pass empty coordinates when a continuous annotation is colored (#1212) 2020-03-11 13:01:14 -07:00
Severiano Badajoz 7cd9a0032a optimize centroid util (#1147)
* move unvarying evaluations outside of loop

* refactoring

* remove perf checks

* commenting

* minor fix + renaming

* small fix

* benchmarking

* merge master

* Revert pref checks

* renaming and comment

* remove redundant sets in Map
2020-03-11 12:35:42 -07:00
Sidney BellandMatt Weiden 9089fc98f2 annotations cli updates (#1190)
* Switch logic from `--annotations` to `--disable-annotations

* Rename `--annotations-file` --> `--annotations-input-file` and remove `experimental`

* update docs

* update makefile

* update tests

* Disable annotations on standard client smoke test

* Update docs/posts/annotations.md

Co-Authored-By: Matt Weiden <538456+mweiden@users.noreply.github.com>

* Update docs/posts/annotations.md

* Renaming

* Docs

* Update tests

* Pesky typo -_-

Co-authored-by: Matt Weiden <538456+mweiden@users.noreply.github.com>
2020-03-11 11:57:52 -07:00
Bruce Martin 8beeb57c96 Use DataLocator consistently on backend (#1208)
* allow DataLocator to accept another locator as init param

* migrate to DataLocator

* migrate to DataLocator

* lint

* migrate to DataLocator

* add check for erroroneous use of remote path and annotations

* lint

* revert default data location - now back go CWD

* remove unused import
2020-03-10 19:12:49 -07:00
Colin MegillandMatt Weiden 234f25b782 Conditionally truncate category string (#1206)
* maybe truncate string

* add string formatting to test

* correct import

* destructuring

* add maxlength

* test

* Respond to feedback from @bkmartinjr

Co-authored-by: Matt Weiden <538456+mweiden@users.noreply.github.com>
2020-03-10 18:14:26 -07:00
Bruce Martin 28ddb60b2f update JS deps (#1203) 2020-03-10 10:59:12 -07:00
Colin Megill 1a93068810 Prevent category collapsing on annotation edit, # of cells on add label button (#1204)
* collapse functionality

* expand collapse
2020-03-10 13:21:06 -04:00
Matt Weiden d8231a9a3b Fixes to compatibility tests (#1205)
* Unpin anndata ver in tests against anndata master

* Add branch config to work on push

* Add links to tests in GitHub Actions status badges

* Remove temporary branch name
2020-03-10 08:19:36 -07:00
Bruce Martin ffdcc24a40 remove pinned tables dependency (#1202) 2020-03-10 07:47:54 -07:00
Severiano Badajoz 023a73cab8 smoke-test centroids + graph overlay layer (#1189)
* add test labels

* prettier + add clcik return to clickOn()

* prettier + begin test

* finish label counting test

* add util to get coordinates of element

* add test id to labels

* add test to check overlay transform

* remove logs

* rename to match master
2020-03-09 17:01:22 -07:00
Bruce Martin 144b19c449 experimental re-embedding (#1186)
* first cut at re-embedding route and back-end support

* update and expand config route tests

* add scanpy_umap

* add reembedding to config route parameters

* front-end support for reembedding fetch and UI

* remove unused imports

* add loading state

* save reembedding in reducer state

* improve withColsFrom

* transmit reembed schema to client; pick unique embedding names

* display embeddings

* format

* lint

* spaces, tab size 2

* lint

* test hack for smoke-test race

* back out hack sleep

* add check for backed mode

* add unit test for reembedding

* lint

* hide re-embedding CLI param from help
2020-03-09 16:53:30 -07:00
bmccandlessandbkmartinjr b3e9719602 hosted cellxgene (#38) (#1200)
* early, non-working eb config

* hosted cellxgene

In this PR, contains scripts and instructions for deploying cellxgene
for AWS elastic beanstalk.  It supports the multi-dataset option.

The Makefile in the server/eb directory creates an artifact.zip
file, which can be deploy at AWS EB.

The server/eb directory contains:
  app.py - flask app to run the server
  Makefile - which creates an artifact.zip file which can be deployed.
  README.md - instructions for setting up and deploying the eb app.

* hosted cellxgene (#38)

In this PR, contains scripts and instructions for deploying cellxgene
for AWS elastic beanstalk.  It supports the multi-dataset option.

The Makefile in the server/eb directory creates an artifact.zip
file, which can be deploy at AWS EB.

The server/eb directory contains:
  app.py - flask app to run the server
  Makefile - which creates an artifact.zip file which can be deployed.
  README.md - instructions for setting up and deploying the eb app.

* Update how artifact.zip is created

prune the server/test and server/eb directories

* Remove debugging print statements

* fixes from review comments

* fix lint

Co-authored-by: bkmartinjr <bruce@chanzuckerberg.com>
2020-03-09 12:08:07 -07:00
Matt Weiden bdd69160e2 Do not over-prune var data cache (#1198)
* Remove unused variables and imports

* Simplify conditional

* Fix typo

* Do not overprune var data cache

There is a bug in how the universe and world gene sets are constructed
and passed to `ControlsHelpers.pruneVarDataCache` that causes the var
data cache to be over-pruned. This commit fixes the issue.

Consider the following example from the node console:

```
❯ node
Welcome to Node.js v13.5.0.
Type ".help" for more information.
> new Set([1], [2], [3])
Set(1) { 1 }
```

What we really want is the set `Set(3) { 1, 2, 3 }`, which can be
constructed as:

```
> new Set([].concat([1], [2], [3]))
Set(3) { 1, 2, 3 }
```
2020-03-05 18:04:14 -08:00
Matt Weiden bddf66d62a Use blueprint "disable" property to indicate disabled buttons (#1197)
* Use blueprint "disable" property to indicate that colorby disabled

* Disable subset and reset buttons when action is not possible
2020-03-05 09:46:41 -08:00
Matt Weiden 7b77bf4bdd Make smoke tests faster, more stable (#1195)
* Refactor smoke tests & utils for conciseness/style

* Modularize test utilities
2020-03-04 16:11:32 -08:00
Severiano Badajoz cc890fe391 fix url launching on Heroku deployments (#1196)
* fix improper branch link

* set app to use dataset link

* temp repo change

* revert to master

* add options var

* tweak option order

* remove options config arg
2020-03-04 13:05:11 -08:00
Severiano Badajoz 62e944796b enable camera interaction on centroids (#1160)
* pass handleCanvasEvent to graphOverlayLayer

* dont pass handlecanvasevent if not interactive
2020-03-04 11:31:30 -08:00
Matt Weiden 1547a864c2 Disable ColorBy button for truncated categories (#1191)
* Disable ColorBy button for truncated categories

Fixes https://github.com/chanzuckerberg/cellxgene/issues/1156

For categories that have more than 100 labels we truncate the labels in
the UI, but still allowed users to ColorBy these categories. Coloring by
these categories can cause browsers to get bogged down.

This commit disables ColorBy for truncated categories.

* Minor documentation spelling and typo fixes

* Respond to feedback from @liaprins-czi

* Respond to feedback from @colinmegill and @bkmartinjr
2020-03-04 09:19:12 -08:00
Matt Weiden 05323ae643 Undo selection appends genes from differential expression to user gene list (#1183)
* Undo selection appends diffExp genes to user gene list

Fixes https://github.com/chanzuckerberg/cellxgene/issues/1171

Need: When a user performs a differential expression from within
a sub-selection (world) of the data and then resets the selection to all
cells (universe), the differential expression results are no longer
valid.

Approach:
* When the selection is reset, move the top (maxUserDefinedGenes
- len(userDefinedGenes) from the differential expression results to the
list of user defined genes
* Raise maxUserDefinedGenes to 25 to give users more room and
accommodate the extra genes transferred in from differential expression

Other commits:
* Choose different button icons
* Add diff exp genes to user defined genes on subset too
* Respond to feedback from @liaprins-czi and @bkmartinjr
2020-03-02 12:07:12 -08:00
bmccandless 87efcc0e99 Fix a few bugs from server refactor (#1188)
- Fixes #1185 port command line argument was not handle correctly
 - Fixes #1184 was not catching the "DatasetAccessError" exception.
2020-03-02 11:55:57 -08:00
Bruce Martin bf7d7342d5 Improve label picking (#1179)
* add simple error message helper

* port all label name pickers to use the new LabelInput component

* use pure components where possible

* cleanup

* more cleanup

* lint

* change new label prompt
2020-02-28 15:46:40 -07:00
Matt Weiden 1e4381ab7f Make the Clip button primary (blue) (#1181)
Fixes https://github.com/chanzuckerberg/cellxgene/issues/1101

I can't reproduce the active/inactive issue described in #1101

The only change remaining in #1101 is to make the clip button blue.
This commit makes that change.
2020-02-26 16:54:30 -08:00
Matt Weiden 8b0adcdfcc Add codecov configuration (#1180)
* Add codecov configuration

* Modify workflow
2020-02-26 14:57:46 -08:00
Severiano Badajoz 0043308b52 add centroid util unit tests (#1172)
* scaffold the test

* create tests
2020-02-26 12:16:13 -08:00
Matt Weiden 8a62c9f027 Add undo/redo smoke tests for annotations (#1175)
* Add undo/redo tests for annotations

Fixes https://github.com/chanzuckerberg/cellxgene/issues/969

... also refactor the tests for DRY.

* Add done()

* Make e2e annotations tests safer to concurrency

* Add data-testclass for save state.

* Simplify tests and make them dependent on save state
2020-02-26 12:10:03 -08:00
Matt Weiden ded35c7252 Spelling fix in Compatibility Test workflow (#1178) 2020-02-26 11:12:16 -08:00
bmccandless 46876e2fb1 Fix various bugs with CXG format at annotations (#1173)
- Enable testing for this path

 - Fixes #1166
 - Fixes #1167
 - Fixes #1168
2020-02-24 18:19:39 -08:00
Bruce Martin 7bc58bba2b undo/redo cleanup (#1165)
* fix refactoring error which disabled annotation file clearing

* fix undo behavior on add category label

* fix various undo/redo bugs

* remove logging

* further refinement of annotation undo/redo and actions

* address PR comment
2020-02-24 18:51:26 -07:00
Matt Weiden 5c70cc5bcd Add codecov for code coverage of python and javascript (#1170)
* Add codecov to Push Test workflow

* Empty commit

* Clear reports and tag each with flags

* Tag code reports by test

* Fix codecov tags

* One more fix
2020-02-24 17:13:16 -08:00
Matt Weiden 281154f591 Add exclusions to flake8 config (#1169)
This excludes directories which should not be linted. This
1. makes the lint test more representative of what is run in CI
2. is faster
2020-02-24 08:33:25 -08:00
Matt Weiden c7f2032dd7 Add user-generated annotations tests to the server (#1164)
* Add user-generated annotations tests to the server

Partially completes https://github.com/chanzuckerberg/cellxgene/issues/969

* Auto-format python code

* @skip_if: passing lambdas > than property strings

* Respond to feedback from @bkmartinjr
2020-02-23 15:32:13 -08:00
Bruce Martin fb1f0c6469 fix latent crossfilter bug (#1162) 2020-02-21 14:14:41 -07:00
Bruce Martin d2bae0c4f6 CXG creator and dataset parameters (#1163)
* remove redundant call to make_response (lint)

* initial commit of H5AD to CXG converter

* lint

* PR review suggested comments

* cxg adaptor now understands group metadata

* lint
2020-02-21 12:49:45 -07:00
bmccandless 907cc634f5 server refactor (#1140)
This PR contains a refactoring to make adding new features easier.

The new features include supporting the tiledb format, and the multi dataset application.

The refactoring includes

Simplifying the directory structure and files.
a class structure to handle annotations (currently one type: AnnotationsLocalFile).
a class to handle application configuration
a class structure to handle matrix data (currently AnndataAdaptor and CxgAdaptor). CxgAdaptor uses tiledb.
Algorithms that were previously dependent on the scanpy anndata object are now generalized to work with an abstract interface.
The multi dataset option is not fully supported yet, and so the option to use it is hidden.
Use "cli launch --dataroot ..."
To access this feature.

All combinations of app single dataset/ app multi dataset and AnndataAdaptor/CxgAdaptor work with all the features, such as annotations, ontologies, diffexp.
2020-02-19 10:22:35 -08:00
Bruce Martin 349c413d8b anndata X indexing & version compatibility improvements (#1157)
* revert MatrixProxy; replace with correct use of adata slicing

* work around 0.6 adata slicing bug

* fix incorrect var slice

* simplify slicing of X

* add warning about performance impact of anndata<=0.7

* lint and remove unused code

* improve comment

* lint

* correctly parse versions

* temp files should preserve file suffix if possible - anndata 0.7 compat

* update anndata dependency to 0.6.20

* resolve PR review comments
2020-02-19 09:57:51 -07:00
Matt Weiden c630be33df Simplify CI checks on git push, add nightly checks on cron (#1158)
* Switch push tests to Github Actions

* Add nightly tests

* Add anndata check

* Add test status badges

* Add anndata 0.6.22.post1 workaround

* Rename Nightly tests to Compatibility Tests

* Fix to anndata fix

* Turn on cron schedule

* Fix badge mardown in README.md

* Fix cron schedule
2020-02-18 11:57:19 -08:00