Commit Graph

116 Commits

Author SHA1 Message Date
James Taylor
f2eb2cad82 Use url_root from Flask rather than hardcoding hostname. (#520)
Allows running in a container on a remote host, should also allow running
behind a proxy with a url prefix.
2018-12-19 16:20:26 -08:00
Charlotte Weaver
f0f7200f0b Move jsonification to engine level (#511) 2018-12-18 21:14:24 -08:00
Colin Megill
a297ea30e2 bump version (#518) 2018-12-17 14:30:34 -05:00
Charlotte Weaver
83154577e4 Black -- formatter for python (#508)
* Add black

* use black to format code

* Black version
2018-12-12 09:44:47 -08:00
Charlotte Weaver
24af6efbcb Add Docker file (#505)
* Add docker support

* Add readme

* minor fixes
2018-12-11 10:18:10 -08:00
Bruce Martin
95fd20b405 bump version to 0.3 (#498) 2018-12-05 14:35:17 -08:00
Charlotte Weaver
5c6cc597c8 Default warning in debug mode (#497) 2018-12-05 13:38:34 -08:00
Bruce Martin
3bfeadc2b9 improve handling of non-finite floating point values (#490)
* improve HTTP error reporting

* generate standards-compatible JSON

* add --nan-to-num work-around for non-finite floating point values

* lint

* update tests

* correctly set Infinities to min/max

* REAMDE update for --nan-to-num

* define constant for repetitive warning message

* clarify where NaN errors will occure
2018-12-04 14:56:16 -08:00
Charlotte Weaver
1e66ec2b89 Update scikit learn (#487)
They finally fixed their cloud pickle issue
2018-11-30 12:02:28 -08:00
Charlotte Weaver
4a50f0ed46 External host option (#481)
* allow specifying host ip instead of listen all

* flask serving

* Limit to ip addresses only
2018-11-29 17:01:49 -08:00
Bruce Martin
af0d1f6fb2 issue #480 workaround (#484)
* only load annotation var names

* remove incorrect usage of var annotation data

* temporary workaround for issue #480

* lint

* issue warnings only once per item
2018-11-29 16:33:21 -08:00
Charlotte Weaver
76c0cbf16b loose -> lose (#479) 2018-11-28 13:07:10 -08:00
Charlotte Weaver
455d987398 Add custom format for warnings (#477)
[cellxgene] Warning: <message>
2018-11-28 12:47:11 -08:00
Charlotte Weaver
28f5263c88 bump version (#475) 2018-11-27 15:43:19 -08:00
Bruce Martin
933fac5fff Allow float64 to down-cast to float32 (#472)
* warn if annotations will down-cast to float32

* correctly handle falsey data values
2018-11-27 11:17:30 -08:00
Charlotte Weaver
0c26f227fe bump version (#470) 2018-11-26 15:38:47 -08:00
Charlotte Weaver
f2612707bb bumped version (#466) 2018-11-26 11:42:56 -08:00
Bruce Martin
138d30909a improve type handling for non-string annotation data (#465)
* improve type handling for non-string annotation data

* improve clarity of code
2018-11-26 10:32:29 -08:00
Charlotte Weaver
2b5094665f version 0.2.0 (#456) 2018-11-16 15:12:54 -08:00
Jeremy Freeman
a81258bc0d remove printing (#455) 2018-11-16 14:45:06 -08:00
Bruce Martin
141f802824 differential expression improvements (#452)
* add cutoff for low expression genes in topN selection

* remove debugging printfs

* change cli param name for diffexp cutoff

* change CLI param name

* second try at diffexp - using lfc sort with pval cutoff

* use lfc cutoff

* update comments to match code; cap p-value adjustment to max of 1

* lint

* explain diffexp in readme

* add link

* add diffexp-lfc-cutoff to test config

* update test to match revised diffexp spec

* fix latent bug in GET arg handling that was breaking tests

* lint

* comment cleanup

* fix variance overestimation so it is symmetric

* lint
2018-11-16 14:44:56 -08:00
Charlotte Weaver
1a5f49239a Release 0.0.4 (#447)
* 0.0.3 bump

* release 0.0.4
2018-11-15 16:43:59 -08:00
Charlotte Weaver
07cda497d9 build bug fixes (#438)
* Fixes compatibility conflict with numpy version and anndata version #434

* Forces description to be read as unicode

fixes #435
2018-11-14 14:21:02 -08:00
Bruce Martin
00a68276a2 diffexp performance & UX improvements (#431)
* new diffexp REST API spec

* new diffexp REST API; faster diffexp and dataframe slicing

* first draft of fast diffexp

* convert variance calculation to two-pass method

* lint

* update front-end use of API

* fix typo in spec

* disable content compression

* catch index filter format errors

* clean up of dead code

* resolve PR review comments
2018-11-14 12:51:24 -08:00
Charlotte Weaver
bc0cecbd1c Release Test (#427)
* bump-update

* Release Test!
2018-11-14 11:03:52 -08:00
Charlotte Weaver
aa29c91470 Prepare fixes (#416)
* Error on overwrite=false but no output file

* Add prepare requirements to requirements.txt

* no saved output error -> warning

* Catch clustering import error

* lint fixes

* Fix missing output message
2018-11-09 13:51:30 -08:00
Charlotte Weaver
dd56d0937c fix anaconda build (#421)
* fix anaconda build

* Added link for TKAgg

* Add matplotlib to requirements

We are pulling it in through scanpy, but since we are importing it directly we should include it explicitly
2018-11-09 13:22:45 -08:00
Charlotte Weaver
b4edd56735 Requirements updates (#422)
* Unpin requirements that do not need to be fixed

* add twine to dev requirements

* Add versions to dev too
2018-11-09 12:50:15 -08:00
Charlotte Weaver
1dc80145dc Add bumpversion (#423)
* Add bumpversion

* Update readme for bumpversion
2018-11-09 10:01:02 -08:00
Charlotte Weaver
7d5c054b90 Launch validation (#414)
* WIP

* Cleanup

* Validation

* typo

* Max category limit 100 -> 500
2018-11-07 13:01:13 -08:00
Bruce Martin
2d5bc9d0c9 Performance work, plus fix #405 (#406)
* remove memoization

* update to flash 1.0.2; turn on threading

* stand-alone helper routines for array slicing

* fix issue #405

* reset diffexp state when world changes

* performance work in dimension creation; fix world slicing bug

* update tests to match new state mgmt api

* update flask

* do not make dimensions for useless annotations

* update test to match optimizations
2018-11-05 13:57:58 -08:00
Jeremy Freeman
e2d864a336 integrate prepare cli (#401)
* move prepare into main CLI as subcommand

* naming and formatting tweaks to better match launch subcommand
2018-11-03 10:48:05 -04:00
Jeremy Freeman
0c8a07ac13 CLI refactor (#396)
* refactor cli to improve ux and enable easy incorporation of prepare as a subcommand

* switches to use click, which removes some boilerplate and gets us some improved ux for free

* changes the entry point for the cli

* changes the name of the browser option to --open and makes the default false
2018-11-02 10:52:50 -04:00
Bruce Martin
b181751493 add --obs-names and --var-names CLI params (#371)
* add --obs-names and --var-names CLI params

* fix lint

* performance improvements in scanpy engine

* fix lint

* fix typo

* correctly handle sparse formats in diffexp

* fix diffexp and 1d slicing

* diffexp uses t-stat, not pval; clean up arg handling

* make _slice a static method

* revise scanpy tests to match new API
2018-10-30 14:07:38 -07:00
Charlotte Weaver
26d222cd75 Move computation options to app (#386)
no need to import scanpy engine for CLI help so speeds up time response
2018-10-26 17:07:21 -07:00
Jeremy Freeman
75ca14e4aa add CLI tool for dataset preparation using scanpy (#364)
* add prepare cli

* fix handling of user path

* fixes for linter

* add flags and options for handling obs and var names

* add prepare cli

* fix handling of user path

* fixes for linter

* add flags and options for handling obs and var names

* address review requests
2018-10-26 16:44:41 -07:00
Charlotte Weaver
6c23a72e5f CLI renaming and phrasing (#385)
* Minor naming and phrasing changes from UX review

* category-selection-limit -> max-category-items
* Indicate load may taking a long time
* program -> command (for launch, prepare)
* debug -> verbose
* flask-debug -> debug

* Developer mode for debug

verbose on
open browser off

* move examples from epilogue to prefix
2018-10-26 15:59:34 -07:00
Charlotte Weaver
16b0741a6c Hide stack traces unless in debug mode (#384) 2018-10-26 13:36:53 -07:00
Charlotte Weaver
94f95d6565 CLI Launch (#366)
* Scanpy engine now required

Without the --engine param we need to error if scanpy engine cannot be imported rather than waiting for all engines

* CLI options and help matches proposal

(but not all options hooked up yet)

* Flesh out top level args

* Move computation args to engine

* CLI input file (#374)

* Fix test command

(tests still won't work)

* Input is file instead of directory
- also renamed example file

* Csweaver/debug (#376)

* Respect debug flag for logging flask calls

* Add loading messages

* max categories (#377)

* Add max categories

* Rename max_categories to category_selection_limit

* ensure whole numbers
2018-10-24 19:28:59 -07:00
Charlotte Weaver
02b2349807 Pin scikit-learn to fix imp error (#375) 2018-10-24 14:46:34 -07:00
Charlotte Weaver
85f44ccabf Converts NaNs in pval to 1s (#365) 2018-10-24 10:57:29 -07:00
Bruce Martin
3556bd11f5 fix lint (#369) 2018-10-24 07:12:51 -07:00
Charlotte Weaver
efb55a6332 Renaming bind-all option to listen-all (#353)
See discussion here https://docs.google.com/document/d/1tcAvODhdlUUAOJPHoGQB3fWOPmnw3XjK7MVhDRwNUnk/edit#
2018-10-19 15:26:19 -07:00
Charlotte Weaver
2a3577f32b flask debug as hidden option (#352)
* Remove flask debug flag

* Add debug flag as a hidden option to keep reload on change for developers
2018-10-19 10:24:15 -07:00
Charlotte Weaver
06f402ab0a Do not calculate layout, used saved layout instead (#343)
* Do not calculate layout, used saved layout instead

See for rationale: https://docs.google.com/document/d/1HJFvbdDHxxgkCW0DZzdTZ9CUMgc2ef2rQFukATBQWvE/edit

* Error handling for when layout has not been precomputed

* Server error (500) not client error (400) for unprepared data
2018-10-18 11:51:38 -07:00
Charlotte Weaver
7c8b89eba3 Launch browser to cellxgene (#325)
* Launch browser to cellxgene

Also added  --no-launch command line parameter

* Don't launch browser for tests

* rename no-launch to no-open

* Rejigger -no-open to positive destination

so later logic looks cleaner
2018-10-17 16:46:56 -07:00
Bruce Martin
76ec29734a Performance work (#334)
* range encode filter range lists

* speed up data load

* add comment on scanpy read params

* update to latest scanpy/anndata

* performance improvments in data loading

* fix typo

* work around scanpy bug

* remove debugging print statements
2018-10-16 15:49:40 -07:00
Charlotte Weaver
2e9d576890 Correct capitalization in swagger template (#320) 2018-10-11 16:43:26 -07:00
Charlotte Weaver
3229babd14 Add caching back in (#312)
* Add caching back in

Works now against filter instead of dataframe view

* Layout cache and move post->put

* Fix tests
2018-10-11 16:29:46 -07:00
Charlotte Weaver
b90292ce4c Bump interactive limits (#319) 2018-10-11 15:56:58 -07:00