diff --git a/.dockerignore b/.dockerignore index a7f3b242..5840c85c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,4 +2,4 @@ bin client dist docs -server +backend diff --git a/.github/workflows/compatibility_tests.yml b/.github/workflows/compatibility_tests.yml index ccb1075e..8ec9309e 100644 --- a/.github/workflows/compatibility_tests.yml +++ b/.github/workflows/compatibility_tests.yml @@ -41,8 +41,8 @@ jobs: run: | # 1. only install the dev requirements on top of what is in the cellxgene pip package sudo apt-get update && sudo apt-get install -y libhdf5-serial-dev - sed -i 's/-r requirements.txt//' server/requirements-dev.txt - pip install -r server/requirements-dev.txt + sed -i 's/-r requirements.txt//' backend/server/requirements-dev.txt + pip install -r backend/server/requirements-dev.txt # 2. install cellxgene make pydist install-dist # 3. install anndata @@ -73,8 +73,8 @@ jobs: cd cellxgene # 1. only install the dev requirements on top of what is in the cellxgene pip package make dev-env-client - sed -i 's/-r requirements.txt//' server/requirements-dev.txt - pip install -r server/requirements-dev.txt + sed -i 's/-r requirements.txt//' backend/server/requirements-dev.txt + pip install -r backend/server/requirements-dev.txt # 2. install cellxgene pip install --upgrade cellxgene # 3. install anndata @@ -101,7 +101,7 @@ jobs: - name: Install dependencies run: | cd cellxgene - sed -i -E 's/^anndata[>=]=[0-9]+.[0-9]+.[0-9]+$/anndata/g' server/requirements.txt + sed -i -E 's/^anndata[>=]=[0-9]+.[0-9]+.[0-9]+$/anndata/g' backend/server/requirements.txt make pydist install-dist dev-env pip install git+https://github.com/theislab/anndata - name: Tests diff --git a/.github/workflows/push_tests.yml b/.github/workflows/push_tests.yml index 0e21c56b..a14227f4 100644 --- a/.github/workflows/push_tests.yml +++ b/.github/workflows/push_tests.yml @@ -68,11 +68,11 @@ jobs: run: make pydist install-dist dev-env-server - name: Unit tests run: | - make unit-test - bash <(curl -s https://codecov.io/bash) -y .codecov.yml -k server -cF backend,python,unitTest + make unit-test-server + bash <(curl -s https://codecov.io/bash) -y .codecov.yml -k backend/server -cF backend,python,unitTest cd client && ./node_modules/codecov/bin/codecov --yml=../.codecov.yml --root=../ --gcov-root=../ -C -F frontend,javascript,unitTest - unit-test-local: + unit-test-czi-hosted: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -95,11 +95,11 @@ jobs: restore-keys: | ${{ runner.os }}-node- - name: Install dependencies - run: make pydist-local install-dist dev-env-local-server + run: make pydist-czi-hosted install-dist dev-env-czi-hosted - name: Unit tests run: | - make unit-test-local - bash <(curl -s https://codecov.io/bash) -y .codecov.yml -k local_server -cF backend,python,unitTest + make unit-test-czi-hosted + bash <(curl -s https://codecov.io/bash) -y .codecov.yml -k backend/czi-hosted -cF backend,python,unitTest cd client && ./node_modules/codecov/bin/codecov --yml=../.codecov.yml --root=../ --gcov-root=../ -C -F frontend,javascript,unitTest smoke-tests: @@ -126,7 +126,7 @@ jobs: restore-keys: | ${{ runner.os }}-node- - name: Install dependencies - run: make pydist install-dist + run: make pydist-czi-hosted install-dist - name: Smoke tests (without annotations feature) run: | cd client && make smoke-test @@ -156,7 +156,7 @@ jobs: restore-keys: | ${{ runner.os }}-node- - name: Install dependencies - run: make pydist-local install-dist + run: make pydist install-dist - name: Smoke tests (with annotations feature) run: | cd client && make smoke-test-annotations diff --git a/.github/workflows/scale-test.yml b/.github/workflows/scale-test.yml index 6e86de0e..b6a34e83 100644 --- a/.github/workflows/scale-test.yml +++ b/.github/workflows/scale-test.yml @@ -15,10 +15,10 @@ jobs: python-version: 3.7 - name: Install dependencies run: | - pip install -r server/test/locust/requirements-locust.txt + pip install -r backend/czi_hosted/test/locust/requirements-locust.txt - name: Dev Scale Test run: | - locust -f server/test/locust/locustfile.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt + locust -f backend/czi_hosted/test/locust/locustfile.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt - name: Slack success webhook env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} diff --git a/.gitignore b/.gitignore index 4de2274c..63ff7069 100644 --- a/.gitignore +++ b/.gitignore @@ -19,9 +19,13 @@ venv/ cellxgene/ # client build -server/common/web/static/* -server/common/web/templates/ -server/common/web/csp-hashes.json +backend/server/common/web/static/* +backend/server/common/web/templates/ +backend/server/common/web/csp-hashes.json + +backend/czi_hosted/common/web/static/* +backend/czi_hosted/common/web/templates/ +backend/czi_hosted/common/web/csp-hashes.json # eb build artifact.dir diff --git a/MANIFEST.in b/MANIFEST.in index 4dbe4057..1e6f65ba 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,7 @@ -recursive-include local_server/common/web/templates * -recursive-include local_server/common/web/static * +recursive-include backend/server/common/web/templates * +recursive-include backend/server/common/web/static * -include local_server/requirements.txt -include local_server/requirements-prepare.txt -include local_server/converters/schema/hgnc_complete_set.txt.gz -include local_server/converters/schema/schema_definitions/* +include backend/server/requirements.txt +include backend/server/requirements-prepare.txt +include backend/server/converters/schema/hgnc_complete_set.txt.gz +include backend/server/converters/schema/schema_definitions/* diff --git a/MANIFEST_hosted.in b/MANIFEST_hosted.in index 3a3b5b2b..6f349b1b 100644 --- a/MANIFEST_hosted.in +++ b/MANIFEST_hosted.in @@ -1,7 +1,7 @@ -recursive-include server/common/web/templates * -recursive-include server/common/web/static * +recursive-include backend/czi_hosted/common/web/templates * +recursive-include backend/czi_hosted/common/web/static * -include server/requirements.txt -include server/requirements-prepare.txt -include server/converters/schema/hgnc_complete_set.txt.gz -include server/converters/schema/schema_definitions/* +include backend/czi_hosted/requirements.txt +include backend/czi_hosted/requirements-prepare.txt +include backend/czi_hosted/converters/schema/hgnc_complete_set.txt.gz +include backend/czi_hosted/converters/schema/schema_definitions/* diff --git a/Makefile b/Makefile index 1344ea4a..1dd2ba44 100644 --- a/Makefile +++ b/Makefile @@ -2,24 +2,32 @@ include common.mk BUILDDIR := build CLIENTBUILD := $(BUILDDIR)/client -SERVERBUILD := $(BUILDDIR)/server -LOCALSERVERBUILD := $(BUILDDIR)/local_server +CZIHOSTEDBUILD := $(BUILDDIR)/backend/czi_hosted +SERVERBUILD := $(BUILDDIR)/backend/server CLEANFILES := $(BUILDDIR)/ client/build build dist cellxgene.egg-info PART ?= patch # CLEANING .PHONY: clean -clean: clean-lite clean-local-server clean-server clean-client +clean: clean-lite clean-czi-hosted clean-server clean-client # cleaning the client's node_modules is the longest one, so we avoid that if possible .PHONY: clean-lite clean-lite: rm -rf $(CLEANFILES) -clean-%: - cd $(subst -,_,$*) && $(MAKE) clean +.PHONY: clean-client +clean-client: + cd client && $(MAKE) clean +.PHONY: clean-server +clean-server: + cd backend/server && $(MAKE) clean + +.PHONY: clean-czi-hosted +clean-czi-hosted: + cd backend/czi_hosted && $(MAKE) clean # BUILDING PACKAGE @@ -27,54 +35,73 @@ clean-%: build-client: cd client && $(MAKE) ci build -.PHONY: build-local -build-local: clean build-client - git ls-files local_server/ | grep -v 'local_server/test/' | cpio -pdm $(BUILDDIR) - cp -r client/build/ $(CLIENTBUILD) - $(call copy_client_assets,$(CLIENTBUILD),$(LOCALSERVERBUILD)) - cp MANIFEST.in README.md setup.cfg setup.py $(BUILDDIR) - .PHONY: build build: clean build-client - git ls-files server/ | grep -v 'server/test/' | cpio -pdm $(BUILDDIR) + git ls-files backend/server/ | grep -v 'backend/server/test/' | cpio -pdm $(BUILDDIR) cp -r client/build/ $(CLIENTBUILD) $(call copy_client_assets,$(CLIENTBUILD),$(SERVERBUILD)) + cp backend/__init__.py $(BUILDDIR) + cp backend/__init__.py $(BUILDDIR)/backend + cp -r backend/common $(BUILDDIR)/backend/common + cp MANIFEST.in README.md setup.cfg setup.py $(BUILDDIR) + +.PHONY: build-czi-hosted +build-czi-hosted: clean build-client + git ls-files backend/czi_hosted/ | grep -v 'backend/czi_hosted/test/' | cpio -pdm $(BUILDDIR) + cp -r client/build/ $(CLIENTBUILD) + $(call copy_client_assets,$(CLIENTBUILD),$(CZIHOSTEDBUILD)) + cp -r backend/common $(BUILDDIR)/backend/common + cp backend/__init__.py $(BUILDDIR) + cp backend/__init__.py $(BUILDDIR)/backend cp MANIFEST_hosted.in README.md setup.cfg setup_hosted.py $(BUILDDIR) mv $(BUILDDIR)/setup_hosted.py $(BUILDDIR)/setup.py mv $(BUILDDIR)/MANIFEST_hosted.in $(BUILDDIR)/MANIFEST.in # If you are actively developing in the server folder use this, dirties the source tree -.PHONY: build-for-server-dev-local -build-for-server-dev-local: clean-local-server build-client - $(call copy_client_assets,client/build,local_server) - .PHONY: build-for-server-dev build-for-server-dev: clean-server build-client - $(call copy_client_assets,client/build,server) + $(call copy_client_assets,client/build,backend/server) -.PHONY: copy-client-assets-local -copy-client-assets-local: - $(call copy_client_assets,client/build,local_server) +.PHONY: build-for-czi-hosted-dev +build-for-czi-hosted-dev: clean-czi-hosted build-client + $(call copy_client_assets,client/build,backend/czi_hosted) .PHONY: copy-client-assets copy-client-assets: - $(call copy_client_assets,client/build,server) + $(call copy_client_assets,client/build,backend/server) + +.PHONY: copy-client-assets-czi-hosted +copy-client-assets-czi-hosted: + $(call copy_client_assets,client/build,backend/czi_hosted) # TESTING .PHONY: test test: unit-test smoke-test -.PHONY: test-local -test-local: unit-test-local smoke-test - -.PHONY: unit-test-local -unit-test-local: unit-test-local-server unit-test-client - .PHONY: unit-test -unit-test: unit-test-server unit-test-client +unit-test: unit-test-server unit-test-client unit-test-common -unit-test-%: - cd $(subst -,_,$*) && $(MAKE) unit-test +.PHONY: test-server +test-server: unit-test-server smoke-test + +.PHONY: test-czi-hosted +test-czi-hosted: unit-test-czi-hosted smoke-test + +.PHONY: unit-test-client +unit-test-client: + cd client && $(MAKE) unit-test + +.PHONY: unit-test-czi-hosted +unit-test-czi-hosted: + cd backend/czi_hosted && $(MAKE) unit-test + +.PHONY: unit-test-server +unit-test-server: + cd backend/server && $(MAKE) unit-test + +.PHONY: unit-test-common +unit-test-common: + cd backend/common && $(MAKE) unit-test .PHONY: smoke-test smoke-test: @@ -86,7 +113,7 @@ smoke-test-annotations: .PHONY: test-db test-db: - cd server && $(MAKE) test-db + cd backend/czi_hosted && $(MAKE) test-db # FORMATTING CODE @@ -105,15 +132,15 @@ fmt-py: lint: lint-servers lint-client .PHONY: lint-servers -lint-servers: lint-local-server lint-server - -.PHONY: lint-local-server -lint-local-server: fmt-py - flake8 local_server --per-file-ignores='local_server/test/fixtures/dataset_config_outline.py:F821 local_server/test/fixtures/server_config_outline.py:F821 local_server/test/performance/scale_test_annotations.py:E501' +lint-servers: lint-server lint-czi-hosted-server .PHONY: lint-server lint-server: fmt-py - flake8 server --per-file-ignores='server/test/fixtures/dataset_config_outline.py:F821 server/test/fixtures/server_config_outline.py:F821 server/test/performance/scale_test_annotations.py:E501' + flake8 backend/server --per-file-ignores='backend/test/fixtures/dataset_config_outline.py:F821 backend/test/fixtures/server_config_outline.py:F821 backend/server/test/performance/scale_test_annotations.py:E501' + +.PHONY: lint-czi-hosted-server +lint-czi-hosted-server: fmt-py + flake8 backend/czi_hosted --per-file-ignores='backend/test/fixtures/czi_hosted_dataset_config_outline.py:F821 backend/test/fixtures/czi_hosted_server_config_outline.py:F821 backend/test/performance/scale_test_annotations.py:E501' .PHONY: lint-client lint-client: @@ -121,13 +148,13 @@ lint-client: # CREATING DISTRIBUTION RELEASE -.PHONY: pydist-local -pydist-local: build-local +.PHONY: pydist +pydist: build cd $(BUILDDIR); python setup.py sdist -d ../dist @echo "done" .PHONY: pydist -pydist: build +pydist-czi-hosted: build-czi-hosted cd $(BUILDDIR); python setup.py sdist -d ../dist @echo "done" @@ -171,19 +198,19 @@ release-directly-to-prod: dev-env pydist twine-prod @echo " make install-release" .PHONY: dev-env -dev-env: dev-env-client dev-env-local-server +dev-env: dev-env-client dev-env-server .PHONY: dev-env-client dev-env-client: cd client && $(MAKE) ci -.PHONY: dev-env-local-server -dev-env-local-server: - pip install -r local_server/requirements-dev.txt - .PHONY: dev-env-server dev-env-server: - pip install -r server/requirements-dev.txt + pip install -r backend/server/requirements-dev.txt + +.PHONY: dev-env-czi-hosted +dev-env-czi-hosted: + pip install -r backend/czi_hosted/requirements-dev.txt # Set PART=[major, minor, patch] as param to make bump. # This will create a release candidate. (i.e. 0.16.1 -> 0.16.2-rc.0 for a patch bump) .PHONY: bump-version diff --git a/local_server/app/__init__.py b/backend/__init__.py similarity index 100% rename from local_server/app/__init__.py rename to backend/__init__.py diff --git a/backend/common/Makefile b/backend/common/Makefile new file mode 100644 index 00000000..767c7f58 --- /dev/null +++ b/backend/common/Makefile @@ -0,0 +1,11 @@ + +.PHONY: unit-test +unit-test: + PYTHONWARNINGS=ignore:ResourceWarning coverage run \ + --source=fbs,utils \ + --omit=.coverage,data_common/fbs/NetEncoding,venv \ + -m unittest discover \ + --start-directory ../test/test_common/unit \ + --top-level-directory ../../ \ + --verbose; test_result=$$?; \ + exit $$test_result \ diff --git a/local_server/cli/__init__.py b/backend/common/__init__.py similarity index 100% rename from local_server/cli/__init__.py rename to backend/common/__init__.py diff --git a/server/common/colors.py b/backend/common/colors.py similarity index 99% rename from server/common/colors.py rename to backend/common/colors.py index 17f9eb56..cd22091f 100644 --- a/server/common/colors.py +++ b/backend/common/colors.py @@ -1,6 +1,6 @@ import re -from server.common.errors import ColorFormatException +from backend.common.errors import ColorFormatException HEX_COLOR_FORMAT = re.compile("^#[a-fA-F0-9]{6,6}$") diff --git a/local_server/common/constants.py b/backend/common/constants.py similarity index 100% rename from local_server/common/constants.py rename to backend/common/constants.py diff --git a/local_server/common/errors.py b/backend/common/errors.py similarity index 100% rename from local_server/common/errors.py rename to backend/common/errors.py diff --git a/local_server/data_common/fbs/NetEncoding/Column.py b/backend/common/fbs/NetEncoding/Column.py similarity index 100% rename from local_server/data_common/fbs/NetEncoding/Column.py rename to backend/common/fbs/NetEncoding/Column.py diff --git a/local_server/data_common/fbs/NetEncoding/Float32Array.py b/backend/common/fbs/NetEncoding/Float32Array.py similarity index 100% rename from local_server/data_common/fbs/NetEncoding/Float32Array.py rename to backend/common/fbs/NetEncoding/Float32Array.py diff --git a/local_server/data_common/fbs/NetEncoding/Float64Array.py b/backend/common/fbs/NetEncoding/Float64Array.py similarity index 100% rename from local_server/data_common/fbs/NetEncoding/Float64Array.py rename to backend/common/fbs/NetEncoding/Float64Array.py diff --git a/local_server/data_common/fbs/NetEncoding/Int32Array.py b/backend/common/fbs/NetEncoding/Int32Array.py similarity index 100% rename from local_server/data_common/fbs/NetEncoding/Int32Array.py rename to backend/common/fbs/NetEncoding/Int32Array.py diff --git a/local_server/data_common/fbs/NetEncoding/JSONEncodedArray.py b/backend/common/fbs/NetEncoding/JSONEncodedArray.py similarity index 100% rename from local_server/data_common/fbs/NetEncoding/JSONEncodedArray.py rename to backend/common/fbs/NetEncoding/JSONEncodedArray.py diff --git a/local_server/data_common/fbs/NetEncoding/Matrix.py b/backend/common/fbs/NetEncoding/Matrix.py similarity index 100% rename from local_server/data_common/fbs/NetEncoding/Matrix.py rename to backend/common/fbs/NetEncoding/Matrix.py diff --git a/local_server/data_common/fbs/NetEncoding/TypedArray.py b/backend/common/fbs/NetEncoding/TypedArray.py similarity index 100% rename from local_server/data_common/fbs/NetEncoding/TypedArray.py rename to backend/common/fbs/NetEncoding/TypedArray.py diff --git a/local_server/data_common/fbs/NetEncoding/Uint32Array.py b/backend/common/fbs/NetEncoding/Uint32Array.py similarity index 100% rename from local_server/data_common/fbs/NetEncoding/Uint32Array.py rename to backend/common/fbs/NetEncoding/Uint32Array.py diff --git a/local_server/common/__init__.py b/backend/common/fbs/NetEncoding/__init__.py similarity index 100% rename from local_server/common/__init__.py rename to backend/common/fbs/NetEncoding/__init__.py diff --git a/local_server/common/annotations/__init__.py b/backend/common/fbs/__init__.py similarity index 100% rename from local_server/common/annotations/__init__.py rename to backend/common/fbs/__init__.py diff --git a/server/data_common/fbs/matrix.py b/backend/common/fbs/matrix.py similarity index 94% rename from server/data_common/fbs/matrix.py rename to backend/common/fbs/matrix.py index e4e33d33..0cb696d7 100644 --- a/server/data_common/fbs/matrix.py +++ b/backend/common/fbs/matrix.py @@ -5,15 +5,14 @@ import pandas as pd from flatbuffers import Builder from scipy import sparse -import server.data_common.fbs.NetEncoding.Column as Column -import server.data_common.fbs.NetEncoding.Float32Array as Float32Array -import server.data_common.fbs.NetEncoding.Float64Array as Float64Array -import server.data_common.fbs.NetEncoding.Int32Array as Int32Array -import server.data_common.fbs.NetEncoding.JSONEncodedArray as JSONEncodedArray -import server.data_common.fbs.NetEncoding.Matrix as Matrix -import server.data_common.fbs.NetEncoding.TypedArray as TypedArray -import server.data_common.fbs.NetEncoding.Uint32Array as Uint32Array - +import backend.common.fbs.NetEncoding.Column as Column +import backend.common.fbs.NetEncoding.Float32Array as Float32Array +import backend.common.fbs.NetEncoding.Float64Array as Float64Array +import backend.common.fbs.NetEncoding.Int32Array as Int32Array +import backend.common.fbs.NetEncoding.JSONEncodedArray as JSONEncodedArray +import backend.common.fbs.NetEncoding.Matrix as Matrix +import backend.common.fbs.NetEncoding.TypedArray as TypedArray +import backend.common.fbs.NetEncoding.Uint32Array as Uint32Array # Serialization helper def serialize_column(builder, typed_arr): diff --git a/local_server/common/utils/__init__.py b/backend/common/utils/__init__.py similarity index 100% rename from local_server/common/utils/__init__.py rename to backend/common/utils/__init__.py diff --git a/server/common/aws_secret_utils.py b/backend/common/utils/aws_secret_utils.py similarity index 92% rename from server/common/aws_secret_utils.py rename to backend/common/utils/aws_secret_utils.py index ce40794d..b3c8c0d9 100644 --- a/server/common/aws_secret_utils.py +++ b/backend/common/utils/aws_secret_utils.py @@ -3,7 +3,7 @@ import logging import boto3 from flask import json -from server.common.errors import SecretKeyRetrievalError +from backend.common.errors import SecretKeyRetrievalError def get_secret_key(region_name, secret_name): diff --git a/local_server/common/data_locator.py b/backend/common/utils/data_locator.py similarity index 100% rename from local_server/common/data_locator.py rename to backend/common/utils/data_locator.py diff --git a/local_server/common/utils/type_conversion_utils.py b/backend/common/utils/type_conversion_utils.py similarity index 100% rename from local_server/common/utils/type_conversion_utils.py rename to backend/common/utils/type_conversion_utils.py diff --git a/server/common/utils/utils.py b/backend/common/utils/utils.py similarity index 98% rename from server/common/utils/utils.py rename to backend/common/utils/utils.py index c6bb24f0..1fd36c48 100644 --- a/server/common/utils/utils.py +++ b/backend/common/utils/utils.py @@ -10,7 +10,7 @@ from urllib.parse import urlsplit, urljoin import numpy as np from flask import json -from server.common.errors import ConfigurationError +from backend.common.errors import ConfigurationError def find_available_port(host, port=5005): diff --git a/server/Makefile b/backend/czi_hosted/Makefile similarity index 55% rename from server/Makefile rename to backend/czi_hosted/Makefile index 016f89cc..538c68ff 100644 --- a/server/Makefile +++ b/backend/czi_hosted/Makefile @@ -1,4 +1,4 @@ -include ../common.mk +include ../../common.mk .PHONY: clean clean: @@ -9,11 +9,11 @@ clean: .PHONY: unit-test unit-test: create-test-db PYTHONWARNINGS=ignore:ResourceWarning coverage run \ - --source=app,cli,common,compute,converters,data_anndata,data_common,data_cxg \ - --omit=.coverage,data_common/fbs/NetEncoding,venv \ + --source=app,auth,cli,common,compute,converters,data_anndata,data_common,data_cxg,eb \ + --omit=.coverage,venv \ -m unittest discover \ - --start-directory test/ \ - --top-level-directory ../ \ + --start-directory ../test/test_czi_hosted/unit \ + --top-level-directory ../.. \ --verbose; test_result=$$?; \ $(MAKE) clean-test-db; \ exit $$test_result \ @@ -22,11 +22,11 @@ unit-test: create-test-db .PHONY: test-db test-db: create-test-db PYTHONWARNINGS=ignore:ResourceWarning coverage run \ - --source=app,cli,common,compute,converters,data_anndata,data_common,data_cxg \ - --omit=.coverage,data_common/fbs/NetEncoding,venv \ + --source=db \ + --omit=.coverage,venv \ -m unittest discover \ - --start-directory test/test_database \ - --top-level-directory ../ \ + --start-directory ../test/test_czi_hosted/test_database \ + --top-level-directory ../.. \ --verbose; test_result=$$?; \ $(MAKE) clean-test-db; \ exit $$test_result @@ -42,8 +42,8 @@ clean-test-db: .PHONY: test-annotations-performance test-annotations-performance: - python test/performance/performance_test_annotations_backend.py + python ../test/test_czi_hosted/performance/performance_test_annotations_backend.py .PHONY: test-annotations-scale test-annotations-scale: - locust -f test/performance/scale_test_annotations.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt + locust -f ../test/test_czi_hosted/performance/scale_test_annotations.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt diff --git a/server/__init__.py b/backend/czi_hosted/__init__.py similarity index 73% rename from server/__init__.py rename to backend/czi_hosted/__init__.py index 2c855aaa..053bc062 100644 --- a/server/__init__.py +++ b/backend/czi_hosted/__init__.py @@ -1,12 +1,14 @@ import logging import sys -from server.common.utils.utils import import_plugins +from backend.common.utils.utils import import_plugins __version__ = "0.16.7" + + display_version = "cellxgene v" + __version__ try: - import_plugins("server.plugins") + import_plugins("backend.czi_hosted.plugins") except Exception as e: # Make sure to exit in this case, as the server may not be configured as expected. logging.critical(f"Error in import_plugins: {str(e)}") diff --git a/local_server/__main__.py b/backend/czi_hosted/__main__.py similarity index 87% rename from local_server/__main__.py rename to backend/czi_hosted/__main__.py index b582e892..0ffb94d1 100644 --- a/local_server/__main__.py +++ b/backend/czi_hosted/__main__.py @@ -5,8 +5,7 @@ if __package__ is None: PKG_PATH = Path(__file__).parent sys.path.insert(0, str(PKG_PATH.parent)) - import server # noqa F401 - + import backend.czi_hosted # noqa F401 __package__ = PKG_PATH.name # Main thing diff --git a/local_server/common/web/__init__.py b/backend/czi_hosted/app/__init__.py similarity index 100% rename from local_server/common/web/__init__.py rename to backend/czi_hosted/app/__init__.py diff --git a/server/app/app.py b/backend/czi_hosted/app/app.py similarity index 97% rename from server/app/app.py rename to backend/czi_hosted/app/app.py index 8d8cab73..523b377e 100644 --- a/server/app/app.py +++ b/backend/czi_hosted/app/app.py @@ -20,14 +20,14 @@ from flask import ( from flask_restful import Api, Resource from server_timing import Timing as ServerTiming -import server.common.rest as common_rest -from server.common.data_locator import DataLocator -from server.common.errors import DatasetAccessError, RequestException -from server.common.health import health_check -from server.common.utils.utils import path_join, Float32JSONEncoder -from server.data_common.matrix_loader import MatrixDataLoader +import backend.czi_hosted.common.rest as common_rest +from backend.common.utils.data_locator import DataLocator +from backend.common.errors import DatasetAccessError, RequestException +from backend.czi_hosted.common.health import health_check +from backend.common.utils.utils import path_join, Float32JSONEncoder +from backend.czi_hosted.data_common.matrix_loader import MatrixDataLoader -webbp = Blueprint("webapp", "server.common.web", template_folder="templates") +webbp = Blueprint("webapp", "backend.czi_hosted.common.web", template_folder="templates") ONE_WEEK = 7 * 24 * 60 * 60 diff --git a/backend/czi_hosted/auth/__init__.py b/backend/czi_hosted/auth/__init__.py new file mode 100644 index 00000000..5e24ac8f --- /dev/null +++ b/backend/czi_hosted/auth/__init__.py @@ -0,0 +1,6 @@ +# import the built in auth types so they can be registered + +import backend.czi_hosted.auth.auth_test # noqa: F401 +import backend.czi_hosted.auth.auth_session # noqa: F401 +import backend.czi_hosted.auth.auth_oauth # noqa: F401 +import backend.czi_hosted.auth.auth_none # noqa: F401 diff --git a/local_server/auth/auth.py b/backend/czi_hosted/auth/auth.py similarity index 100% rename from local_server/auth/auth.py rename to backend/czi_hosted/auth/auth.py diff --git a/local_server/auth/auth_none.py b/backend/czi_hosted/auth/auth_none.py similarity index 86% rename from local_server/auth/auth_none.py rename to backend/czi_hosted/auth/auth_none.py index 2d6f1f75..491bed4b 100644 --- a/local_server/auth/auth_none.py +++ b/backend/czi_hosted/auth/auth_none.py @@ -1,4 +1,4 @@ -from local_server.auth.auth import AuthTypeBase, AuthTypeFactory +from backend.czi_hosted.auth.auth import AuthTypeBase, AuthTypeFactory class AuthTypeNone(AuthTypeBase): diff --git a/server/auth/auth_oauth.py b/backend/czi_hosted/auth/auth_oauth.py similarity index 99% rename from server/auth/auth_oauth.py rename to backend/czi_hosted/auth/auth_oauth.py index f1e50504..74d09432 100644 --- a/server/auth/auth_oauth.py +++ b/backend/czi_hosted/auth/auth_oauth.py @@ -1,6 +1,6 @@ from flask import session, request, redirect, current_app, after_this_request, has_request_context, g -from server.auth.auth import AuthTypeClientBase, AuthTypeFactory -from server.common.errors import AuthenticationError, ConfigurationError +from backend.czi_hosted.auth.auth import AuthTypeClientBase, AuthTypeFactory +from backend.common.errors import AuthenticationError, ConfigurationError from urllib.parse import urlencode, urlparse import json import requests diff --git a/local_server/auth/auth_session.py b/backend/czi_hosted/auth/auth_session.py similarity index 93% rename from local_server/auth/auth_session.py rename to backend/czi_hosted/auth/auth_session.py index de460fb0..4e9818e4 100644 --- a/local_server/auth/auth_session.py +++ b/backend/czi_hosted/auth/auth_session.py @@ -1,7 +1,8 @@ -from local_server.auth.auth import AuthTypeBase, AuthTypeFactory from flask import session from uuid import uuid4 +from backend.czi_hosted.auth.auth import AuthTypeBase, AuthTypeFactory + class AuthTypeSession(AuthTypeBase): """Session based authentication. The user is always logged. The user id is a random number diff --git a/server/auth/auth_test.py b/backend/czi_hosted/auth/auth_test.py similarity index 97% rename from server/auth/auth_test.py rename to backend/czi_hosted/auth/auth_test.py index 06b92cc7..40a2af0b 100644 --- a/server/auth/auth_test.py +++ b/backend/czi_hosted/auth/auth_test.py @@ -1,6 +1,7 @@ -from server.auth.auth import AuthTypeClientBase, AuthTypeFactory from flask import session, request, redirect, current_app +from backend.czi_hosted.auth.auth import AuthTypeClientBase, AuthTypeFactory + class AuthTypeTest(AuthTypeClientBase): """An authentication type for testing client based logins. When the login route is accessed diff --git a/local_server/compute/__init__.py b/backend/czi_hosted/cli/__init__.py similarity index 100% rename from local_server/compute/__init__.py rename to backend/czi_hosted/cli/__init__.py diff --git a/server/cli/cli.py b/backend/czi_hosted/cli/cli.py similarity index 100% rename from server/cli/cli.py rename to backend/czi_hosted/cli/cli.py diff --git a/server/cli/convert_to_cxg.py b/backend/czi_hosted/cli/convert_to_cxg.py similarity index 98% rename from server/cli/convert_to_cxg.py rename to backend/czi_hosted/cli/convert_to_cxg.py index 0cd67e3c..8c5ce2e6 100644 --- a/server/cli/convert_to_cxg.py +++ b/backend/czi_hosted/cli/convert_to_cxg.py @@ -2,7 +2,7 @@ from os import path import click -from server.converters.h5ad_data_file import H5ADDataFile +from backend.czi_hosted.converters.h5ad_data_file import H5ADDataFile @click.command( diff --git a/server/cli/launch.py b/backend/czi_hosted/cli/launch.py similarity index 98% rename from server/cli/launch.py rename to backend/czi_hosted/cli/launch.py index a05fd6a1..59cdf257 100644 --- a/server/cli/launch.py +++ b/backend/czi_hosted/cli/launch.py @@ -8,11 +8,12 @@ import click from flask_compress import Compress from flask_cors import CORS -from server.default_config import default_config -from server.app.app import Server -from server.common.config.app_config import AppConfig -from server.common.errors import DatasetAccessError, ConfigurationError -from server.common.utils.utils import sort_options +from backend.czi_hosted.default_config import default_config +from backend.czi_hosted.app.app import Server +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.common.errors import DatasetAccessError, ConfigurationError +from backend.common.utils.utils import sort_options + DEFAULT_CONFIG = AppConfig() @@ -355,7 +356,6 @@ def launch( if dump_default_config: print(default_config) sys.exit(0) - # Startup message click.echo("[cellxgene] Starting the CLI...") diff --git a/server/cli/prepare.py b/backend/czi_hosted/cli/prepare.py similarity index 99% rename from server/cli/prepare.py rename to backend/czi_hosted/cli/prepare.py index 67735172..5b6b467e 100644 --- a/server/cli/prepare.py +++ b/backend/czi_hosted/cli/prepare.py @@ -5,7 +5,7 @@ import pandas as pd from numpy import ndarray, unique from scipy.sparse.csc import csc_matrix -from server.common.utils.utils import sort_options +from backend.common.utils.utils import sort_options @sort_options diff --git a/local_server/cli/schema.py b/backend/czi_hosted/cli/schema.py similarity index 96% rename from local_server/cli/schema.py rename to backend/czi_hosted/cli/schema.py index 83c9c07f..8e26ff5a 100644 --- a/local_server/cli/schema.py +++ b/backend/czi_hosted/cli/schema.py @@ -1,6 +1,6 @@ import click -from local_server.converters.schema import remix, validate +from backend.czi_hosted.converters.schema import remix, validate @click.group( diff --git a/local_server/cli/upgrade.py b/backend/czi_hosted/cli/upgrade.py similarity index 100% rename from local_server/cli/upgrade.py rename to backend/czi_hosted/cli/upgrade.py diff --git a/local_server/converters/__init__.py b/backend/czi_hosted/common/__init__.py similarity index 100% rename from local_server/converters/__init__.py rename to backend/czi_hosted/common/__init__.py diff --git a/local_server/converters/schema/__init__.py b/backend/czi_hosted/common/annotations/__init__.py similarity index 100% rename from local_server/converters/schema/__init__.py rename to backend/czi_hosted/common/annotations/__init__.py diff --git a/server/common/annotations/annotations.py b/backend/czi_hosted/common/annotations/annotations.py similarity index 94% rename from server/common/annotations/annotations.py rename to backend/czi_hosted/common/annotations/annotations.py index 3245c621..75cce9b3 100644 --- a/server/common/annotations/annotations.py +++ b/backend/czi_hosted/common/annotations/annotations.py @@ -3,8 +3,8 @@ from abc import ABCMeta, abstractmethod import fastobo import fsspec -from server.common.errors import OntologyLoadFailure -from server.common.utils.type_conversion_utils import get_schema_type_hint_of_array +from backend.common.errors import OntologyLoadFailure +from backend.common.utils.type_conversion_utils import get_schema_type_hint_of_array class Annotations(metaclass=ABCMeta): diff --git a/server/common/annotations/hosted_tiledb.py b/backend/czi_hosted/common/annotations/hosted_tiledb.py similarity index 94% rename from server/common/annotations/hosted_tiledb.py rename to backend/czi_hosted/common/annotations/hosted_tiledb.py index c096d568..b215405a 100644 --- a/server/common/annotations/hosted_tiledb.py +++ b/backend/czi_hosted/common/annotations/hosted_tiledb.py @@ -7,11 +7,11 @@ import pandas as pd import tiledb from flask import current_app -from server.common.annotations.annotations import Annotations -from server.common.errors import AnnotationCategoryNameError -from server.common.utils.sanitization_utils import sanitize_values_in_list -from server.common.utils.type_conversion_utils import get_dtypes_and_schemas_of_dataframe, get_dtype_of_array -from server.db.cellxgene_orm import Annotation +from backend.czi_hosted.common.annotations.annotations import Annotations +from backend.common.errors import AnnotationCategoryNameError +from backend.czi_hosted.common.utils.sanitization_utils import sanitize_values_in_list +from backend.common.utils.type_conversion_utils import get_dtypes_and_schemas_of_dataframe, get_dtype_of_array +from backend.czi_hosted.db.cellxgene_orm import Annotation class AnnotationsHostedTileDB(Annotations): diff --git a/server/common/annotations/local_file_csv.py b/backend/czi_hosted/common/annotations/local_file_csv.py similarity index 97% rename from server/common/annotations/local_file_csv.py rename to backend/czi_hosted/common/annotations/local_file_csv.py index 545b8a6e..c5124ab8 100644 --- a/server/common/annotations/local_file_csv.py +++ b/backend/czi_hosted/common/annotations/local_file_csv.py @@ -8,9 +8,9 @@ from hashlib import blake2b import pandas as pd from flask import session, has_request_context, current_app -from server import __version__ as cellxgene_version -from server.common.annotations.annotations import Annotations -from server.common.errors import AnnotationsError +from backend.czi_hosted import __version__ as cellxgene_version +from backend.czi_hosted.common.annotations.annotations import Annotations +from backend.common.errors import AnnotationsError class AnnotationsLocalFile(Annotations): diff --git a/backend/czi_hosted/common/config/__init__.py b/backend/czi_hosted/common/config/__init__.py new file mode 100644 index 00000000..8b12f32a --- /dev/null +++ b/backend/czi_hosted/common/config/__init__.py @@ -0,0 +1,4 @@ +from backend.common.utils.aws_secret_utils import get_secret_key # noqa F504 + +DEFAULT_SERVER_PORT = 5005 +BIG_FILE_SIZE_THRESHOLD = 100 * 2 ** 20 # 100MB diff --git a/server/common/config/app_config.py b/backend/czi_hosted/common/config/app_config.py similarity index 97% rename from server/common/config/app_config.py rename to backend/czi_hosted/common/config/app_config.py index 5cd4c4a5..33355c2e 100644 --- a/server/common/config/app_config.py +++ b/backend/czi_hosted/common/config/app_config.py @@ -1,11 +1,11 @@ import yaml from flatten_dict import unflatten -from server.default_config import get_default_config -from server.common.config.dataset_config import DatasetConfig -from server.common.config.server_config import ServerConfig -from server.common.config.external_config import ExternalConfig -from server.common.errors import ConfigurationError +from backend.czi_hosted.common.config.external_config import ExternalConfig +from backend.czi_hosted.common.config.dataset_config import DatasetConfig +from backend.czi_hosted.common.config.server_config import ServerConfig +from backend.common.errors import ConfigurationError +from backend.czi_hosted.default_config import get_default_config class AppConfig(object): diff --git a/server/common/config/base_config.py b/backend/czi_hosted/common/config/base_config.py similarity index 99% rename from server/common/config/base_config.py rename to backend/czi_hosted/common/config/base_config.py index 6b9087e7..7c4f98bf 100644 --- a/server/common/config/base_config.py +++ b/backend/czi_hosted/common/config/base_config.py @@ -1,7 +1,7 @@ import copy from flatten_dict import flatten -from server.common.errors import ConfigurationError +from backend.common.errors import ConfigurationError class BaseConfig(object): diff --git a/server/common/config/client_config.py b/backend/czi_hosted/common/config/client_config.py similarity index 98% rename from server/common/config/client_config.py rename to backend/czi_hosted/common/config/client_config.py index 8a70c0b6..5214e488 100644 --- a/server/common/config/client_config.py +++ b/backend/czi_hosted/common/config/client_config.py @@ -1,4 +1,4 @@ -from server import display_version as cellxgene_display_version +from backend.czi_hosted import display_version as cellxgene_display_version def get_client_config(app_config, data_adaptor): diff --git a/server/common/config/dataset_config.py b/backend/czi_hosted/common/config/dataset_config.py similarity index 95% rename from server/common/config/dataset_config.py rename to backend/czi_hosted/common/config/dataset_config.py index 7586ec2f..4f9f7eef 100644 --- a/server/common/config/dataset_config.py +++ b/backend/czi_hosted/common/config/dataset_config.py @@ -1,13 +1,13 @@ import os from os.path import splitext, isdir -from server.common.annotations.hosted_tiledb import AnnotationsHostedTileDB -from server.common.annotations.local_file_csv import AnnotationsLocalFile -from server.common.config.base_config import BaseConfig -from server.common.errors import ConfigurationError, OntologyLoadFailure -from server.compute.scanpy import get_scanpy_module -from server.data_common.matrix_loader import MatrixDataLoader, MatrixDataType -from server.db.db_utils import DbUtils +from backend.czi_hosted.common.annotations.hosted_tiledb import AnnotationsHostedTileDB +from backend.czi_hosted.common.annotations.local_file_csv import AnnotationsLocalFile +from backend.czi_hosted.common.config.base_config import BaseConfig +from backend.common.errors import ConfigurationError, OntologyLoadFailure +from backend.czi_hosted.compute.scanpy import get_scanpy_module +from backend.czi_hosted.data_common.matrix_loader import MatrixDataLoader, MatrixDataType +from backend.czi_hosted.db.db_utils import DbUtils class DatasetConfig(BaseConfig): diff --git a/server/common/config/external_config.py b/backend/czi_hosted/common/config/external_config.py similarity index 93% rename from server/common/config/external_config.py rename to backend/czi_hosted/common/config/external_config.py index bebfbfa9..915486e1 100644 --- a/server/common/config/external_config.py +++ b/backend/czi_hosted/common/config/external_config.py @@ -1,10 +1,9 @@ import os -from server.common.config.base_config import BaseConfig -from server.common.errors import ConfigurationError -from server.common.config import get_secret_key -from server.common.errors import SecretKeyRetrievalError -from server.common.utils.type_conversion_utils import convert_string_to_value +from backend.czi_hosted.common.config.base_config import BaseConfig +from backend.common.errors import ConfigurationError, SecretKeyRetrievalError +from backend.common.utils.aws_secret_utils import get_secret_key +from backend.common.utils.type_conversion_utils import convert_string_to_value class ExternalConfig(BaseConfig): diff --git a/server/common/config/server_config.py b/backend/czi_hosted/common/config/server_config.py similarity index 96% rename from server/common/config/server_config.py rename to backend/czi_hosted/common/config/server_config.py index 48112b86..afc76b44 100644 --- a/server/common/config/server_config.py +++ b/backend/czi_hosted/common/config/server_config.py @@ -4,14 +4,14 @@ import warnings from os.path import basename from urllib.parse import urlparse, quote_plus -from server.auth.auth import AuthTypeFactory -from server.common.config.base_config import BaseConfig -from server.common.config import DEFAULT_SERVER_PORT, BIG_FILE_SIZE_THRESHOLD -from server.common.errors import ConfigurationError, DatasetAccessError -from server.common.data_locator import discover_s3_region_name -from server.common.utils.utils import is_port_available, find_available_port, custom_format_warning -from server.compute import diffexp_cxg as diffexp_tiledb -from server.data_common.matrix_loader import MatrixDataCacheManager, MatrixDataLoader, MatrixDataType +from backend.czi_hosted.auth.auth import AuthTypeFactory +from backend.czi_hosted.common.config import DEFAULT_SERVER_PORT, BIG_FILE_SIZE_THRESHOLD +from backend.czi_hosted.common.config.base_config import BaseConfig +from backend.common.utils.data_locator import discover_s3_region_name +from backend.common.errors import ConfigurationError, DatasetAccessError +from backend.common.utils.utils import is_port_available, find_available_port, custom_format_warning +from backend.czi_hosted.compute import diffexp_cxg as diffexp_tiledb +from backend.czi_hosted.data_common.matrix_loader import MatrixDataCacheManager, MatrixDataLoader, MatrixDataType class ServerConfig(BaseConfig): @@ -353,7 +353,7 @@ class ServerConfig(BaseConfig): if type(self.data_locator__s3__region_name) == str: self.adaptor__cxg_adaptor__tiledb_ctx[regionkey] = self.data_locator__s3__region_name - from server.data_cxg.cxg_adaptor import CxgAdaptor + from backend.czi_hosted.data_cxg.cxg_adaptor import CxgAdaptor CxgAdaptor.set_tiledb_context(self.adaptor__cxg_adaptor__tiledb_ctx) diff --git a/local_server/common/corpora.py b/backend/czi_hosted/common/corpora.py similarity index 95% rename from local_server/common/corpora.py rename to backend/czi_hosted/common/corpora.py index e9ed5240..29f5a62f 100644 --- a/local_server/common/corpora.py +++ b/backend/czi_hosted/common/corpora.py @@ -8,8 +8,8 @@ https://github.com/chanzuckerberg/corpora-data-portal/blob/main/backend/schema/c import collections import json -from local_server.cli.upgrade import validate_version_str -from local_server.common.utils.corpora_constants import CorporaConstants +from backend.czi_hosted.cli.upgrade import validate_version_str +from backend.czi_hosted.common.utils.corpora_constants import CorporaConstants def corpora_get_versions_from_anndata(adata): diff --git a/server/common/health.py b/backend/czi_hosted/common/health.py similarity index 90% rename from server/common/health.py rename to backend/czi_hosted/common/health.py index 5edaec59..db13630d 100644 --- a/server/common/health.py +++ b/backend/czi_hosted/common/health.py @@ -1,8 +1,8 @@ from http import HTTPStatus from flask import make_response, jsonify -from server import __version__ as cellxgene_version -from server.common.data_locator import DataLocator +from backend.czi_hosted import __version__ as cellxgene_version +from backend.common.utils.data_locator import DataLocator def _is_accessible(path, config): diff --git a/server/common/immutable_kvcache.py b/backend/czi_hosted/common/immutable_kvcache.py similarity index 100% rename from server/common/immutable_kvcache.py rename to backend/czi_hosted/common/immutable_kvcache.py diff --git a/server/common/rest.py b/backend/czi_hosted/common/rest.py similarity index 97% rename from server/common/rest.py rename to backend/czi_hosted/common/rest.py index ca140709..4d95a885 100644 --- a/server/common/rest.py +++ b/backend/czi_hosted/common/rest.py @@ -7,9 +7,9 @@ import zlib from flask import make_response, jsonify, current_app, abort from werkzeug.urls import url_unquote -from server.common.config.client_config import get_client_config, get_client_userinfo -from server.common.constants import Axis, DiffExpMode, JSON_NaN_to_num_warning_msg -from server.common.errors import ( +from backend.czi_hosted.common.config.client_config import get_client_config, get_client_userinfo +from backend.common.constants import Axis, DiffExpMode, JSON_NaN_to_num_warning_msg +from backend.common.errors import ( FilterError, JSONEncodingValueError, PrepareError, @@ -20,7 +20,7 @@ from server.common.errors import ( ) import json -from server.data_common.fbs.matrix import decode_matrix_fbs +from backend.common.fbs.matrix import decode_matrix_fbs def abort_and_log(code, logmsg, loglevel=logging.DEBUG, include_exc_info=False): diff --git a/local_server/data_anndata/__init__.py b/backend/czi_hosted/common/utils/__init__.py similarity index 100% rename from local_server/data_anndata/__init__.py rename to backend/czi_hosted/common/utils/__init__.py diff --git a/local_server/common/utils/corpora_constants.py b/backend/czi_hosted/common/utils/corpora_constants.py similarity index 100% rename from local_server/common/utils/corpora_constants.py rename to backend/czi_hosted/common/utils/corpora_constants.py diff --git a/server/common/utils/cxg_constants.py b/backend/czi_hosted/common/utils/cxg_constants.py similarity index 100% rename from server/common/utils/cxg_constants.py rename to backend/czi_hosted/common/utils/cxg_constants.py diff --git a/server/common/utils/cxg_generation_utils.py b/backend/czi_hosted/common/utils/cxg_generation_utils.py similarity index 98% rename from server/common/utils/cxg_generation_utils.py rename to backend/czi_hosted/common/utils/cxg_generation_utils.py index d3ec2b40..3f3ee48e 100644 --- a/server/common/utils/cxg_generation_utils.py +++ b/backend/czi_hosted/common/utils/cxg_generation_utils.py @@ -3,7 +3,7 @@ import json import numpy as np import tiledb -from server.common.utils.type_conversion_utils import get_dtype_of_array, get_dtype_and_schema_of_array +from backend.common.utils.type_conversion_utils import get_dtype_of_array, get_dtype_and_schema_of_array def convert_dictionary_to_cxg_group(cxg_container, metadata_dict, group_metadata_name="cxg_group_metadata"): diff --git a/server/common/utils/matrix_utils.py b/backend/czi_hosted/common/utils/matrix_utils.py similarity index 100% rename from server/common/utils/matrix_utils.py rename to backend/czi_hosted/common/utils/matrix_utils.py diff --git a/server/common/utils/sanitization_utils.py b/backend/czi_hosted/common/utils/sanitization_utils.py similarity index 100% rename from server/common/utils/sanitization_utils.py rename to backend/czi_hosted/common/utils/sanitization_utils.py diff --git a/local_server/data_common/__init__.py b/backend/czi_hosted/common/web/__init__.py similarity index 100% rename from local_server/data_common/__init__.py rename to backend/czi_hosted/common/web/__init__.py diff --git a/local_server/data_common/fbs/NetEncoding/__init__.py b/backend/czi_hosted/compute/__init__.py similarity index 100% rename from local_server/data_common/fbs/NetEncoding/__init__.py rename to backend/czi_hosted/compute/__init__.py diff --git a/server/compute/diffexp_cxg.py b/backend/czi_hosted/compute/diffexp_cxg.py similarity index 97% rename from server/compute/diffexp_cxg.py rename to backend/czi_hosted/compute/diffexp_cxg.py index 2a84abda..15c385e7 100644 --- a/server/compute/diffexp_cxg.py +++ b/backend/czi_hosted/compute/diffexp_cxg.py @@ -1,10 +1,11 @@ import concurrent.futures import numpy as np -from server.compute.diffexp_generic import diffexp_ttest_from_mean_var, mean_var_n -from server.data_cxg.cxg_util import pack_selector_from_indices -from server.common.errors import ComputeError + from numba import jit +from backend.czi_hosted.data_cxg.cxg_util import pack_selector_from_indices +from backend.czi_hosted.compute.diffexp_generic import diffexp_ttest_from_mean_var, mean_var_n +from backend.common.errors import ComputeError """ See the comments in diffexp_generic for a description of this algorithm diff --git a/local_server/compute/diffexp_generic.py b/backend/czi_hosted/compute/diffexp_generic.py similarity index 100% rename from local_server/compute/diffexp_generic.py rename to backend/czi_hosted/compute/diffexp_generic.py diff --git a/local_server/compute/scanpy.py b/backend/czi_hosted/compute/scanpy.py similarity index 100% rename from local_server/compute/scanpy.py rename to backend/czi_hosted/compute/scanpy.py diff --git a/local_server/data_common/fbs/__init__.py b/backend/czi_hosted/converters/__init__.py similarity index 100% rename from local_server/data_common/fbs/__init__.py rename to backend/czi_hosted/converters/__init__.py diff --git a/server/converters/h5ad_data_file.py b/backend/czi_hosted/converters/h5ad_data_file.py similarity index 96% rename from server/converters/h5ad_data_file.py rename to backend/czi_hosted/converters/h5ad_data_file.py index c79dd785..7b09030b 100644 --- a/server/converters/h5ad_data_file.py +++ b/backend/czi_hosted/converters/h5ad_data_file.py @@ -6,17 +6,17 @@ import anndata import numpy as np import tiledb -from server.common.colors import convert_anndata_category_colors_to_cxg_category_colors -from server.common.corpora import corpora_get_props_from_anndata -from server.common.errors import ColorFormatException -from server.common.utils.cxg_constants import CxgConstants -from server.common.utils.cxg_generation_utils import ( +from backend.common.colors import convert_anndata_category_colors_to_cxg_category_colors +from backend.czi_hosted.common.corpora import corpora_get_props_from_anndata +from backend.common.errors import ColorFormatException +from backend.czi_hosted.common.utils.cxg_constants import CxgConstants +from backend.czi_hosted.common.utils.cxg_generation_utils import ( convert_dictionary_to_cxg_group, convert_dataframe_to_cxg_array, convert_ndarray_to_cxg_dense_array, convert_matrix_to_cxg_array, ) -from server.common.utils.matrix_utils import is_matrix_sparse, get_column_shift_encode_for_matrix +from backend.czi_hosted.common.utils.matrix_utils import is_matrix_sparse, get_column_shift_encode_for_matrix class H5ADDataFile: diff --git a/local_server/test/fixtures/__init__.py b/backend/czi_hosted/converters/schema/__init__.py similarity index 100% rename from local_server/test/fixtures/__init__.py rename to backend/czi_hosted/converters/schema/__init__.py diff --git a/local_server/converters/schema/gene_symbol.py b/backend/czi_hosted/converters/schema/gene_symbol.py similarity index 100% rename from local_server/converters/schema/gene_symbol.py rename to backend/czi_hosted/converters/schema/gene_symbol.py diff --git a/local_server/converters/schema/hgnc_complete_set.txt.gz b/backend/czi_hosted/converters/schema/hgnc_complete_set.txt.gz similarity index 100% rename from local_server/converters/schema/hgnc_complete_set.txt.gz rename to backend/czi_hosted/converters/schema/hgnc_complete_set.txt.gz diff --git a/local_server/converters/schema/ontology.py b/backend/czi_hosted/converters/schema/ontology.py similarity index 100% rename from local_server/converters/schema/ontology.py rename to backend/czi_hosted/converters/schema/ontology.py diff --git a/local_server/converters/schema/remix.py b/backend/czi_hosted/converters/schema/remix.py similarity index 100% rename from local_server/converters/schema/remix.py rename to backend/czi_hosted/converters/schema/remix.py diff --git a/local_server/converters/schema/schema_definitions/1_0_0.yaml b/backend/czi_hosted/converters/schema/schema_definitions/1_0_0.yaml similarity index 100% rename from local_server/converters/schema/schema_definitions/1_0_0.yaml rename to backend/czi_hosted/converters/schema/schema_definitions/1_0_0.yaml diff --git a/local_server/converters/schema/schema_definitions/1_1_0.yaml b/backend/czi_hosted/converters/schema/schema_definitions/1_1_0.yaml similarity index 100% rename from local_server/converters/schema/schema_definitions/1_1_0.yaml rename to backend/czi_hosted/converters/schema/schema_definitions/1_1_0.yaml diff --git a/local_server/converters/schema/validate.py b/backend/czi_hosted/converters/schema/validate.py similarity index 100% rename from local_server/converters/schema/validate.py rename to backend/czi_hosted/converters/schema/validate.py diff --git a/server/converters/to_sparse.py b/backend/czi_hosted/converters/to_sparse.py similarity index 91% rename from server/converters/to_sparse.py rename to backend/czi_hosted/converters/to_sparse.py index 3603240a..daaa4c43 100644 --- a/server/converters/to_sparse.py +++ b/backend/czi_hosted/converters/to_sparse.py @@ -9,8 +9,9 @@ import sys import tiledb -from server.common.utils.cxg_generation_utils import convert_ndarray_to_cxg_dense_array, convert_matrix_to_cxg_array -from server.common.utils.matrix_utils import is_matrix_sparse, get_column_shift_encode_for_matrix +from backend.czi_hosted.common.utils.cxg_generation_utils import convert_ndarray_to_cxg_dense_array, \ + convert_matrix_to_cxg_array +from backend.czi_hosted.common.utils.matrix_utils import is_matrix_sparse, get_column_shift_encode_for_matrix def main(): diff --git a/local_server/test/locust/__init__.py b/backend/czi_hosted/data_anndata/__init__.py similarity index 100% rename from local_server/test/locust/__init__.py rename to backend/czi_hosted/data_anndata/__init__.py diff --git a/server/data_anndata/anndata_adaptor.py b/backend/czi_hosted/data_anndata/anndata_adaptor.py similarity index 96% rename from server/data_anndata/anndata_adaptor.py rename to backend/czi_hosted/data_anndata/anndata_adaptor.py index 1312a8f6..76311fb9 100644 --- a/server/data_anndata/anndata_adaptor.py +++ b/backend/czi_hosted/data_anndata/anndata_adaptor.py @@ -8,15 +8,15 @@ from pandas.core.dtypes.dtypes import CategoricalDtype from scipy import sparse from server_timing import Timing as ServerTiming -import server.compute.diffexp_generic as diffexp_generic -from server.common.colors import convert_anndata_category_colors_to_cxg_category_colors -from server.common.constants import Axis, MAX_LAYOUTS -from server.common.corpora import corpora_get_props_from_anndata -from server.common.errors import PrepareError, DatasetAccessError, FilterError -from server.common.utils.type_conversion_utils import get_schema_type_hint_of_array -from server.compute.scanpy import scanpy_umap -from server.data_common.data_adaptor import DataAdaptor -from server.data_common.fbs.matrix import encode_matrix_fbs +import backend.czi_hosted.compute.diffexp_generic as diffexp_generic +from backend.common.colors import convert_anndata_category_colors_to_cxg_category_colors +from backend.common.constants import Axis, MAX_LAYOUTS +from backend.czi_hosted.common.corpora import corpora_get_props_from_anndata +from backend.common.errors import PrepareError, DatasetAccessError, FilterError +from backend.common.utils.type_conversion_utils import get_schema_type_hint_of_array +from backend.czi_hosted.compute.scanpy import scanpy_umap +from backend.czi_hosted.data_common.data_adaptor import DataAdaptor +from backend.common.fbs.matrix import encode_matrix_fbs anndata_version = version.parse(str(anndata.__version__)).release diff --git a/local_server/test/performance/__init__.py b/backend/czi_hosted/data_common/__init__.py similarity index 100% rename from local_server/test/performance/__init__.py rename to backend/czi_hosted/data_common/__init__.py diff --git a/server/data_common/data_adaptor.py b/backend/czi_hosted/data_common/data_adaptor.py similarity index 97% rename from server/data_common/data_adaptor.py rename to backend/czi_hosted/data_common/data_adaptor.py index cb1e3c57..eb1e9e5c 100644 --- a/server/data_common/data_adaptor.py +++ b/backend/czi_hosted/data_common/data_adaptor.py @@ -5,11 +5,11 @@ import numpy as np import pandas as pd from server_timing import Timing as ServerTiming -from server.common.config.app_config import AppConfig -from server.common.constants import Axis -from server.common.errors import FilterError, JSONEncodingValueError, ExceedsLimitError -from server.common.utils.utils import jsonify_numpy -from server.data_common.fbs.matrix import encode_matrix_fbs +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.common.constants import Axis +from backend.common.errors import FilterError, JSONEncodingValueError, ExceedsLimitError +from backend.common.utils.utils import jsonify_numpy +from backend.common.fbs.matrix import encode_matrix_fbs class DataAdaptor(metaclass=ABCMeta): diff --git a/server/data_common/matrix_loader.py b/backend/czi_hosted/data_common/matrix_loader.py similarity index 96% rename from server/data_common/matrix_loader.py rename to backend/czi_hosted/data_common/matrix_loader.py index 233e7b86..53fd44b4 100644 --- a/server/data_common/matrix_loader.py +++ b/backend/czi_hosted/data_common/matrix_loader.py @@ -1,12 +1,14 @@ from enum import Enum import threading import time -from server.data_common.rwlock import RWLock -from server.common.errors import DatasetAccessError -from server.common.data_locator import DataLocator + +from backend.common.utils.data_locator import DataLocator +from backend.common.errors import DatasetAccessError from contextlib import contextmanager from http import HTTPStatus +from backend.czi_hosted.data_common.rwlock import RWLock + class MatrixDataCacheItem(object): """This class provides access and caching for a dataset. The first time a dataset is accessed, it is @@ -224,7 +226,7 @@ class MatrixDataLoader(object): # matrix_data_type is an enum value of type MatrixDataType self.matrix_data_type = matrix_data_type - # matrix_type is a DataAdaptor type, which corresonds to the matrix_data_type + # matrix_type is a DataAdaptor type, which corresponds to the matrix_data_type self.matrix_type = None if matrix_data_type is None: @@ -234,11 +236,11 @@ class MatrixDataLoader(object): raise DatasetAccessError("Dataset does not have an allowed type.") if self.matrix_data_type == MatrixDataType.H5AD: - from server.data_anndata.anndata_adaptor import AnndataAdaptor + from backend.czi_hosted.data_anndata.anndata_adaptor import AnndataAdaptor self.matrix_type = AnndataAdaptor elif self.matrix_data_type == MatrixDataType.CXG: - from server.data_cxg.cxg_adaptor import CxgAdaptor + from backend.czi_hosted.data_cxg.cxg_adaptor import CxgAdaptor self.matrix_type = CxgAdaptor diff --git a/server/data_common/rwlock.py b/backend/czi_hosted/data_common/rwlock.py similarity index 100% rename from server/data_common/rwlock.py rename to backend/czi_hosted/data_common/rwlock.py diff --git a/local_server/test/unit/__init__.py b/backend/czi_hosted/data_cxg/__init__.py similarity index 100% rename from local_server/test/unit/__init__.py rename to backend/czi_hosted/data_cxg/__init__.py diff --git a/server/data_cxg/cxg_adaptor.py b/backend/czi_hosted/data_cxg/cxg_adaptor.py similarity index 96% rename from server/data_cxg/cxg_adaptor.py rename to backend/czi_hosted/data_cxg/cxg_adaptor.py index b739fd6e..f09f06a6 100644 --- a/server/data_cxg/cxg_adaptor.py +++ b/backend/czi_hosted/data_cxg/cxg_adaptor.py @@ -8,15 +8,15 @@ import pandas as pd import tiledb from server_timing import Timing as ServerTiming -import server.compute.diffexp_cxg as diffexp_cxg -from server.common.constants import Axis -from server.common.errors import DatasetAccessError, ConfigurationError -from server.common.immutable_kvcache import ImmutableKVCache -from server.common.utils.type_conversion_utils import get_schema_type_hint_from_dtype -from server.common.utils.utils import path_join -from server.data_common.data_adaptor import DataAdaptor -from server.data_common.fbs.matrix import encode_matrix_fbs -from server.data_cxg.cxg_util import pack_selector_from_mask +from backend.common.constants import Axis +from backend.common.errors import DatasetAccessError, ConfigurationError +from backend.czi_hosted.common.immutable_kvcache import ImmutableKVCache +from backend.common.utils.type_conversion_utils import get_schema_type_hint_from_dtype +from backend.common.utils.utils import path_join +from backend.czi_hosted.compute import diffexp_cxg +from backend.czi_hosted.data_common.data_adaptor import DataAdaptor +from backend.common.fbs.matrix import encode_matrix_fbs +from backend.czi_hosted.data_cxg.cxg_util import pack_selector_from_mask class CxgAdaptor(DataAdaptor): diff --git a/server/data_cxg/cxg_util.py b/backend/czi_hosted/data_cxg/cxg_util.py similarity index 100% rename from server/data_cxg/cxg_util.py rename to backend/czi_hosted/data_cxg/cxg_util.py diff --git a/local_server/test/unit/auth/__init__.py b/backend/czi_hosted/db/__init__.py similarity index 100% rename from local_server/test/unit/auth/__init__.py rename to backend/czi_hosted/db/__init__.py diff --git a/server/db/cellxgene_orm.py b/backend/czi_hosted/db/cellxgene_orm.py similarity index 100% rename from server/db/cellxgene_orm.py rename to backend/czi_hosted/db/cellxgene_orm.py diff --git a/server/db/create_db.py b/backend/czi_hosted/db/create_db.py similarity index 88% rename from server/db/create_db.py rename to backend/czi_hosted/db/create_db.py index c0a7cf98..58e2c6de 100644 --- a/server/db/create_db.py +++ b/backend/czi_hosted/db/create_db.py @@ -3,7 +3,7 @@ Drops and recreates all tables for local testing according to cellxgene_orm.py """ from sqlalchemy import create_engine -from server.db.cellxgene_orm import Base +from backend.czi_hosted.db.cellxgene_orm import Base def create_db(database_uri: str = "postgresql://postgres:test_pw@localhost:5432"): diff --git a/server/db/db_utils.py b/backend/czi_hosted/db/db_utils.py similarity index 96% rename from server/db/db_utils.py rename to backend/czi_hosted/db/db_utils.py index b3030bf2..85230f63 100644 --- a/server/db/db_utils.py +++ b/backend/czi_hosted/db/db_utils.py @@ -4,7 +4,7 @@ import uuid from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker -from server.db.cellxgene_orm import Base, CellxGeneDataset, CellxGeneUser +from backend.czi_hosted.db.cellxgene_orm import Base, CellxGeneDataset, CellxGeneUser class DbUtils: diff --git a/server/default_config.py b/backend/czi_hosted/default_config.py similarity index 100% rename from server/default_config.py rename to backend/czi_hosted/default_config.py diff --git a/server/eb/.ebextensions/database.config b/backend/czi_hosted/eb/.ebextensions/database.config similarity index 100% rename from server/eb/.ebextensions/database.config rename to backend/czi_hosted/eb/.ebextensions/database.config diff --git a/server/eb/.ebextensions/enable_mod_deflate.config b/backend/czi_hosted/eb/.ebextensions/enable_mod_deflate.config similarity index 100% rename from server/eb/.ebextensions/enable_mod_deflate.config rename to backend/czi_hosted/eb/.ebextensions/enable_mod_deflate.config diff --git a/server/eb/.ebextensions/wsgi_app_group_global.config b/backend/czi_hosted/eb/.ebextensions/wsgi_app_group_global.config similarity index 100% rename from server/eb/.ebextensions/wsgi_app_group_global.config rename to backend/czi_hosted/eb/.ebextensions/wsgi_app_group_global.config diff --git a/server/eb/.gitignore b/backend/czi_hosted/eb/.gitignore similarity index 100% rename from server/eb/.gitignore rename to backend/czi_hosted/eb/.gitignore diff --git a/server/eb/Makefile b/backend/czi_hosted/eb/Makefile similarity index 63% rename from server/eb/Makefile rename to backend/czi_hosted/eb/Makefile index 05b24f83..9955b876 100644 --- a/server/eb/Makefile +++ b/backend/czi_hosted/eb/Makefile @@ -1,4 +1,4 @@ -include ../../common.mk +include ../../../common.mk .PHONY: clean clean: @@ -8,7 +8,7 @@ clean: # Build the ElasticBeanstalk configuration and deployment bundle, # such that deployment can be done with a simple `eb deploy`. -# Presumes that a top-level `make build-client` has been done to +# Presumes that a top-level `make build-client` has been done to # create the client static assets. cwd := $(shell pwd) @@ -16,11 +16,12 @@ cwd := $(shell pwd) .PHONY: build build: clean mkdir artifact.dir; \ - (cd ../.. ; \ - git ls-files server/ | cpio -pdm $(cwd)/artifact.dir ; ); \ - $(call copy_client_assets,../../client/build,artifact.dir/server) ; \ + (cd ../../.. ; \ + git ls-files backend/czi_hosted/ | cpio -pdm $(cwd)/artifact.dir ; ); \ + $(call copy_client_assets,../../../client/build,artifact.dir/backend/czi_hosted) ; \ set -e ; \ cp app.py artifact.dir/application.py; \ + cp -r ../../../backend/common artifact.dir/backend/common; \ cp ../requirements.txt artifact.dir; \ cp -r .ebextensions artifact.dir; \ if [ -d customize ] ; then \ @@ -37,22 +38,22 @@ build: clean cp customize/requirements.txt artifact.dir; \ fi ; \ if [ -d customize/deploy ] ; then \ - mkdir -p artifact.dir/server/common/web/static/cellxgene; \ - cp -r customize/deploy artifact.dir/server/common/web/static/cellxgene; \ + mkdir -p artifact.dir/backend/czi_hosted/common/web/static/cellxgene; \ + cp -r customize/deploy artifact.dir/backend/czi_hosted/common/web/static/cellxgene; \ fi; \ if [ -d customize/inline_scripts ] ; then \ - cp -r customize/inline_scripts/* artifact.dir/server/common/web/templates; \ + cp -r customize/inline_scripts/* artifact.dir/backend/czi_hosted/common/web/templates; \ fi; \ if [ -d customize/ebextensions ] ; then \ cp -r customize/ebextensions/* artifact.dir/.ebextensions; \ fi; \ fi; \ if [ -d customize/plugins ] ; then \ - cp -r customize/plugins artifact.dir/server/; \ + cp -r customize/plugins artifact.dir/backend/czi_hosted/; \ fi; \ (cd artifact.dir; \ - cp -r server/common/web/static static; \ - zip -r ../artifact.zip . --exclude server/test/\* server/eb/\* ; ); \ - if ! grep artifact.zip .elasticbeanstalk/config.yml ; then \ + cp -r backend/czi_hosted/common/web/static static; \ + zip -r ../artifact.zip . --exclude backend/czi_hosted/test/\* backend/czi_hosted/eb/\* ; ); \ + if ! [ -f .elasticbeanstalk/config.yml ] ; then \ mkdir -p .elasticbeanstalk ; cat config_deploy.yaml >> .elasticbeanstalk/config.yml ; fi diff --git a/server/eb/README.md b/backend/czi_hosted/eb/README.md similarity index 100% rename from server/eb/README.md rename to backend/czi_hosted/eb/README.md diff --git a/local_server/test/unit/cli/__init__.py b/backend/czi_hosted/eb/__init__.py similarity index 100% rename from local_server/test/unit/cli/__init__.py rename to backend/czi_hosted/eb/__init__.py diff --git a/server/eb/app.py b/backend/czi_hosted/eb/app.py similarity index 97% rename from server/eb/app.py rename to backend/czi_hosted/eb/app.py index 7de161b7..226f0476 100644 --- a/server/eb/app.py +++ b/backend/czi_hosted/eb/app.py @@ -24,9 +24,9 @@ SERVERDIR = os.path.dirname(os.path.realpath(__file__)) sys.path.append(SERVERDIR) try: - from server.common.config.app_config import AppConfig - from server.app.app import Server - from server.common.data_locator import DataLocator, discover_s3_region_name + from backend.czi_hosted.common.config.app_config import AppConfig + from backend.czi_hosted.app.app import Server + from backend.common.utils.data_locator import DataLocator, discover_s3_region_name except Exception: logging.critical("Exception importing server modules", exc_info=True) sys.exit(1) diff --git a/server/eb/check_config.py b/backend/czi_hosted/eb/check_config.py similarity index 93% rename from server/eb/check_config.py rename to backend/czi_hosted/eb/check_config.py index 2ea1c25e..223a21b3 100644 --- a/server/eb/check_config.py +++ b/backend/czi_hosted/eb/check_config.py @@ -2,8 +2,7 @@ import sys import argparse import yaml -from server.common.config.app_config import AppConfig - +from backend.czi_hosted.common.config.app_config import AppConfig def main(): parser = argparse.ArgumentParser("A script to check hosted configuration files") diff --git a/server/eb/check_requirements.py b/backend/czi_hosted/eb/check_requirements.py similarity index 100% rename from server/eb/check_requirements.py rename to backend/czi_hosted/eb/check_requirements.py diff --git a/server/eb/config_deploy.yaml b/backend/czi_hosted/eb/config_deploy.yaml similarity index 100% rename from server/eb/config_deploy.yaml rename to backend/czi_hosted/eb/config_deploy.yaml diff --git a/server/requirements-dev.txt b/backend/czi_hosted/requirements-dev.txt similarity index 100% rename from server/requirements-dev.txt rename to backend/czi_hosted/requirements-dev.txt diff --git a/local_server/requirements-prepare.txt b/backend/czi_hosted/requirements-prepare.txt similarity index 100% rename from local_server/requirements-prepare.txt rename to backend/czi_hosted/requirements-prepare.txt diff --git a/server/requirements.txt b/backend/czi_hosted/requirements.txt similarity index 100% rename from server/requirements.txt rename to backend/czi_hosted/requirements.txt diff --git a/backend/server/Makefile b/backend/server/Makefile new file mode 100644 index 00000000..74c0dd77 --- /dev/null +++ b/backend/server/Makefile @@ -0,0 +1,26 @@ +include ../../common.mk + +.PHONY: clean +clean: + rm -f common/web/templates/index.html + rm -rf common/web/static + rm -f common/web/csp-hashes.json + +.PHONY: unit-test +unit-test: + PYTHONWARNINGS=ignore:ResourceWarning coverage run \ + --source=app,auth,cli,common,compute,converters,data_anndata,data_common \ + --omit=.coverage,venv \ + -m unittest discover \ + --start-directory ../test/test_server/unit \ + --top-level-directory ../../ \ + --verbose; test_result=$$?; \ + exit $$test_result \ + +.PHONY: test-annotations-performance +test-annotations-performance: + python ../test/test_server/performance/performance_test_annotations_backend.py + +.PHONY: test-annotations-scale +test-annotations-scale: + locust -f ../test/test_server/performance/scale_test_annotations.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt diff --git a/local_server/__init__.py b/backend/server/__init__.py similarity index 74% rename from local_server/__init__.py rename to backend/server/__init__.py index 7c3e1b4e..f826e43c 100644 --- a/local_server/__init__.py +++ b/backend/server/__init__.py @@ -1,12 +1,12 @@ import logging import sys -from local_server.common.utils.utils import import_plugins +from backend.common.utils.utils import import_plugins __version__ = "0.16.0" display_version = "cellxgene v" + __version__ try: - import_plugins("server.plugins") + import_plugins("backend.server.plugins") except Exception as e: # Make sure to exit in this case, as the server may not be configured as expected. logging.critical(f"Error in import_plugins: {str(e)}") diff --git a/server/__main__.py b/backend/server/__main__.py similarity index 88% rename from server/__main__.py rename to backend/server/__main__.py index b582e892..ff21365d 100644 --- a/server/__main__.py +++ b/backend/server/__main__.py @@ -5,8 +5,7 @@ if __package__ is None: PKG_PATH = Path(__file__).parent sys.path.insert(0, str(PKG_PATH.parent)) - import server # noqa F401 - + import backend.server # noqa F401 __package__ = PKG_PATH.name # Main thing diff --git a/local_server/test/unit/common/__init__.py b/backend/server/app/__init__.py similarity index 100% rename from local_server/test/unit/common/__init__.py rename to backend/server/app/__init__.py diff --git a/local_server/app/app.py b/backend/server/app/app.py similarity index 95% rename from local_server/app/app.py rename to backend/server/app/app.py index 21eae2ba..4f5f75f8 100644 --- a/local_server/app/app.py +++ b/backend/server/app/app.py @@ -14,12 +14,12 @@ from flask import ( ) from flask_restful import Api, Resource -import local_server.common.rest as common_rest -from local_server.common.errors import DatasetAccessError, RequestException -from local_server.common.health import health_check -from local_server.common.utils.utils import Float32JSONEncoder +import backend.server.common.rest as common_rest +from backend.common.errors import DatasetAccessError, RequestException +from backend.server.common.health import health_check +from backend.common.utils.utils import Float32JSONEncoder -webbp = Blueprint("webapp", "local_server.common.web", template_folder="templates") +webbp = Blueprint("webapp", "backend.server.common.web", template_folder="templates") @webbp.route("/", methods=["GET"]) diff --git a/backend/server/auth/__init__.py b/backend/server/auth/__init__.py new file mode 100644 index 00000000..33b5ad2b --- /dev/null +++ b/backend/server/auth/__init__.py @@ -0,0 +1,5 @@ +# import the built in auth types so they can be registered + +import backend.server.auth.auth_none # noqa: F401 +import backend.server.auth.auth_test # noqa: F401 +import backend.server.auth.auth_session # noqa: F401 diff --git a/server/auth/auth.py b/backend/server/auth/auth.py similarity index 100% rename from server/auth/auth.py rename to backend/server/auth/auth.py diff --git a/server/auth/auth_none.py b/backend/server/auth/auth_none.py similarity index 87% rename from server/auth/auth_none.py rename to backend/server/auth/auth_none.py index 61f82400..92b7ce0d 100644 --- a/server/auth/auth_none.py +++ b/backend/server/auth/auth_none.py @@ -1,4 +1,4 @@ -from server.auth.auth import AuthTypeBase, AuthTypeFactory +from backend.server.auth.auth import AuthTypeBase, AuthTypeFactory class AuthTypeNone(AuthTypeBase): diff --git a/server/auth/auth_session.py b/backend/server/auth/auth_session.py similarity index 93% rename from server/auth/auth_session.py rename to backend/server/auth/auth_session.py index 95157323..e177a8bc 100644 --- a/server/auth/auth_session.py +++ b/backend/server/auth/auth_session.py @@ -1,4 +1,4 @@ -from server.auth.auth import AuthTypeBase, AuthTypeFactory +from backend.server.auth.auth import AuthTypeBase, AuthTypeFactory from flask import session from uuid import uuid4 diff --git a/local_server/auth/auth_test.py b/backend/server/auth/auth_test.py similarity index 96% rename from local_server/auth/auth_test.py rename to backend/server/auth/auth_test.py index f5eaf1e3..cda8e34c 100644 --- a/local_server/auth/auth_test.py +++ b/backend/server/auth/auth_test.py @@ -1,4 +1,4 @@ -from local_server.auth.auth import AuthTypeClientBase, AuthTypeFactory +from backend.server.auth.auth import AuthTypeClientBase, AuthTypeFactory from flask import session, request, redirect diff --git a/local_server/test/unit/common/utils/__init__.py b/backend/server/cli/__init__.py similarity index 100% rename from local_server/test/unit/common/utils/__init__.py rename to backend/server/cli/__init__.py diff --git a/local_server/cli/cli.py b/backend/server/cli/cli.py similarity index 100% rename from local_server/cli/cli.py rename to backend/server/cli/cli.py diff --git a/local_server/cli/launch.py b/backend/server/cli/launch.py similarity index 98% rename from local_server/cli/launch.py rename to backend/server/cli/launch.py index af880b59..2448da5d 100644 --- a/local_server/cli/launch.py +++ b/backend/server/cli/launch.py @@ -8,11 +8,11 @@ import click from flask_compress import Compress from flask_cors import CORS -from local_server.default_config import default_config -from local_server.app.app import Server -from local_server.common.config.app_config import AppConfig -from local_server.common.errors import DatasetAccessError, ConfigurationError -from local_server.common.utils.utils import sort_options +from backend.server.default_config import default_config +from backend.server.app.app import Server +from backend.server.common.config.app_config import AppConfig +from backend.common.errors import DatasetAccessError, ConfigurationError +from backend.common.utils.utils import sort_options DEFAULT_CONFIG = AppConfig() diff --git a/local_server/cli/prepare.py b/backend/server/cli/prepare.py similarity index 99% rename from local_server/cli/prepare.py rename to backend/server/cli/prepare.py index df5c8dd7..5b6b467e 100644 --- a/local_server/cli/prepare.py +++ b/backend/server/cli/prepare.py @@ -5,7 +5,7 @@ import pandas as pd from numpy import ndarray, unique from scipy.sparse.csc import csc_matrix -from local_server.common.utils.utils import sort_options +from backend.common.utils.utils import sort_options @sort_options diff --git a/server/cli/schema.py b/backend/server/cli/schema.py similarity index 96% rename from server/cli/schema.py rename to backend/server/cli/schema.py index 5f16ec64..2675a878 100644 --- a/server/cli/schema.py +++ b/backend/server/cli/schema.py @@ -1,6 +1,6 @@ import click -from server.converters.schema import remix, validate +from backend.server.converters.schema import remix, validate @click.group( diff --git a/server/cli/upgrade.py b/backend/server/cli/upgrade.py similarity index 100% rename from server/cli/upgrade.py rename to backend/server/cli/upgrade.py diff --git a/local_server/test/unit/compute/__init__.py b/backend/server/common/__init__.py similarity index 100% rename from local_server/test/unit/compute/__init__.py rename to backend/server/common/__init__.py diff --git a/local_server/test/unit/converters/__init__.py b/backend/server/common/annotations/__init__.py similarity index 100% rename from local_server/test/unit/converters/__init__.py rename to backend/server/common/annotations/__init__.py diff --git a/local_server/common/annotations/annotations.py b/backend/server/common/annotations/annotations.py similarity index 96% rename from local_server/common/annotations/annotations.py rename to backend/server/common/annotations/annotations.py index fa86d84c..49ee07e3 100644 --- a/local_server/common/annotations/annotations.py +++ b/backend/server/common/annotations/annotations.py @@ -3,8 +3,8 @@ from abc import ABCMeta, abstractmethod import fastobo import fsspec -from local_server.common.errors import OntologyLoadFailure, DisabledFeatureError -from local_server.common.utils.type_conversion_utils import get_schema_type_hint_of_array +from backend.common.errors import OntologyLoadFailure, DisabledFeatureError +from backend.common.utils.type_conversion_utils import get_schema_type_hint_of_array class Annotations(metaclass=ABCMeta): diff --git a/local_server/common/annotations/local_file_csv.py b/backend/server/common/annotations/local_file_csv.py similarity index 98% rename from local_server/common/annotations/local_file_csv.py rename to backend/server/common/annotations/local_file_csv.py index 918169a4..e18da0f3 100644 --- a/local_server/common/annotations/local_file_csv.py +++ b/backend/server/common/annotations/local_file_csv.py @@ -9,9 +9,9 @@ import csv import pandas as pd from flask import session, has_request_context, current_app -from local_server import __version__ as cellxgene_version -from local_server.common.annotations.annotations import Annotations -from local_server.common.errors import AnnotationsError, ObsoleteRequest +from backend.server import __version__ as cellxgene_version +from backend.server.common.annotations.annotations import Annotations +from backend.common.errors import AnnotationsError, ObsoleteRequest class AnnotationsLocalFile(Annotations): diff --git a/backend/server/common/config/__init__.py b/backend/server/common/config/__init__.py new file mode 100644 index 00000000..8b12f32a --- /dev/null +++ b/backend/server/common/config/__init__.py @@ -0,0 +1,4 @@ +from backend.common.utils.aws_secret_utils import get_secret_key # noqa F504 + +DEFAULT_SERVER_PORT = 5005 +BIG_FILE_SIZE_THRESHOLD = 100 * 2 ** 20 # 100MB diff --git a/local_server/common/config/app_config.py b/backend/server/common/config/app_config.py similarity index 95% rename from local_server/common/config/app_config.py rename to backend/server/common/config/app_config.py index 8ecd67f7..331d411d 100644 --- a/local_server/common/config/app_config.py +++ b/backend/server/common/config/app_config.py @@ -1,11 +1,11 @@ import yaml from flatten_dict import unflatten -from local_server.default_config import get_default_config -from local_server.common.config.dataset_config import DatasetConfig -from local_server.common.config.server_config import ServerConfig -from local_server.common.config.external_config import ExternalConfig -from local_server.common.errors import ConfigurationError +from backend.server.default_config import get_default_config +from backend.server.common.config.dataset_config import DatasetConfig +from backend.server.common.config.server_config import ServerConfig +from backend.server.common.config.external_config import ExternalConfig +from backend.common.errors import ConfigurationError class AppConfig(object): diff --git a/local_server/common/config/base_config.py b/backend/server/common/config/base_config.py similarity index 98% rename from local_server/common/config/base_config.py rename to backend/server/common/config/base_config.py index 8238f2ed..ca383edf 100644 --- a/local_server/common/config/base_config.py +++ b/backend/server/common/config/base_config.py @@ -1,7 +1,7 @@ import copy from flatten_dict import flatten -from local_server.common.errors import ConfigurationError +from backend.common.errors import ConfigurationError class BaseConfig(object): diff --git a/local_server/common/config/client_config.py b/backend/server/common/config/client_config.py similarity index 98% rename from local_server/common/config/client_config.py rename to backend/server/common/config/client_config.py index 102a5aae..0992ccdb 100644 --- a/local_server/common/config/client_config.py +++ b/backend/server/common/config/client_config.py @@ -1,4 +1,4 @@ -from local_server import display_version as cellxgene_display_version +from backend.server import display_version as cellxgene_display_version def get_client_config(app_config, data_adaptor): diff --git a/local_server/common/config/dataset_config.py b/backend/server/common/config/dataset_config.py similarity index 96% rename from local_server/common/config/dataset_config.py rename to backend/server/common/config/dataset_config.py index 1e71923d..b9594c66 100644 --- a/local_server/common/config/dataset_config.py +++ b/backend/server/common/config/dataset_config.py @@ -1,11 +1,11 @@ import os from os.path import splitext, isdir -from local_server.common.annotations.local_file_csv import AnnotationsLocalFile -from local_server.common.config.base_config import BaseConfig -from local_server.common.errors import ConfigurationError, OntologyLoadFailure, AnnotationsError -from local_server.compute.scanpy import get_scanpy_module -from local_server.data_common.matrix_loader import MatrixDataLoader +from backend.server.common.annotations.local_file_csv import AnnotationsLocalFile +from backend.server.common.config.base_config import BaseConfig +from backend.common.errors import ConfigurationError, OntologyLoadFailure, AnnotationsError +from backend.server.compute.scanpy import get_scanpy_module +from backend.server.data_common.matrix_loader import MatrixDataLoader class DatasetConfig(BaseConfig): diff --git a/local_server/common/config/external_config.py b/backend/server/common/config/external_config.py similarity index 93% rename from local_server/common/config/external_config.py rename to backend/server/common/config/external_config.py index 19d29a8e..57abbf4d 100644 --- a/local_server/common/config/external_config.py +++ b/backend/server/common/config/external_config.py @@ -1,10 +1,10 @@ import os -from local_server.common.config.base_config import BaseConfig -from local_server.common.errors import ConfigurationError -from local_server.common.config import get_secret_key -from local_server.common.errors import SecretKeyRetrievalError -from local_server.common.utils.type_conversion_utils import convert_string_to_value +from backend.server.common.config.base_config import BaseConfig +from backend.common.errors import ConfigurationError +from backend.server.common.config import get_secret_key +from backend.common.errors import SecretKeyRetrievalError +from backend.common.utils.type_conversion_utils import convert_string_to_value class ExternalConfig(BaseConfig): diff --git a/local_server/common/config/server_config.py b/backend/server/common/config/server_config.py similarity index 94% rename from local_server/common/config/server_config.py rename to backend/server/common/config/server_config.py index 210c9667..d2a593e4 100644 --- a/local_server/common/config/server_config.py +++ b/backend/server/common/config/server_config.py @@ -4,13 +4,13 @@ import warnings from os.path import basename from urllib.parse import urlparse -from local_server.auth.auth import AuthTypeFactory -from local_server.common.config.base_config import BaseConfig -from local_server.common.config import DEFAULT_SERVER_PORT, BIG_FILE_SIZE_THRESHOLD -from local_server.common.errors import ConfigurationError, DatasetAccessError -from local_server.common.data_locator import discover_s3_region_name -from local_server.common.utils.utils import is_port_available, find_available_port, custom_format_warning -from local_server.data_common.matrix_loader import MatrixDataLoader +from backend.server.auth.auth import AuthTypeFactory +from backend.server.common.config.base_config import BaseConfig +from backend.server.common.config import DEFAULT_SERVER_PORT, BIG_FILE_SIZE_THRESHOLD +from backend.common.utils.data_locator import discover_s3_region_name +from backend.common.errors import ConfigurationError, DatasetAccessError +from backend.common.utils.utils import is_port_available, find_available_port, custom_format_warning +from backend.server.data_common.matrix_loader import MatrixDataLoader class ServerConfig(BaseConfig): diff --git a/server/common/corpora.py b/backend/server/common/corpora.py similarity index 95% rename from server/common/corpora.py rename to backend/server/common/corpora.py index 137eb2a1..9ab3d587 100644 --- a/server/common/corpora.py +++ b/backend/server/common/corpora.py @@ -8,8 +8,8 @@ https://github.com/chanzuckerberg/corpora-data-portal/blob/main/backend/schema/c import collections import json -from server.cli.upgrade import validate_version_str -from server.common.utils.corpora_constants import CorporaConstants +from backend.server.cli.upgrade import validate_version_str +from backend.server.common.utils.corpora_constants import CorporaConstants def corpora_get_versions_from_anndata(adata): diff --git a/local_server/common/health.py b/backend/server/common/health.py similarity index 88% rename from local_server/common/health.py rename to backend/server/common/health.py index 8916d95b..12b7b565 100644 --- a/local_server/common/health.py +++ b/backend/server/common/health.py @@ -1,8 +1,8 @@ from http import HTTPStatus from flask import make_response, jsonify -from local_server import __version__ as cellxgene_version -from local_server.common.data_locator import DataLocator +from backend.server import __version__ as cellxgene_version +from backend.common.utils.data_locator import DataLocator def _is_accessible(path, config): diff --git a/local_server/common/rest.py b/backend/server/common/rest.py similarity index 98% rename from local_server/common/rest.py rename to backend/server/common/rest.py index a8165421..b8f71685 100644 --- a/local_server/common/rest.py +++ b/backend/server/common/rest.py @@ -7,9 +7,9 @@ import zlib from flask import make_response, jsonify, current_app, abort from werkzeug.urls import url_unquote -from local_server.common.config.client_config import get_client_config, get_client_userinfo -from local_server.common.constants import Axis, DiffExpMode, JSON_NaN_to_num_warning_msg -from local_server.common.errors import ( +from backend.server.common.config.client_config import get_client_config, get_client_userinfo +from backend.common.constants import Axis, DiffExpMode, JSON_NaN_to_num_warning_msg +from backend.common.errors import ( FilterError, JSONEncodingValueError, PrepareError, @@ -23,7 +23,8 @@ from local_server.common.errors import ( ) import json -from local_server.data_common.fbs.matrix import decode_matrix_fbs + +from backend.common.fbs.matrix import decode_matrix_fbs def abort_and_log(code, logmsg, loglevel=logging.DEBUG, include_exc_info=False): diff --git a/local_server/test/unit/converters/schema/__init__.py b/backend/server/common/utils/__init__.py similarity index 100% rename from local_server/test/unit/converters/schema/__init__.py rename to backend/server/common/utils/__init__.py diff --git a/server/common/utils/corpora_constants.py b/backend/server/common/utils/corpora_constants.py similarity index 100% rename from server/common/utils/corpora_constants.py rename to backend/server/common/utils/corpora_constants.py diff --git a/local_server/test/unit/data_anndata/__init__.py b/backend/server/common/web/__init__.py similarity index 100% rename from local_server/test/unit/data_anndata/__init__.py rename to backend/server/common/web/__init__.py diff --git a/local_server/test/unit/data_common/__init__.py b/backend/server/compute/__init__.py similarity index 100% rename from local_server/test/unit/data_common/__init__.py rename to backend/server/compute/__init__.py diff --git a/server/compute/diffexp_generic.py b/backend/server/compute/diffexp_generic.py similarity index 100% rename from server/compute/diffexp_generic.py rename to backend/server/compute/diffexp_generic.py diff --git a/server/compute/scanpy.py b/backend/server/compute/scanpy.py similarity index 100% rename from server/compute/scanpy.py rename to backend/server/compute/scanpy.py diff --git a/local_server/test/unit/data_common/fbs/__init__.py b/backend/server/converters/__init__.py similarity index 100% rename from local_server/test/unit/data_common/fbs/__init__.py rename to backend/server/converters/__init__.py diff --git a/server/app/__init__.py b/backend/server/converters/schema/__init__.py similarity index 100% rename from server/app/__init__.py rename to backend/server/converters/schema/__init__.py diff --git a/server/converters/schema/gene_symbol.py b/backend/server/converters/schema/gene_symbol.py similarity index 100% rename from server/converters/schema/gene_symbol.py rename to backend/server/converters/schema/gene_symbol.py diff --git a/server/converters/schema/hgnc_complete_set.txt.gz b/backend/server/converters/schema/hgnc_complete_set.txt.gz similarity index 100% rename from server/converters/schema/hgnc_complete_set.txt.gz rename to backend/server/converters/schema/hgnc_complete_set.txt.gz diff --git a/server/converters/schema/ontology.py b/backend/server/converters/schema/ontology.py similarity index 100% rename from server/converters/schema/ontology.py rename to backend/server/converters/schema/ontology.py diff --git a/server/converters/schema/remix.py b/backend/server/converters/schema/remix.py similarity index 100% rename from server/converters/schema/remix.py rename to backend/server/converters/schema/remix.py diff --git a/server/converters/schema/schema_definitions/1_0_0.yaml b/backend/server/converters/schema/schema_definitions/1_0_0.yaml similarity index 100% rename from server/converters/schema/schema_definitions/1_0_0.yaml rename to backend/server/converters/schema/schema_definitions/1_0_0.yaml diff --git a/server/converters/schema/schema_definitions/1_1_0.yaml b/backend/server/converters/schema/schema_definitions/1_1_0.yaml similarity index 100% rename from server/converters/schema/schema_definitions/1_1_0.yaml rename to backend/server/converters/schema/schema_definitions/1_1_0.yaml diff --git a/server/converters/schema/validate.py b/backend/server/converters/schema/validate.py similarity index 100% rename from server/converters/schema/validate.py rename to backend/server/converters/schema/validate.py diff --git a/server/cli/__init__.py b/backend/server/data_anndata/__init__.py similarity index 100% rename from server/cli/__init__.py rename to backend/server/data_anndata/__init__.py diff --git a/local_server/data_anndata/anndata_adaptor.py b/backend/server/data_anndata/anndata_adaptor.py similarity index 96% rename from local_server/data_anndata/anndata_adaptor.py rename to backend/server/data_anndata/anndata_adaptor.py index c040f805..dc3f7b2d 100644 --- a/local_server/data_anndata/anndata_adaptor.py +++ b/backend/server/data_anndata/anndata_adaptor.py @@ -9,15 +9,15 @@ import pandas as pd from scipy import sparse from server_timing import Timing as ServerTiming -import local_server.compute.diffexp_generic as diffexp_generic -from local_server.common.colors import convert_anndata_category_colors_to_cxg_category_colors -from local_server.common.constants import Axis, MAX_LAYOUTS -from local_server.common.corpora import corpora_get_props_from_anndata -from local_server.common.errors import PrepareError, DatasetAccessError, FilterError, UnsupportedSummaryMethod -from local_server.common.utils.type_conversion_utils import get_schema_type_hint_of_array -from local_server.compute.scanpy import scanpy_umap -from local_server.data_common.data_adaptor import DataAdaptor -from local_server.data_common.fbs.matrix import encode_matrix_fbs +import backend.server.compute.diffexp_generic as diffexp_generic +from backend.common.colors import convert_anndata_category_colors_to_cxg_category_colors +from backend.common.constants import Axis, MAX_LAYOUTS +from backend.server.common.corpora import corpora_get_props_from_anndata +from backend.common.errors import PrepareError, DatasetAccessError, FilterError, UnsupportedSummaryMethod +from backend.common.utils.type_conversion_utils import get_schema_type_hint_of_array +from backend.server.compute.scanpy import scanpy_umap +from backend.server.data_common.data_adaptor import DataAdaptor +from backend.common.fbs.matrix import encode_matrix_fbs anndata_version = version.parse(str(anndata.__version__)).release diff --git a/server/common/__init__.py b/backend/server/data_common/__init__.py similarity index 100% rename from server/common/__init__.py rename to backend/server/data_common/__init__.py diff --git a/local_server/data_common/data_adaptor.py b/backend/server/data_common/data_adaptor.py similarity index 98% rename from local_server/data_common/data_adaptor.py rename to backend/server/data_common/data_adaptor.py index 3c5c03cb..c57f726d 100644 --- a/local_server/data_common/data_adaptor.py +++ b/backend/server/data_common/data_adaptor.py @@ -6,11 +6,11 @@ import numpy as np import pandas as pd from server_timing import Timing as ServerTiming -from local_server.common.config.app_config import AppConfig -from local_server.common.constants import Axis -from local_server.common.errors import FilterError, JSONEncodingValueError, ExceedsLimitError -from local_server.common.utils.utils import jsonify_numpy -from local_server.data_common.fbs.matrix import encode_matrix_fbs +from backend.server.common.config.app_config import AppConfig +from backend.common.constants import Axis +from backend.common.errors import FilterError, JSONEncodingValueError, ExceedsLimitError +from backend.common.utils.utils import jsonify_numpy +from backend.common.fbs.matrix import encode_matrix_fbs class DataAdaptor(metaclass=ABCMeta): diff --git a/local_server/data_common/matrix_loader.py b/backend/server/data_common/matrix_loader.py similarity index 90% rename from local_server/data_common/matrix_loader.py rename to backend/server/data_common/matrix_loader.py index 065e2d91..c032d39c 100644 --- a/local_server/data_common/matrix_loader.py +++ b/backend/server/data_common/matrix_loader.py @@ -1,6 +1,7 @@ from enum import Enum -from local_server.common.errors import DatasetAccessError -from local_server.common.data_locator import DataLocator + +from backend.common.utils.data_locator import DataLocator +from backend.common.errors import DatasetAccessError from http import HTTPStatus @@ -29,7 +30,7 @@ class MatrixDataLoader(object): raise DatasetAccessError("Dataset does not have an allowed type.") if self.matrix_data_type == MatrixDataType.H5AD: - from local_server.data_anndata.anndata_adaptor import AnndataAdaptor + from backend.server.data_anndata.anndata_adaptor import AnndataAdaptor self.matrix_type = AnndataAdaptor diff --git a/local_server/default_config.py b/backend/server/default_config.py similarity index 100% rename from local_server/default_config.py rename to backend/server/default_config.py diff --git a/local_server/requirements-dev.txt b/backend/server/requirements-dev.txt similarity index 100% rename from local_server/requirements-dev.txt rename to backend/server/requirements-dev.txt diff --git a/server/requirements-prepare.txt b/backend/server/requirements-prepare.txt similarity index 100% rename from server/requirements-prepare.txt rename to backend/server/requirements-prepare.txt diff --git a/local_server/requirements.txt b/backend/server/requirements.txt similarity index 100% rename from local_server/requirements.txt rename to backend/server/requirements.txt diff --git a/backend/test/__init__.py b/backend/test/__init__.py new file mode 100644 index 00000000..b0ebff21 --- /dev/null +++ b/backend/test/__init__.py @@ -0,0 +1,11 @@ +import random +import string +from os import popen + +PROJECT_ROOT = popen("git rev-parse --show-toplevel").read().strip() +FIXTURES_ROOT = PROJECT_ROOT + "/backend/test/fixtures" +H5AD_FIXTURE = FIXTURES_ROOT + "/pbmc3k-CSC-gz.h5ad" + + +def random_string(n): + return "".join(random.choice(string.ascii_letters) for _ in range(n)) diff --git a/server/test/unit/decode_fbs.py b/backend/test/decode_fbs.py similarity index 88% rename from server/test/unit/decode_fbs.py rename to backend/test/decode_fbs.py index 6fb1fcec..e6953a49 100644 --- a/server/test/unit/decode_fbs.py +++ b/backend/test/decode_fbs.py @@ -5,8 +5,8 @@ This code will need to be updated if fbs/matrix.fbs changes. For more informatio server/data_common/fbs/ """ -import server.data_common.fbs.NetEncoding.Matrix as Matrix -from server.data_common.fbs.matrix import deserialize_typed_array +import backend.common.fbs.NetEncoding.Matrix as Matrix +from backend.common.fbs.matrix import deserialize_typed_array def decode_matrix_FBS(buf): diff --git a/local_server/test/fixtures/1e4dfec4-c0b2-46ad-a04e-ff3ffb3c0a8f.h5ad b/backend/test/fixtures/1e4dfec4-c0b2-46ad-a04e-ff3ffb3c0a8f.h5ad similarity index 100% rename from local_server/test/fixtures/1e4dfec4-c0b2-46ad-a04e-ff3ffb3c0a8f.h5ad rename to backend/test/fixtures/1e4dfec4-c0b2-46ad-a04e-ff3ffb3c0a8f.h5ad diff --git a/server/common/annotations/__init__.py b/backend/test/fixtures/__init__.py similarity index 100% rename from server/common/annotations/__init__.py rename to backend/test/fixtures/__init__.py diff --git a/local_server/test/fixtures/a95c59b4-7f5d-4b80-ad53-a694834ca18b.h5ad b/backend/test/fixtures/a95c59b4-7f5d-4b80-ad53-a694834ca18b.h5ad similarity index 100% rename from local_server/test/fixtures/a95c59b4-7f5d-4b80-ad53-a694834ca18b.h5ad rename to backend/test/fixtures/a95c59b4-7f5d-4b80-ad53-a694834ca18b.h5ad diff --git a/server/test/fixtures/dataset_config_outline.py b/backend/test/fixtures/czi_hosted_dataset_config_outline.py similarity index 100% rename from server/test/fixtures/dataset_config_outline.py rename to backend/test/fixtures/czi_hosted_dataset_config_outline.py diff --git a/server/test/fixtures/server_config_outline.py b/backend/test/fixtures/czi_hosted_server_config_outline.py similarity index 100% rename from server/test/fixtures/server_config_outline.py rename to backend/test/fixtures/czi_hosted_server_config_outline.py diff --git a/server/test/fixtures/database/__init__.py b/backend/test/fixtures/database/__init__.py similarity index 92% rename from server/test/fixtures/database/__init__.py rename to backend/test/fixtures/database/__init__.py index 0088f6d4..bf97d6a3 100644 --- a/server/test/fixtures/database/__init__.py +++ b/backend/test/fixtures/database/__init__.py @@ -4,9 +4,9 @@ import random from sqlalchemy import func -from server.db.cellxgene_orm import CellxGeneUser, CellxGeneDataset, Annotation, Base -from server.db.create_db import create_db -from server.db.db_utils import DbUtils +from backend.czi_hosted.db.cellxgene_orm import CellxGeneUser, CellxGeneDataset, Annotation, Base +from backend.czi_hosted.db.create_db import create_db +from backend.czi_hosted.db.db_utils import DbUtils class TestDatabase: diff --git a/local_server/test/fixtures/dataset_config_outline.py b/backend/test/fixtures/dataset_config_outline.py similarity index 100% rename from local_server/test/fixtures/dataset_config_outline.py rename to backend/test/fixtures/dataset_config_outline.py diff --git a/local_server/test/fixtures/fixtures.py b/backend/test/fixtures/fixtures.py similarity index 100% rename from local_server/test/fixtures/fixtures.py rename to backend/test/fixtures/fixtures.py diff --git a/local_server/test/fixtures/hgnc_example.txt.gz b/backend/test/fixtures/hgnc_example.txt.gz similarity index 100% rename from local_server/test/fixtures/hgnc_example.txt.gz rename to backend/test/fixtures/hgnc_example.txt.gz diff --git a/local_server/test/fixtures/nan.h5ad b/backend/test/fixtures/nan.h5ad similarity index 100% rename from local_server/test/fixtures/nan.h5ad rename to backend/test/fixtures/nan.h5ad diff --git a/local_server/test/fixtures/pbmc3k-CSC-gz.h5ad b/backend/test/fixtures/pbmc3k-CSC-gz.h5ad similarity index 100% rename from local_server/test/fixtures/pbmc3k-CSC-gz.h5ad rename to backend/test/fixtures/pbmc3k-CSC-gz.h5ad diff --git a/local_server/test/fixtures/pbmc3k-CSR-gz.h5ad b/backend/test/fixtures/pbmc3k-CSR-gz.h5ad similarity index 100% rename from local_server/test/fixtures/pbmc3k-CSR-gz.h5ad rename to backend/test/fixtures/pbmc3k-CSR-gz.h5ad diff --git a/local_server/test/fixtures/pbmc3k-annotations.csv b/backend/test/fixtures/pbmc3k-annotations.csv similarity index 100% rename from local_server/test/fixtures/pbmc3k-annotations.csv rename to backend/test/fixtures/pbmc3k-annotations.csv diff --git a/local_server/test/fixtures/pbmc3k-genesets.csv b/backend/test/fixtures/pbmc3k-genesets.csv similarity index 100% rename from local_server/test/fixtures/pbmc3k-genesets.csv rename to backend/test/fixtures/pbmc3k-genesets.csv diff --git a/server/test/fixtures/pbmc3k.cxg/X/__1587182255882_1587182255882_f7aa6ccb49a944f9ab9e25b11bbfab4f/__attr.tdb b/backend/test/fixtures/pbmc3k.cxg/X/__1587182255882_1587182255882_f7aa6ccb49a944f9ab9e25b11bbfab4f/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/X/__1587182255882_1587182255882_f7aa6ccb49a944f9ab9e25b11bbfab4f/__attr.tdb rename to backend/test/fixtures/pbmc3k.cxg/X/__1587182255882_1587182255882_f7aa6ccb49a944f9ab9e25b11bbfab4f/__attr.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/X/__1587182255882_1587182255882_f7aa6ccb49a944f9ab9e25b11bbfab4f/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k.cxg/X/__1587182255882_1587182255882_f7aa6ccb49a944f9ab9e25b11bbfab4f/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/X/__1587182255882_1587182255882_f7aa6ccb49a944f9ab9e25b11bbfab4f/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k.cxg/X/__1587182255882_1587182255882_f7aa6ccb49a944f9ab9e25b11bbfab4f/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/X/__array_schema.tdb b/backend/test/fixtures/pbmc3k.cxg/X/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/X/__array_schema.tdb rename to backend/test/fixtures/pbmc3k.cxg/X/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/X/__lock.tdb b/backend/test/fixtures/pbmc3k.cxg/X/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/X/__lock.tdb rename to backend/test/fixtures/pbmc3k.cxg/X/__lock.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/__tiledb_group.tdb b/backend/test/fixtures/pbmc3k.cxg/__tiledb_group.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/__tiledb_group.tdb rename to backend/test/fixtures/pbmc3k.cxg/__tiledb_group.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__1587182255763_1587182255763_88cd3d13926f4892af7230837bcc5178/__attr.tdb b/backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__1587182255763_1587182255763_88cd3d13926f4892af7230837bcc5178/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__1587182255763_1587182255763_88cd3d13926f4892af7230837bcc5178/__attr.tdb rename to backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__1587182255763_1587182255763_88cd3d13926f4892af7230837bcc5178/__attr.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__1587182255763_1587182255763_88cd3d13926f4892af7230837bcc5178/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__1587182255763_1587182255763_88cd3d13926f4892af7230837bcc5178/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__1587182255763_1587182255763_88cd3d13926f4892af7230837bcc5178/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__1587182255763_1587182255763_88cd3d13926f4892af7230837bcc5178/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__array_schema.tdb b/backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__array_schema.tdb rename to backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__lock.tdb b/backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__lock.tdb rename to backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__lock.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__meta/__1587182255768_1587182255768_fa7617ae99f843929911e4bc7b03e3db b/backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__meta/__1587182255768_1587182255768_fa7617ae99f843929911e4bc7b03e3db similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__meta/__1587182255768_1587182255768_fa7617ae99f843929911e4bc7b03e3db rename to backend/test/fixtures/pbmc3k.cxg/cxg_group_metadata/__meta/__1587182255768_1587182255768_fa7617ae99f843929911e4bc7b03e3db diff --git a/server/test/fixtures/pbmc3k.cxg/emb/__tiledb_group.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/__tiledb_group.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/__tiledb_group.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/__tiledb_group.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__1587182255875_1587182255875_e02a92b5d18f45e0a02031568f4633d4/__attr.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__1587182255875_1587182255875_e02a92b5d18f45e0a02031568f4633d4/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__1587182255875_1587182255875_e02a92b5d18f45e0a02031568f4633d4/__attr.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__1587182255875_1587182255875_e02a92b5d18f45e0a02031568f4633d4/__attr.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__1587182255875_1587182255875_e02a92b5d18f45e0a02031568f4633d4/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__1587182255875_1587182255875_e02a92b5d18f45e0a02031568f4633d4/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__1587182255875_1587182255875_e02a92b5d18f45e0a02031568f4633d4/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__1587182255875_1587182255875_e02a92b5d18f45e0a02031568f4633d4/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__array_schema.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__array_schema.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__lock.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__lock.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/draw_graph_fr/__lock.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/pca/__1587182255827_1587182255827_8aeb4df5c2a74918b7aeeb6d34632e24/__attr.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/pca/__1587182255827_1587182255827_8aeb4df5c2a74918b7aeeb6d34632e24/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/pca/__1587182255827_1587182255827_8aeb4df5c2a74918b7aeeb6d34632e24/__attr.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/pca/__1587182255827_1587182255827_8aeb4df5c2a74918b7aeeb6d34632e24/__attr.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/pca/__1587182255827_1587182255827_8aeb4df5c2a74918b7aeeb6d34632e24/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/pca/__1587182255827_1587182255827_8aeb4df5c2a74918b7aeeb6d34632e24/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/pca/__1587182255827_1587182255827_8aeb4df5c2a74918b7aeeb6d34632e24/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/pca/__1587182255827_1587182255827_8aeb4df5c2a74918b7aeeb6d34632e24/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/pca/__array_schema.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/pca/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/pca/__array_schema.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/pca/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/pca/__lock.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/pca/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/pca/__lock.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/pca/__lock.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/tsne/__1587182255846_1587182255846_0b832c3ed3534b458e83c75726f2005f/__attr.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/tsne/__1587182255846_1587182255846_0b832c3ed3534b458e83c75726f2005f/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/tsne/__1587182255846_1587182255846_0b832c3ed3534b458e83c75726f2005f/__attr.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/tsne/__1587182255846_1587182255846_0b832c3ed3534b458e83c75726f2005f/__attr.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/tsne/__1587182255846_1587182255846_0b832c3ed3534b458e83c75726f2005f/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/tsne/__1587182255846_1587182255846_0b832c3ed3534b458e83c75726f2005f/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/tsne/__1587182255846_1587182255846_0b832c3ed3534b458e83c75726f2005f/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/tsne/__1587182255846_1587182255846_0b832c3ed3534b458e83c75726f2005f/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/tsne/__array_schema.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/tsne/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/tsne/__array_schema.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/tsne/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/tsne/__lock.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/tsne/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/tsne/__lock.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/tsne/__lock.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/umap/__1587182255867_1587182255867_44955ba2220c4ad59bbdbb6b26e21428/__attr.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/umap/__1587182255867_1587182255867_44955ba2220c4ad59bbdbb6b26e21428/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/umap/__1587182255867_1587182255867_44955ba2220c4ad59bbdbb6b26e21428/__attr.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/umap/__1587182255867_1587182255867_44955ba2220c4ad59bbdbb6b26e21428/__attr.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/umap/__1587182255867_1587182255867_44955ba2220c4ad59bbdbb6b26e21428/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/umap/__1587182255867_1587182255867_44955ba2220c4ad59bbdbb6b26e21428/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/umap/__1587182255867_1587182255867_44955ba2220c4ad59bbdbb6b26e21428/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/umap/__1587182255867_1587182255867_44955ba2220c4ad59bbdbb6b26e21428/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/umap/__array_schema.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/umap/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/umap/__array_schema.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/umap/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/emb/umap/__lock.tdb b/backend/test/fixtures/pbmc3k.cxg/emb/umap/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/emb/umap/__lock.tdb rename to backend/test/fixtures/pbmc3k.cxg/emb/umap/__lock.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/louvain.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/louvain.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/louvain.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/louvain.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/louvain_var.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/louvain_var.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/louvain_var.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/louvain_var.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/n_counts.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/n_counts.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/n_counts.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/n_counts.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/n_genes.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/n_genes.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/n_genes.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/n_genes.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/name_0.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/name_0.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/name_0.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/name_0.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/name_0_var.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/name_0_var.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/name_0_var.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/name_0_var.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/percent_mito.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/percent_mito.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/percent_mito.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__1587182255797_1587182255797_d3d57575169a48eaa00d2f709d0a534c/percent_mito.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__array_schema.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__array_schema.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__lock.tdb b/backend/test/fixtures/pbmc3k.cxg/obs/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__lock.tdb rename to backend/test/fixtures/pbmc3k.cxg/obs/__lock.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/obs/__meta/__1587182255787_1587182255787_e19a340576a340db85c37b61b83dbe57 b/backend/test/fixtures/pbmc3k.cxg/obs/__meta/__1587182255787_1587182255787_e19a340576a340db85c37b61b83dbe57 similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/obs/__meta/__1587182255787_1587182255787_e19a340576a340db85c37b61b83dbe57 rename to backend/test/fixtures/pbmc3k.cxg/obs/__meta/__1587182255787_1587182255787_e19a340576a340db85c37b61b83dbe57 diff --git a/server/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/n_cells.tdb b/backend/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/n_cells.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/n_cells.tdb rename to backend/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/n_cells.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/name_0.tdb b/backend/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/name_0.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/name_0.tdb rename to backend/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/name_0.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/name_0_var.tdb b/backend/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/name_0_var.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/name_0_var.tdb rename to backend/test/fixtures/pbmc3k.cxg/var/__1587182255773_1587182255773_12e07b1585a64ebe9d40098d67a8e8ad/name_0_var.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/var/__array_schema.tdb b/backend/test/fixtures/pbmc3k.cxg/var/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/var/__array_schema.tdb rename to backend/test/fixtures/pbmc3k.cxg/var/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/var/__lock.tdb b/backend/test/fixtures/pbmc3k.cxg/var/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/var/__lock.tdb rename to backend/test/fixtures/pbmc3k.cxg/var/__lock.tdb diff --git a/server/test/fixtures/pbmc3k.cxg/var/__meta/__1587182255771_1587182255771_5a3a50f0b360403eab0e427c429f574e b/backend/test/fixtures/pbmc3k.cxg/var/__meta/__1587182255771_1587182255771_5a3a50f0b360403eab0e427c429f574e similarity index 100% rename from server/test/fixtures/pbmc3k.cxg/var/__meta/__1587182255771_1587182255771_5a3a50f0b360403eab0e427c429f574e rename to backend/test/fixtures/pbmc3k.cxg/var/__meta/__1587182255771_1587182255771_5a3a50f0b360403eab0e427c429f574e diff --git a/server/test/fixtures/pbmc3k_v0.cxg/X/__1576858534264_1576858534264_4f12045b32ea45a490bdad087bac4dc3/__attr.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/X/__1576858534264_1576858534264_4f12045b32ea45a490bdad087bac4dc3/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/X/__1576858534264_1576858534264_4f12045b32ea45a490bdad087bac4dc3/__attr.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/X/__1576858534264_1576858534264_4f12045b32ea45a490bdad087bac4dc3/__attr.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/X/__1576858534264_1576858534264_4f12045b32ea45a490bdad087bac4dc3/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/X/__1576858534264_1576858534264_4f12045b32ea45a490bdad087bac4dc3/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/X/__1576858534264_1576858534264_4f12045b32ea45a490bdad087bac4dc3/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/X/__1576858534264_1576858534264_4f12045b32ea45a490bdad087bac4dc3/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/X/__array_schema.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/X/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/X/__array_schema.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/X/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/X/__lock.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/X/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/X/__lock.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/X/__lock.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/__tiledb_group.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/__tiledb_group.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/__tiledb_group.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/__tiledb_group.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/__tiledb_group.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/__tiledb_group.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/__tiledb_group.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/__tiledb_group.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__1576858534229_1576858534229_391cdd6b87b649dea76842dfa59ed0d9/__attr.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__1576858534229_1576858534229_391cdd6b87b649dea76842dfa59ed0d9/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__1576858534229_1576858534229_391cdd6b87b649dea76842dfa59ed0d9/__attr.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__1576858534229_1576858534229_391cdd6b87b649dea76842dfa59ed0d9/__attr.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__1576858534229_1576858534229_391cdd6b87b649dea76842dfa59ed0d9/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__1576858534229_1576858534229_391cdd6b87b649dea76842dfa59ed0d9/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__1576858534229_1576858534229_391cdd6b87b649dea76842dfa59ed0d9/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__1576858534229_1576858534229_391cdd6b87b649dea76842dfa59ed0d9/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__array_schema.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__array_schema.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__lock.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__lock.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/draw_graph_fr/__lock.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/pca/__1576858534121_1576858534121_454903804a694b3b8ccdae56065664ba/__attr.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/pca/__1576858534121_1576858534121_454903804a694b3b8ccdae56065664ba/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/pca/__1576858534121_1576858534121_454903804a694b3b8ccdae56065664ba/__attr.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/pca/__1576858534121_1576858534121_454903804a694b3b8ccdae56065664ba/__attr.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/pca/__1576858534121_1576858534121_454903804a694b3b8ccdae56065664ba/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/pca/__1576858534121_1576858534121_454903804a694b3b8ccdae56065664ba/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/pca/__1576858534121_1576858534121_454903804a694b3b8ccdae56065664ba/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/pca/__1576858534121_1576858534121_454903804a694b3b8ccdae56065664ba/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/pca/__array_schema.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/pca/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/pca/__array_schema.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/pca/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/pca/__lock.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/pca/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/pca/__lock.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/pca/__lock.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__1576858534161_1576858534161_aa4803e7e7be4b23bea35f5d62296f14/__attr.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__1576858534161_1576858534161_aa4803e7e7be4b23bea35f5d62296f14/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__1576858534161_1576858534161_aa4803e7e7be4b23bea35f5d62296f14/__attr.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__1576858534161_1576858534161_aa4803e7e7be4b23bea35f5d62296f14/__attr.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__1576858534161_1576858534161_aa4803e7e7be4b23bea35f5d62296f14/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__1576858534161_1576858534161_aa4803e7e7be4b23bea35f5d62296f14/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__1576858534161_1576858534161_aa4803e7e7be4b23bea35f5d62296f14/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__1576858534161_1576858534161_aa4803e7e7be4b23bea35f5d62296f14/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__array_schema.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__array_schema.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__lock.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__lock.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/tsne/__lock.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/umap/__1576858534193_1576858534193_67d97bcdd3d1486985f5974b133cb496/__attr.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/umap/__1576858534193_1576858534193_67d97bcdd3d1486985f5974b133cb496/__attr.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/umap/__1576858534193_1576858534193_67d97bcdd3d1486985f5974b133cb496/__attr.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/umap/__1576858534193_1576858534193_67d97bcdd3d1486985f5974b133cb496/__attr.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/umap/__1576858534193_1576858534193_67d97bcdd3d1486985f5974b133cb496/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/umap/__1576858534193_1576858534193_67d97bcdd3d1486985f5974b133cb496/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/umap/__1576858534193_1576858534193_67d97bcdd3d1486985f5974b133cb496/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/umap/__1576858534193_1576858534193_67d97bcdd3d1486985f5974b133cb496/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/umap/__array_schema.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/umap/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/umap/__array_schema.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/umap/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/emb/umap/__lock.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/emb/umap/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/emb/umap/__lock.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/emb/umap/__lock.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/louvain.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/louvain.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/louvain.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/louvain.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/louvain_var.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/louvain_var.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/louvain_var.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/louvain_var.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/n_counts.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/n_counts.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/n_counts.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/n_counts.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/n_genes.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/n_genes.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/n_genes.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/n_genes.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/name_0.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/name_0.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/name_0.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/name_0.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/name_0_var.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/name_0_var.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/name_0_var.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/name_0_var.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/percent_mito.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/percent_mito.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/percent_mito.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__1576858534031_1576858534031_1641d0129fe64c78b2d0a6a684ce47ba/percent_mito.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__array_schema.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__array_schema.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__lock.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__lock.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__lock.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/obs/__meta/__1576858534024_1576858534024_e856aef5b0e244b1a4b7dde70cd864d0 b/backend/test/fixtures/pbmc3k_v0.cxg/obs/__meta/__1576858534024_1576858534024_e856aef5b0e244b1a4b7dde70cd864d0 similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/obs/__meta/__1576858534024_1576858534024_e856aef5b0e244b1a4b7dde70cd864d0 rename to backend/test/fixtures/pbmc3k_v0.cxg/obs/__meta/__1576858534024_1576858534024_e856aef5b0e244b1a4b7dde70cd864d0 diff --git a/server/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/__fragment_metadata.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/__fragment_metadata.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/__fragment_metadata.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/__fragment_metadata.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/n_cells.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/n_cells.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/n_cells.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/n_cells.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/name_0.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/name_0.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/name_0.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/name_0.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/name_0_var.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/name_0_var.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/name_0_var.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/var/__1576858533970_1576858533970_d241b2e750eb425a9ee23ed1de686c2a/name_0_var.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/var/__array_schema.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/var/__array_schema.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/var/__array_schema.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/var/__array_schema.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/var/__lock.tdb b/backend/test/fixtures/pbmc3k_v0.cxg/var/__lock.tdb similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/var/__lock.tdb rename to backend/test/fixtures/pbmc3k_v0.cxg/var/__lock.tdb diff --git a/server/test/fixtures/pbmc3k_v0.cxg/var/__meta/__1576858533966_1576858533966_1362646d804b4982b35052a367633436 b/backend/test/fixtures/pbmc3k_v0.cxg/var/__meta/__1576858533966_1576858533966_1362646d804b4982b35052a367633436 similarity index 100% rename from server/test/fixtures/pbmc3k_v0.cxg/var/__meta/__1576858533966_1576858533966_1362646d804b4982b35052a367633436 rename to backend/test/fixtures/pbmc3k_v0.cxg/var/__meta/__1576858533966_1576858533966_1362646d804b4982b35052a367633436 diff --git a/local_server/test/fixtures/schema.json b/backend/test/fixtures/schema.json similarity index 100% rename from local_server/test/fixtures/schema.json rename to backend/test/fixtures/schema.json diff --git a/server/test/fixtures/schema_test_data/generate_test_data.sh b/backend/test/fixtures/schema_test_data/generate_test_data.sh similarity index 100% rename from server/test/fixtures/schema_test_data/generate_test_data.sh rename to backend/test/fixtures/schema_test_data/generate_test_data.sh diff --git a/local_server/test/fixtures/server_config_outline.py b/backend/test/fixtures/server_config_outline.py similarity index 100% rename from local_server/test/fixtures/server_config_outline.py rename to backend/test/fixtures/server_config_outline.py diff --git a/local_server/test/fixtures/test_bad_config.yaml b/backend/test/fixtures/test_bad_config.yaml similarity index 100% rename from local_server/test/fixtures/test_bad_config.yaml rename to backend/test/fixtures/test_bad_config.yaml diff --git a/local_server/test/fixtures/test_config.yaml b/backend/test/fixtures/test_config.yaml similarity index 100% rename from local_server/test/fixtures/test_config.yaml rename to backend/test/fixtures/test_config.yaml diff --git a/server/common/utils/__init__.py b/backend/test/test_common/__init__.py similarity index 100% rename from server/common/utils/__init__.py rename to backend/test/test_common/__init__.py diff --git a/backend/test/test_common/unit/__init__.py b/backend/test/test_common/unit/__init__.py new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/backend/test/test_common/unit/__init__.py @@ -0,0 +1 @@ + diff --git a/server/common/web/__init__.py b/backend/test/test_common/unit/fbs/__init__.py similarity index 100% rename from server/common/web/__init__.py rename to backend/test/test_common/unit/fbs/__init__.py diff --git a/server/test/unit/data_common/fbs/test_matrix.py b/backend/test/test_common/unit/fbs/test_matrix.py similarity index 96% rename from server/test/unit/data_common/fbs/test_matrix.py rename to backend/test/test_common/unit/fbs/test_matrix.py index 1e23cb6b..ece1c918 100644 --- a/server/test/unit/data_common/fbs/test_matrix.py +++ b/backend/test/test_common/unit/fbs/test_matrix.py @@ -3,8 +3,8 @@ import pandas as pd import numpy as np from scipy import sparse -import server.test.unit.decode_fbs as decode_fbs -from server.data_common.fbs.matrix import encode_matrix_fbs, decode_matrix_fbs +import backend.test.decode_fbs as decode_fbs +from backend.common.fbs.matrix import encode_matrix_fbs, decode_matrix_fbs class FbsTests(unittest.TestCase): diff --git a/server/test/unit/common/test_colors.py b/backend/test/test_common/unit/test_colors.py similarity index 86% rename from server/test/unit/common/test_colors.py rename to backend/test/test_common/unit/test_colors.py index efef25ec..a0041f02 100644 --- a/server/test/unit/common/test_colors.py +++ b/backend/test/test_common/unit/test_colors.py @@ -1,10 +1,11 @@ import unittest import anndata -from server.common.colors import convert_color_to_hex_format, convert_anndata_category_colors_to_cxg_category_colors -from server.common.errors import ColorFormatException -from server.test import PROJECT_ROOT -from server.test.fixtures.fixtures import pbmc3k_colors + +from backend.common.colors import convert_color_to_hex_format, convert_anndata_category_colors_to_cxg_category_colors +from backend.common.errors import ColorFormatException +from backend.test import PROJECT_ROOT +from backend.test.fixtures.fixtures import pbmc3k_colors class ColorsTest(unittest.TestCase): diff --git a/server/compute/__init__.py b/backend/test/test_common/unit/utils/__init__.py similarity index 100% rename from server/compute/__init__.py rename to backend/test/test_common/unit/utils/__init__.py diff --git a/server/test/unit/common/utils/test_type_conversion_utils.py b/backend/test/test_common/unit/utils/test_type_conversion_utils.py similarity index 99% rename from server/test/unit/common/utils/test_type_conversion_utils.py rename to backend/test/test_common/unit/utils/test_type_conversion_utils.py index 0d5319fa..5bf02d78 100644 --- a/server/test/unit/common/utils/test_type_conversion_utils.py +++ b/backend/test/test_common/unit/utils/test_type_conversion_utils.py @@ -5,7 +5,7 @@ from unittest.mock import patch import numpy as np from pandas import Series, DataFrame -from server.common.utils.type_conversion_utils import ( +from backend.common.utils.type_conversion_utils import ( can_cast_to_float32, can_cast_to_int32, get_dtype_of_array, diff --git a/server/converters/__init__.py b/backend/test/test_czi_hosted/__init__.py similarity index 100% rename from server/converters/__init__.py rename to backend/test/test_czi_hosted/__init__.py diff --git a/local_server/test/locust/README.md b/backend/test/test_czi_hosted/locust/README.md similarity index 100% rename from local_server/test/locust/README.md rename to backend/test/test_czi_hosted/locust/README.md diff --git a/server/converters/schema/__init__.py b/backend/test/test_czi_hosted/locust/__init__.py similarity index 100% rename from server/converters/schema/__init__.py rename to backend/test/test_czi_hosted/locust/__init__.py diff --git a/local_server/test/locust/config.py b/backend/test/test_czi_hosted/locust/config.py similarity index 100% rename from local_server/test/locust/config.py rename to backend/test/test_czi_hosted/locust/config.py diff --git a/server/test/locust/locustfile.py b/backend/test/test_czi_hosted/locust/locustfile.py similarity index 99% rename from server/test/locust/locustfile.py rename to backend/test/test_czi_hosted/locust/locustfile.py index 183fa9e1..9e38cd7c 100644 --- a/server/test/locust/locustfile.py +++ b/backend/test/test_czi_hosted/locust/locustfile.py @@ -7,7 +7,7 @@ from locust import HttpUser, SequentialTaskSet, task, between, TaskSet from locust.clients import HttpSession from requests.packages.urllib3.exceptions import InsecureRequestWarning -import server.test.unit.decode_fbs as decode_fbs +import backend.test.decode_fbs as decode_fbs requests.packages.urllib3.disable_warnings(InsecureRequestWarning) diff --git a/local_server/test/locust/requirements-locust.txt b/backend/test/test_czi_hosted/locust/requirements-locust.txt similarity index 100% rename from local_server/test/locust/requirements-locust.txt rename to backend/test/test_czi_hosted/locust/requirements-locust.txt diff --git a/server/data_anndata/__init__.py b/backend/test/test_czi_hosted/performance/__init__.py similarity index 100% rename from server/data_anndata/__init__.py rename to backend/test/test_czi_hosted/performance/__init__.py diff --git a/local_server/test/performance/create_test_matrix.py b/backend/test/test_czi_hosted/performance/create_test_matrix.py similarity index 100% rename from local_server/test/performance/create_test_matrix.py rename to backend/test/test_czi_hosted/performance/create_test_matrix.py diff --git a/server/test/performance/performance_test_annotations_backend.py b/backend/test/test_czi_hosted/performance/performance_test_annotations_backend.py similarity index 99% rename from server/test/performance/performance_test_annotations_backend.py rename to backend/test/test_czi_hosted/performance/performance_test_annotations_backend.py index d0548523..3272d669 100644 --- a/server/test/performance/performance_test_annotations_backend.py +++ b/backend/test/test_czi_hosted/performance/performance_test_annotations_backend.py @@ -6,10 +6,11 @@ import concurrent.futures import numpy as np import requests import sys -from server.data_common.fbs.matrix import encode_matrix_fbs import pandas as pd import random +from backend.common.fbs.matrix import encode_matrix_fbs + """ Before running, sign into the dataportal, copy the cookie and paste it below. To test in staging or prod update the url base below. It is also possible to configure the number of categories created and the number of unique labels per diff --git a/server/test/performance/run_diffexp.py b/backend/test/test_czi_hosted/performance/run_diffexp.py similarity index 93% rename from server/test/performance/run_diffexp.py rename to backend/test/test_czi_hosted/performance/run_diffexp.py index 5cd1fbef..27a9e40f 100644 --- a/server/test/performance/run_diffexp.py +++ b/backend/test/test_czi_hosted/performance/run_diffexp.py @@ -4,12 +4,10 @@ import random import time import numpy as np -import server.compute.diffexp_cxg as diffexp_cxg -import server.compute.diffexp_generic as diffexp_generic - -from server.common.config.app_config import AppConfig -from server.data_common.matrix_loader import MatrixDataLoader -from server.data_cxg.cxg_adaptor import CxgAdaptor +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.czi_hosted.compute import diffexp_generic, diffexp_cxg +from backend.czi_hosted.data_common.matrix_loader import MatrixDataLoader +from backend.czi_hosted.data_cxg.cxg_adaptor import CxgAdaptor def main(): diff --git a/server/test/performance/scale_test_annotations.py b/backend/test/test_czi_hosted/performance/scale_test_annotations.py similarity index 81% rename from server/test/performance/scale_test_annotations.py rename to backend/test/test_czi_hosted/performance/scale_test_annotations.py index a26a16c0..f671c3f0 100644 --- a/server/test/performance/scale_test_annotations.py +++ b/backend/test/test_czi_hosted/performance/scale_test_annotations.py @@ -7,10 +7,10 @@ random.seed(time.time()) """ To run this script sign into cellxgene in the desired environment and grab the returned cookie, update the cookie variable below with your cookie and run the following command to see results in the terminal: -locust -f server/test/performance/scale_test_annotations.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt +locust -f backend/test/test_czi_hosted/performance/scale_test_annotations.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt Or if you want to use the locust gui run: -locust -f server/test/performance/scale_test_annotations.py -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ +locust -f backend/test/test_czi_hosted/performance/scale_test_annotations.py -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ If you want to test staging you'll need to substitute staging for dev in the host url To test prod you'll need to replace dev.single-cell.czi.technology with cziscience.com diff --git a/server/data_common/__init__.py b/backend/test/test_czi_hosted/test_database/__init__.py similarity index 100% rename from server/data_common/__init__.py rename to backend/test/test_czi_hosted/test_database/__init__.py diff --git a/server/test/test_database/test_database.py b/backend/test/test_czi_hosted/test_database/test_database.py similarity index 92% rename from server/test/test_database/test_database.py rename to backend/test/test_czi_hosted/test_database/test_database.py index 91798fdb..18ffe1c6 100644 --- a/server/test/test_database/test_database.py +++ b/backend/test/test_czi_hosted/test_database/test_database.py @@ -1,7 +1,7 @@ import unittest -from server.db.cellxgene_orm import CellxGeneUser, CellxGeneDataset, Annotation -from server.db.db_utils import DbUtils -from server.test.fixtures.database import TestDatabase +from backend.czi_hosted.db.cellxgene_orm import CellxGeneUser, CellxGeneDataset, Annotation +from backend.czi_hosted.db.db_utils import DbUtils +from backend.test.fixtures.database import TestDatabase class DatabaseTest(unittest.TestCase): diff --git a/server/test/__init__.py b/backend/test/test_czi_hosted/unit/__init__.py similarity index 85% rename from server/test/__init__.py rename to backend/test/test_czi_hosted/unit/__init__.py index ad8e7eef..7d3e3799 100644 --- a/server/test/__init__.py +++ b/backend/test/test_czi_hosted/unit/__init__.py @@ -1,28 +1,25 @@ import os import random import shutil -import string import tempfile import time from contextlib import contextmanager -from os import path, popen +from os import path from subprocess import Popen import pandas as pd import requests -from server.common.annotations.hosted_tiledb import AnnotationsHostedTileDB -from server.common.annotations.local_file_csv import AnnotationsLocalFile -from server.common.config.app_config import AppConfig -from server.common.config import DEFAULT_SERVER_PORT -from server.common.data_locator import DataLocator -from server.common.utils.utils import find_available_port -from server.data_common.fbs.matrix import encode_matrix_fbs -from server.data_common.matrix_loader import MatrixDataLoader, MatrixDataType -from server.db.db_utils import DbUtils - -PROJECT_ROOT = popen("git rev-parse --show-toplevel").read().strip() -FIXTURES_ROOT = PROJECT_ROOT + "/server/test/fixtures" +from backend.czi_hosted.common.annotations.hosted_tiledb import AnnotationsHostedTileDB +from backend.czi_hosted.common.annotations.local_file_csv import AnnotationsLocalFile +from backend.czi_hosted.common.config import DEFAULT_SERVER_PORT +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.common.utils.data_locator import DataLocator +from backend.common.utils.utils import find_available_port +from backend.common.fbs.matrix import encode_matrix_fbs +from backend.czi_hosted.data_common.matrix_loader import MatrixDataType, MatrixDataLoader +from backend.czi_hosted.db.db_utils import DbUtils +from backend.test import PROJECT_ROOT, FIXTURES_ROOT def data_with_tmp_tiledb_annotations(ext: MatrixDataType): @@ -59,10 +56,10 @@ def data_with_tmp_annotations(ext: MatrixDataType, annotations_fixture=False): tmp_dir = tempfile.mkdtemp() annotations_file = path.join(tmp_dir, "test_annotations.csv") if annotations_fixture: - shutil.copyfile(f"{PROJECT_ROOT}/server/test/fixtures/pbmc3k-annotations.csv", annotations_file) + shutil.copyfile(f"{FIXTURES_ROOT}/pbmc3k-annotations.csv", annotations_file) fname = { MatrixDataType.H5AD: f"{PROJECT_ROOT}/example-dataset/pbmc3k.h5ad", - MatrixDataType.CXG: "test/fixtures/pbmc3k.cxg", + MatrixDataType.CXG: f"{FIXTURES_ROOT}/pbmc3k.cxg", }[ext] data_locator = DataLocator(fname) config = AppConfig() @@ -120,16 +117,12 @@ def app_config(data_locator, backed=False, extra_server_config={}, extra_dataset return config -def random_string(n): - return "".join(random.choice(string.ascii_letters) for _ in range(n)) - - def start_test_server(command_line_args=[], app_config=None, env=None): """ Command line arguments can be passed in, as well as an app_config. This function is meant to be used like this, for example: - with test_server(...) as server: + with unit(...) as server: r = requests.get(f"{server}/...") // check r diff --git a/server/data_common/fbs/NetEncoding/__init__.py b/backend/test/test_czi_hosted/unit/auth/__init__.py similarity index 100% rename from server/data_common/fbs/NetEncoding/__init__.py rename to backend/test/test_czi_hosted/unit/auth/__init__.py diff --git a/server/test/unit/auth/test_auth.py b/backend/test/test_czi_hosted/unit/auth/test_auth.py similarity index 97% rename from server/test/unit/auth/test_auth.py rename to backend/test/test_czi_hosted/unit/auth/test_auth.py index 12f062e6..f59ef316 100644 --- a/server/test/unit/auth/test_auth.py +++ b/backend/test/test_czi_hosted/unit/auth/test_auth.py @@ -2,8 +2,9 @@ import unittest import requests -from server.common.config.app_config import AppConfig -from server.test import FIXTURES_ROOT, test_server +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.test.test_czi_hosted.unit import test_server +from backend.test import FIXTURES_ROOT class AuthTest(unittest.TestCase): diff --git a/server/test/unit/auth/test_oauth.py b/backend/test/test_czi_hosted/unit/auth/test_oauth.py similarity index 98% rename from server/test/unit/auth/test_oauth.py rename to backend/test/test_czi_hosted/unit/auth/test_oauth.py index caa13968..d6339b19 100644 --- a/server/test/unit/auth/test_oauth.py +++ b/backend/test/test_czi_hosted/unit/auth/test_oauth.py @@ -9,8 +9,9 @@ from flask import Flask, jsonify, make_response, request, redirect from multiprocessing import Process import jose -from server.common.config.app_config import AppConfig -from server.test import FIXTURES_ROOT, test_server +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.test.test_czi_hosted.unit import test_server +from backend.test import FIXTURES_ROOT # This tests the oauth authentication type. # This test starts a cellxgene server and a mock oauth server. diff --git a/server/data_common/fbs/__init__.py b/backend/test/test_czi_hosted/unit/cli/__init__.py similarity index 100% rename from server/data_common/fbs/__init__.py rename to backend/test/test_czi_hosted/unit/cli/__init__.py diff --git a/local_server/test/unit/cli/test_launch.py b/backend/test/test_czi_hosted/unit/cli/test_launch.py similarity index 87% rename from local_server/test/unit/cli/test_launch.py rename to backend/test/test_czi_hosted/unit/cli/test_launch.py index d58638d8..5550e775 100644 --- a/local_server/test/unit/cli/test_launch.py +++ b/backend/test/test_czi_hosted/unit/cli/test_launch.py @@ -5,8 +5,8 @@ import unittest import yaml -from local_server.default_config import default_config -from local_server.test import FIXTURES_ROOT +from backend.czi_hosted.default_config import default_config +from backend.test import FIXTURES_ROOT class CLIPLaunchTests(unittest.TestCase): diff --git a/server/test/unit/cli/test_prepare.py b/backend/test/test_czi_hosted/unit/cli/test_prepare.py similarity index 87% rename from server/test/unit/cli/test_prepare.py rename to backend/test/test_czi_hosted/unit/cli/test_prepare.py index 81b83244..d4c78fdf 100644 --- a/server/test/unit/cli/test_prepare.py +++ b/backend/test/test_czi_hosted/unit/cli/test_prepare.py @@ -2,7 +2,7 @@ import unittest import pandas as pd -from server.cli.prepare import make_index_unique +from backend.czi_hosted.cli.prepare import make_index_unique class CLIPrepareTests(unittest.TestCase): diff --git a/server/test/unit/cli/test_upgrade.py b/backend/test/test_czi_hosted/unit/cli/test_upgrade.py similarity index 91% rename from server/test/unit/cli/test_upgrade.py rename to backend/test/test_czi_hosted/unit/cli/test_upgrade.py index c3c93e17..a9ae85d9 100644 --- a/server/test/unit/cli/test_upgrade.py +++ b/backend/test/test_czi_hosted/unit/cli/test_upgrade.py @@ -1,6 +1,6 @@ import unittest -from server.cli.upgrade import validate_version_str, split_version, version_gt +from backend.czi_hosted.cli.upgrade import validate_version_str, split_version, version_gt class CLIUpgradeTests(unittest.TestCase): diff --git a/server/data_cxg/__init__.py b/backend/test/test_czi_hosted/unit/common/__init__.py similarity index 100% rename from server/data_cxg/__init__.py rename to backend/test/test_czi_hosted/unit/common/__init__.py diff --git a/server/test/unit/common/config/__init__.py b/backend/test/test_czi_hosted/unit/common/config/__init__.py similarity index 98% rename from server/test/unit/common/config/__init__.py rename to backend/test/test_czi_hosted/unit/common/config/__init__.py index 12fc7656..efcab08d 100644 --- a/server/test/unit/common/config/__init__.py +++ b/backend/test/test_czi_hosted/unit/common/config/__init__.py @@ -5,7 +5,7 @@ import random from unittest import mock import yaml -from server.test import FIXTURES_ROOT +from backend.test import FIXTURES_ROOT def mockenv(**envvars): @@ -67,7 +67,7 @@ class ConfigTests(unittest.TestCase): config_file_name="server_config.yaml", ): configfile = os.path.join(self.tmp_fixtures_directory, config_file_name) - server_config_outline_path = os.path.join(FIXTURES_ROOT, "server_config_outline.py") + server_config_outline_path = os.path.join(FIXTURES_ROOT, "czi_hosted_server_config_outline.py") with open(server_config_outline_path, "r") as config_skeleton: config = config_skeleton.read() server_config = eval(config) @@ -245,7 +245,7 @@ class ConfigTests(unittest.TestCase): config_file_name="dataset_config.yml", ): configfile = os.path.join(self.tmp_fixtures_directory, config_file_name) - dataset_config_outline_path = os.path.join(FIXTURES_ROOT, "dataset_config_outline.py") + dataset_config_outline_path = os.path.join(FIXTURES_ROOT, "czi_hosted_dataset_config_outline.py") with open(dataset_config_outline_path, "r") as config_skeleton: config = config_skeleton.read() dataset_config = eval(config) diff --git a/server/test/unit/common/config/test_app_config.py b/backend/test/test_czi_hosted/unit/common/config/test_app_config.py similarity index 97% rename from server/test/unit/common/config/test_app_config.py rename to backend/test/test_czi_hosted/unit/common/config/test_app_config.py index ea8fe047..f6e7bc31 100644 --- a/server/test/unit/common/config/test_app_config.py +++ b/backend/test/test_czi_hosted/unit/common/config/test_app_config.py @@ -4,11 +4,11 @@ import unittest import yaml -from server.default_config import default_config -from server.common.config.app_config import AppConfig -from server.test.unit.common.config import ConfigTests -from server.common.errors import ConfigurationError -from server.test import FIXTURES_ROOT +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.common.errors import ConfigurationError +from backend.czi_hosted.default_config import default_config +from backend.test import FIXTURES_ROOT +from backend.test.test_czi_hosted.unit.common.config import ConfigTests class AppConfigTest(ConfigTests): diff --git a/server/test/unit/common/config/test_base_config.py b/backend/test/test_czi_hosted/unit/common/config/test_base_config.py similarity index 91% rename from server/test/unit/common/config/test_base_config.py rename to backend/test/test_czi_hosted/unit/common/config/test_base_config.py index d5d538cd..e11306f0 100644 --- a/server/test/unit/common/config/test_base_config.py +++ b/backend/test/test_czi_hosted/unit/common/config/test_base_config.py @@ -1,9 +1,9 @@ import unittest -from server.common.config.app_config import AppConfig -from server.test import FIXTURES_ROOT -from server.test.unit.common.config import ConfigTests -from server.common.errors import ConfigurationError +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.test import FIXTURES_ROOT +from backend.common.errors import ConfigurationError +from backend.test.test_czi_hosted.unit.common.config import ConfigTests class BaseConfigTest(ConfigTests): diff --git a/server/test/unit/common/config/test_dataset_config.py b/backend/test/test_czi_hosted/unit/common/config/test_dataset_config.py similarity index 94% rename from server/test/unit/common/config/test_dataset_config.py rename to backend/test/test_czi_hosted/unit/common/config/test_dataset_config.py index b65c7d83..756cbb63 100644 --- a/server/test/unit/common/config/test_dataset_config.py +++ b/backend/test/test_czi_hosted/unit/common/config/test_dataset_config.py @@ -5,14 +5,15 @@ import requests import unittest from unittest.mock import patch -from server.common.annotations.hosted_tiledb import AnnotationsHostedTileDB -from server.common.annotations.local_file_csv import AnnotationsLocalFile -from server.common.config.app_config import AppConfig -from server.common.config.base_config import BaseConfig -from server.test import test_server, PROJECT_ROOT, FIXTURES_ROOT +from backend.czi_hosted.common.annotations.hosted_tiledb import AnnotationsHostedTileDB +from backend.czi_hosted.common.annotations.local_file_csv import AnnotationsLocalFile +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.czi_hosted.common.config.base_config import BaseConfig +from backend.test.test_czi_hosted.unit import test_server +from backend.test import PROJECT_ROOT, FIXTURES_ROOT -from server.common.errors import ConfigurationError -from server.test.unit.common.config import ConfigTests +from backend.common.errors import ConfigurationError +from backend.test.test_czi_hosted.unit.common.config import ConfigTests class TestDatasetConfig(ConfigTests): @@ -46,7 +47,7 @@ class TestDatasetConfig(ConfigTests): self.assertEqual(config.default_dataset_config.diffexp__lfc_cutoff, 0.01) self.assertIsNone(config.default_dataset_config.user_annotations__ontology__obo_location) - @patch("server.common.config.dataset_config.BaseConfig.validate_correct_type_of_configuration_attribute") + @patch("backend.czi_hosted.common.config.dataset_config.BaseConfig.validate_correct_type_of_configuration_attribute") def test_complete_config_checks_all_attr(self, mock_check_attrs): mock_check_attrs.side_effect = BaseConfig.validate_correct_type_of_configuration_attribute() self.dataset_config.complete_config(self.context) @@ -93,7 +94,7 @@ class TestDatasetConfig(ConfigTests): self.assertEqual(self.context["messages"], ["Warning: db_uri ignored as annotations are disabled."]) - @patch("server.common.config.dataset_config.DbUtils") + @patch("backend.czi_hosted.common.config.dataset_config.DbUtils") def test_handle_user_annotations__instantiates_user_annotations_class_correctly(self, mock_db_utils): mock_db_utils.return_value = "123" config = self.get_config( diff --git a/server/test/unit/common/config/test_external_config.py b/backend/test/test_czi_hosted/unit/common/config/test_external_config.py similarity index 95% rename from server/test/unit/common/config/test_external_config.py rename to backend/test/test_czi_hosted/unit/common/config/test_external_config.py index 5e3825e6..8c23c06d 100644 --- a/server/test/unit/common/config/test_external_config.py +++ b/backend/test/test_czi_hosted/unit/common/config/test_external_config.py @@ -3,11 +3,12 @@ from unittest.mock import patch import requests -from server.common.errors import ConfigurationError -from server.common.config.app_config import AppConfig -from server.test import test_server, FIXTURES_ROOT -from server.common.utils.type_conversion_utils import convert_string_to_value -from server.test.unit.common.config import ConfigTests +from backend.common.errors import ConfigurationError +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.common.utils.type_conversion_utils import convert_string_to_value +from backend.test.test_czi_hosted.unit import test_server +from backend.test import FIXTURES_ROOT +from backend.test.test_czi_hosted.unit.common.config import ConfigTests class TestExternalConfig(ConfigTests): @@ -88,7 +89,7 @@ class TestExternalConfig(ConfigTests): app_config.complete_config() self.assertEqual(config_error.exception.message, "required environment variable 'THIS_ENV_IS_NOT_SET' not set") - @patch("server.common.config.external_config.get_secret_key") + @patch("backend.czi_hosted.common.config.external_config.get_secret_key") def test_aws_secrets_manager(self, mock_get_secret_key): mock_get_secret_key.return_value = { "oauth_client_secret": "mock_oauth_secret", @@ -129,7 +130,7 @@ class TestExternalConfig(ConfigTests): self.assertEqual(app_config.server_config.authentication__params_oauth__client_secret, "mock_oauth_secret") self.assertEqual(app_config.default_dataset_config.user_annotations__hosted_tiledb_array__db_uri, "mock_db_uri") - @patch("server.common.config.external_config.get_secret_key") + @patch("backend.czi_hosted.common.config.external_config.get_secret_key") def test_aws_secrets_manager_error(self, mock_get_secret_key): mock_get_secret_key.return_value = { "oauth_client_secret": "mock_oauth_secret", diff --git a/server/test/unit/common/config/test_server_config.py b/backend/test/test_czi_hosted/unit/common/config/test_server_config.py similarity index 94% rename from server/test/unit/common/config/test_server_config.py rename to backend/test/test_czi_hosted/unit/common/config/test_server_config.py index 932a5d33..99af3be9 100644 --- a/server/test/unit/common/config/test_server_config.py +++ b/backend/test/test_czi_hosted/unit/common/config/test_server_config.py @@ -3,16 +3,15 @@ import unittest from unittest import mock from unittest.mock import patch -from server.common.config.base_config import BaseConfig -from server.common.utils.utils import find_available_port -from server.test import PROJECT_ROOT, FIXTURES_ROOT - +from backend.czi_hosted.common.config.base_config import BaseConfig +from backend.common.utils.utils import find_available_port +from backend.test.test_czi_hosted.unit import test_server +from backend.test import PROJECT_ROOT, FIXTURES_ROOT import requests -from server.common.config.app_config import AppConfig -from server.common.errors import ConfigurationError -from server.test import test_server -from server.test.unit.common.config import ConfigTests +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.common.errors import ConfigurationError +from backend.test.test_czi_hosted.unit.common.config import ConfigTests def mockenv(**envvars): @@ -49,7 +48,7 @@ class TestServerConfig(ConfigTests): with self.assertRaises(ConfigurationError): invalid_config.complete_config() - @patch("server.common.config.server_config.BaseConfig.validate_correct_type_of_configuration_attribute") + @patch("backend.czi_hosted.common.config.server_config.BaseConfig.validate_correct_type_of_configuration_attribute") def test_complete_config_checks_all_attr(self, mock_check_attrs): mock_check_attrs.side_effect = BaseConfig.validate_correct_type_of_configuration_attribute() self.server_config.complete_config(self.context) @@ -60,7 +59,7 @@ class TestServerConfig(ConfigTests): with self.assertRaises(ConfigurationError): config.server_config.handle_app(self.context) - @patch("server.common.config.server_config.discover_s3_region_name") + @patch("backend.czi_hosted.common.config.server_config.discover_s3_region_name") def test_handle_data_locator_works_for_default_types(self, mock_discover_region_name): mock_discover_region_name.return_value = None # Default config @@ -81,7 +80,7 @@ class TestServerConfig(ConfigTests): with self.assertRaises(ConfigurationError): config.server_config.handle_data_locator() - @patch("server.common.config.server_config.discover_s3_region_name") + @patch("backend.czi_hosted.common.config.server_config.discover_s3_region_name") def test_handle_data_locator_can_read_from_dataroot(self, mock_discover_region_name): mock_discover_region_name.return_value = "us-west-2" dataroot = { @@ -286,7 +285,7 @@ class TestServerConfig(ConfigTests): response = session.get(f"{server}/set2/pbmc3k.cxg/") self.assertEqual(response.status_code, 200) - @patch("server.common.config.server_config.diffexp_tiledb.set_config") + @patch("backend.czi_hosted.common.config.server_config.diffexp_tiledb.set_config") def test_handle_diffexp(self, mock_tiledb_config): custom_config_file = self.custom_app_config( dataroot=f"{FIXTURES_ROOT}", @@ -301,7 +300,7 @@ class TestServerConfig(ConfigTests): # called with the min of diffexp_max_workers and cpus*cpu_multiplier mock_tiledb_config.assert_called_once_with(1, 4) - @patch("server.data_cxg.cxg_adaptor.CxgAdaptor.set_tiledb_context") + @patch("backend.czi_hosted.data_cxg.cxg_adaptor.CxgAdaptor.set_tiledb_context") def test_handle_adaptor(self, mock_tiledb_context): custom_config = self.custom_app_config( dataroot=f"{FIXTURES_ROOT}", cxg_tile_cache_size=10, cxg_num_reader_threads=2 diff --git a/server/test/unit/common/test_api.py b/backend/test/test_czi_hosted/unit/common/test_api.py similarity index 98% rename from server/test/unit/common/test_api.py rename to backend/test/test_czi_hosted/unit/common/test_api.py index 54a3dc82..dea2693e 100644 --- a/server/test/unit/common/test_api.py +++ b/backend/test/test_czi_hosted/unit/common/test_api.py @@ -7,17 +7,15 @@ from http import HTTPStatus import pandas as pd import requests -import server.test.unit.decode_fbs as decode_fbs -from server.data_common.matrix_loader import MatrixDataType -from server.test import ( +from backend.czi_hosted.data_common.matrix_loader import MatrixDataType +from backend.test.test_czi_hosted.unit import ( data_with_tmp_annotations, make_fbs, - PROJECT_ROOT, - FIXTURES_ROOT, start_test_server, stop_test_server, ) -from server.test.fixtures.fixtures import pbmc3k_colors +from backend.test import PROJECT_ROOT, FIXTURES_ROOT, decode_fbs +from backend.test.fixtures.fixtures import pbmc3k_colors BAD_FILTER = {"filter": {"obs": {"annotation_value": [{"name": "xyz"}]}}} diff --git a/local_server/test/unit/common/test_corpora.py b/backend/test/test_czi_hosted/unit/common/test_corpora.py similarity index 97% rename from local_server/test/unit/common/test_corpora.py rename to backend/test/test_czi_hosted/unit/common/test_corpora.py index 589795e4..71689560 100644 --- a/local_server/test/unit/common/test_corpora.py +++ b/backend/test/test_czi_hosted/unit/common/test_corpora.py @@ -7,12 +7,13 @@ from http import HTTPStatus import anndata import requests -from local_server.common.corpora import ( +from backend.czi_hosted.common.corpora import ( corpora_get_versions_from_anndata, corpora_is_version_supported, corpora_get_props_from_anndata, ) -from local_server.test import PROJECT_ROOT, start_test_server, stop_test_server +from backend.test.test_czi_hosted.unit import start_test_server, stop_test_server +from backend.test import PROJECT_ROOT VERSION = "v0.2" diff --git a/local_server/test/unit/common/test_nan_rest.py b/backend/test/test_czi_hosted/unit/common/test_nan_rest.py similarity index 88% rename from local_server/test/unit/common/test_nan_rest.py rename to backend/test/test_czi_hosted/unit/common/test_nan_rest.py index 7ec01464..fd154407 100644 --- a/local_server/test/unit/common/test_nan_rest.py +++ b/backend/test/test_czi_hosted/unit/common/test_nan_rest.py @@ -1,12 +1,15 @@ from http import HTTPStatus import unittest import math -from local_server.test import start_test_server, stop_test_server -import local_server.test.unit.decode_fbs as decode_fbs +import backend.test.decode_fbs as decode_fbs + import requests +from backend.test import FIXTURES_ROOT +from backend.test.test_czi_hosted.unit import start_test_server, stop_test_server + VERSION = "v0.2" BAD_FILTER = {"filter": {"obs": {"annotation_value": [{"name": "xyz"}]}}} @@ -16,7 +19,7 @@ class WithNaNs(unittest.TestCase): @classmethod def setUpClass(cls): - cls.ps, cls.server = start_test_server(["test/fixtures/nan.h5ad"]) + cls.ps, cls.server = start_test_server([f"{FIXTURES_ROOT}/nan.h5ad"]) @classmethod def tearDownClass(cls): diff --git a/local_server/test/unit/common/test_rest.py b/backend/test/test_czi_hosted/unit/common/test_rest.py similarity index 95% rename from local_server/test/unit/common/test_rest.py rename to backend/test/test_czi_hosted/unit/common/test_rest.py index 82ae3ad5..8b8151b3 100644 --- a/local_server/test/unit/common/test_rest.py +++ b/backend/test/test_czi_hosted/unit/common/test_rest.py @@ -1,8 +1,8 @@ import unittest from urllib.parse import parse_qs from werkzeug.datastructures import MultiDict -from local_server.common.rest import _query_parameter_to_filter -from local_server.common.errors import FilterError +from backend.common.errors import FilterError +from backend.czi_hosted.common.rest import _query_parameter_to_filter def _qsparse(qs): diff --git a/server/test/unit/common/test_writable_annotation.py b/backend/test/test_czi_hosted/unit/common/test_writable_annotation.py similarity index 96% rename from server/test/unit/common/test_writable_annotation.py rename to backend/test/test_czi_hosted/unit/common/test_writable_annotation.py index 00cbd0f3..35128de2 100644 --- a/server/test/unit/common/test_writable_annotation.py +++ b/backend/test/test_czi_hosted/unit/common/test_writable_annotation.py @@ -9,13 +9,15 @@ import pandas as pd import tiledb from flask import Flask -import server.test.unit.decode_fbs as decode_fbs -from server.common.errors import AnnotationCategoryNameError -from server.common.rest import schema_get_helper, annotations_put_fbs_helper -from server.data_common.matrix_loader import MatrixDataType -from server.db.cellxgene_orm import CellxGeneDataset, Annotation -from server.test import data_with_tmp_annotations, make_fbs, data_with_tmp_tiledb_annotations +from backend.common.errors import AnnotationCategoryNameError +from backend.czi_hosted.common.rest import annotations_put_fbs_helper, schema_get_helper +from backend.czi_hosted.data_common.matrix_loader import MatrixDataType +from backend.czi_hosted.db.cellxgene_orm import CellxGeneDataset, Annotation +from backend.test.fixtures.database import TestDatabase +from backend.test.test_czi_hosted.unit import make_fbs, data_with_tmp_tiledb_annotations, data_with_tmp_annotations +from backend.test import decode_fbs +TestDatabase() class auth(object): def get_user_id(): diff --git a/server/db/__init__.py b/backend/test/test_czi_hosted/unit/common/utils/__init__.py similarity index 100% rename from server/db/__init__.py rename to backend/test/test_czi_hosted/unit/common/utils/__init__.py diff --git a/server/test/unit/common/utils/test_cxg_generation_utils.py b/backend/test/test_czi_hosted/unit/common/utils/test_cxg_generation_utils.py similarity index 96% rename from server/test/unit/common/utils/test_cxg_generation_utils.py rename to backend/test/test_czi_hosted/unit/common/utils/test_cxg_generation_utils.py index b9043c33..5437b23b 100644 --- a/server/test/unit/common/utils/test_cxg_generation_utils.py +++ b/backend/test/test_czi_hosted/unit/common/utils/test_cxg_generation_utils.py @@ -1,6 +1,6 @@ import json import unittest -from os import popen, path, mkdir +from os import path, mkdir from shutil import rmtree from uuid import uuid4 @@ -8,19 +8,18 @@ import numpy as np import tiledb from pandas import Series, DataFrame -from server.common.utils.cxg_generation_utils import ( +from backend.czi_hosted.common.utils.cxg_generation_utils import ( convert_dictionary_to_cxg_group, convert_dataframe_to_cxg_array, convert_ndarray_to_cxg_dense_array, convert_matrix_to_cxg_array, ) - -PROJECT_ROOT = popen("git rev-parse --show-toplevel").read().strip() +from backend.test import FIXTURES_ROOT class TestCxgGenerationUtils(unittest.TestCase): def setUp(self): - self.testing_cxg_temp_directory = f"{PROJECT_ROOT}/server/test/fixtures/{uuid4()}" + self.testing_cxg_temp_directory = f"{FIXTURES_ROOT}/{uuid4()}" mkdir(self.testing_cxg_temp_directory) def tearDown(self): diff --git a/server/test/unit/common/utils/test_matrix_utils.py b/backend/test/test_czi_hosted/unit/common/utils/test_matrix_utils.py similarity index 95% rename from server/test/unit/common/utils/test_matrix_utils.py rename to backend/test/test_czi_hosted/unit/common/utils/test_matrix_utils.py index 9cc9daf5..c7b3cc19 100644 --- a/server/test/unit/common/utils/test_matrix_utils.py +++ b/backend/test/test_czi_hosted/unit/common/utils/test_matrix_utils.py @@ -2,7 +2,7 @@ import unittest import numpy as np -from server.common.utils.matrix_utils import is_matrix_sparse, get_column_shift_encode_for_matrix +from backend.czi_hosted.common.utils.matrix_utils import is_matrix_sparse, get_column_shift_encode_for_matrix class TestMatrixUtils(unittest.TestCase): diff --git a/server/test/unit/common/utils/test_sanitization_utils.py b/backend/test/test_czi_hosted/unit/common/utils/test_sanitization_utils.py similarity index 95% rename from server/test/unit/common/utils/test_sanitization_utils.py rename to backend/test/test_czi_hosted/unit/common/utils/test_sanitization_utils.py index e209be95..9ae3cede 100644 --- a/server/test/unit/common/utils/test_sanitization_utils.py +++ b/backend/test/test_czi_hosted/unit/common/utils/test_sanitization_utils.py @@ -1,6 +1,6 @@ import unittest -from server.common.utils.sanitization_utils import sanitize_values_in_list, sanitize_keys_in_dictionary +from backend.czi_hosted.common.utils.sanitization_utils import sanitize_values_in_list, sanitize_keys_in_dictionary class TestSanitizationUtils(unittest.TestCase): diff --git a/local_server/test/unit/common/utils/test_utils.py b/backend/test/test_czi_hosted/unit/common/utils/test_utils.py similarity index 68% rename from local_server/test/unit/common/utils/test_utils.py rename to backend/test/test_czi_hosted/unit/common/utils/test_utils.py index 852c0969..fd1f9442 100644 --- a/local_server/test/unit/common/utils/test_utils.py +++ b/backend/test/test_czi_hosted/unit/common/utils/test_utils.py @@ -2,14 +2,14 @@ import os import shutil import unittest -from local_server.common.utils.utils import import_plugins -from local_server.test import PROJECT_ROOT, random_string +from backend.common.utils.utils import import_plugins +from backend.test import PROJECT_ROOT, random_string class TestPlugins(unittest.TestCase): """ Test plugin import functionality """ - plugins_dir = f"{PROJECT_ROOT}/local_server/test/plugins" + plugins_dir = f"{PROJECT_ROOT}/backend/test/test_czi_hosted/unit/plugins" test_plugin_path = f"{plugins_dir}/foo.py" secret = random_string(8) @@ -27,8 +27,8 @@ class TestPlugins(unittest.TestCase): def test_import_plugins(self): self.assertTrue(os.path.isfile(self.test_plugin_path)) - loaded_modules = import_plugins("local_server.test.plugins") + loaded_modules = import_plugins("backend.test.test_czi_hosted.unit.plugins") # test that import plugins found the file - self.assertEqual(["local_server.test.plugins.foo"], [ele.__name__ for ele in loaded_modules]) + self.assertEqual(["backend.test.test_czi_hosted.unit.plugins.foo"], [ele.__name__ for ele in loaded_modules]) # test that the module was properly executed self.assertEqual(self.secret, loaded_modules[0].SECRET) diff --git a/server/test/fixtures/__init__.py b/backend/test/test_czi_hosted/unit/compute/__init__.py similarity index 100% rename from server/test/fixtures/__init__.py rename to backend/test/test_czi_hosted/unit/compute/__init__.py diff --git a/server/test/unit/compute/test_diffexp_cxg.py b/backend/test/test_czi_hosted/unit/compute/test_diffexp_cxg.py similarity index 91% rename from server/test/unit/compute/test_diffexp_cxg.py rename to backend/test/test_czi_hosted/unit/compute/test_diffexp_cxg.py index 30dc7472..20500b42 100644 --- a/server/test/unit/compute/test_diffexp_cxg.py +++ b/backend/test/test_czi_hosted/unit/compute/test_diffexp_cxg.py @@ -4,13 +4,14 @@ import unittest import numpy as np -import server.compute.diffexp_cxg as diffexp_cxg -import server.compute.diffexp_generic as diffexp_generic -from server.converters.h5ad_data_file import H5ADDataFile -from server.data_common.fbs.matrix import encode_matrix_fbs, decode_matrix_fbs -from server.data_common.matrix_loader import MatrixDataLoader -from server.test import PROJECT_ROOT, app_config, FIXTURES_ROOT -from server.test.performance.create_test_matrix import create_test_h5ad +from backend.czi_hosted.compute import diffexp_generic, diffexp_cxg +from backend.czi_hosted.compute.diffexp_cxg import diffexp_ttest +from backend.czi_hosted.converters.h5ad_data_file import H5ADDataFile +from backend.common.fbs.matrix import encode_matrix_fbs, decode_matrix_fbs +from backend.czi_hosted.data_common.matrix_loader import MatrixDataLoader +from backend.test.test_czi_hosted.performance.create_test_matrix import create_test_h5ad +from backend.test.test_czi_hosted.unit import app_config +from backend.test import PROJECT_ROOT, FIXTURES_ROOT class DiffExpTest(unittest.TestCase): @@ -79,7 +80,7 @@ class DiffExpTest(unittest.TestCase): self.check_1_10_2_10(results) # run it directly - results = diffexp_cxg.diffexp_ttest(adaptor, maskA, maskB, 10) + results = diffexp_ttest(adaptor, maskA, maskB, 10) self.check_1_10_2_10(results) def test_cxg_generic(self): diff --git a/server/test/locust/__init__.py b/backend/test/test_czi_hosted/unit/converters/__init__.py similarity index 100% rename from server/test/locust/__init__.py rename to backend/test/test_czi_hosted/unit/converters/__init__.py diff --git a/server/test/performance/__init__.py b/backend/test/test_czi_hosted/unit/converters/schema/__init__.py similarity index 100% rename from server/test/performance/__init__.py rename to backend/test/test_czi_hosted/unit/converters/schema/__init__.py diff --git a/local_server/test/unit/converters/schema/test_gene_symbol.py b/backend/test/test_czi_hosted/unit/converters/schema/test_gene_symbol.py similarity index 96% rename from local_server/test/unit/converters/schema/test_gene_symbol.py rename to backend/test/test_czi_hosted/unit/converters/schema/test_gene_symbol.py index fcd400c8..a0a825be 100644 --- a/local_server/test/unit/converters/schema/test_gene_symbol.py +++ b/backend/test/test_czi_hosted/unit/converters/schema/test_gene_symbol.py @@ -3,8 +3,8 @@ import unittest import pandas as pd -from local_server.test import FIXTURES_ROOT -from local_server.converters.schema import gene_symbol +from backend.czi_hosted.converters.schema import gene_symbol +from backend.test import FIXTURES_ROOT class TestHGNCSymbolChecker(unittest.TestCase): diff --git a/server/test/unit/converters/schema/test_ontology.py b/backend/test/test_czi_hosted/unit/converters/schema/test_ontology.py similarity index 98% rename from server/test/unit/converters/schema/test_ontology.py rename to backend/test/test_czi_hosted/unit/converters/schema/test_ontology.py index f6504da6..6cda5b12 100644 --- a/server/test/unit/converters/schema/test_ontology.py +++ b/backend/test/test_czi_hosted/unit/converters/schema/test_ontology.py @@ -1,9 +1,8 @@ import json -import unittest import unittest.mock -from server.converters.schema import ontology +from backend.czi_hosted.converters.schema import ontology class TestOntologyParsing(unittest.TestCase): diff --git a/local_server/test/unit/converters/schema/test_remix.py b/backend/test/test_czi_hosted/unit/converters/schema/test_remix.py similarity index 86% rename from local_server/test/unit/converters/schema/test_remix.py rename to backend/test/test_czi_hosted/unit/converters/schema/test_remix.py index 49713d29..4b4e37a4 100644 --- a/local_server/test/unit/converters/schema/test_remix.py +++ b/backend/test/test_czi_hosted/unit/converters/schema/test_remix.py @@ -8,18 +8,18 @@ import numpy import pandas as pd import scanpy as sc -from local_server.converters.schema import remix +from backend.czi_hosted.converters.schema import remix -PROJECT_ROOT = os.popen("git rev-parse --show-toplevel").read().strip() +from backend.test import PROJECT_ROOT, FIXTURES_ROOT class TestApplySchema(unittest.TestCase): def setUp(self): - self.source_h5ad_path = f"{PROJECT_ROOT}/local_server/test/fixtures/pbmc3k-CSC-gz.h5ad" - self.output_h5ad_path = f"{PROJECT_ROOT}/local_server/test/fixtures/test_remix.h5ad" - self.config_path = f"{PROJECT_ROOT}/local_server/test/fixtures/test_config.yaml" - self.bad_config_path = f"{PROJECT_ROOT}/local_server/test/fixtures/test_bad_config.yaml" + self.source_h5ad_path = f"{FIXTURES_ROOT}/pbmc3k-CSC-gz.h5ad" + self.output_h5ad_path = f"{FIXTURES_ROOT}/test_remix.h5ad" + self.config_path = f"{FIXTURES_ROOT}/test_config.yaml" + self.bad_config_path = f"{FIXTURES_ROOT}/test_bad_config.yaml" def tearDown(self): try: @@ -27,7 +27,7 @@ class TestApplySchema(unittest.TestCase): except OSError: pass - @unittest.mock.patch("local_server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.czi_hosted.converters.schema.ontology.get_ontology_label") def test_apply_schema(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "test label" remix.apply_schema(self.source_h5ad_path, self.config_path, self.output_h5ad_path) @@ -42,7 +42,7 @@ class TestApplySchema(unittest.TestCase): self.assertIn("version", new_adata.uns_keys()) - @unittest.mock.patch("local_server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.czi_hosted.converters.schema.ontology.get_ontology_label") def test_apply_bad_schema(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "test label" remix.apply_schema(self.source_h5ad_path, self.bad_config_path, self.output_h5ad_path) @@ -77,7 +77,7 @@ class TestFieldParsing(unittest.TestCase): self.assertEqual(("UBERON:1234", ""), remix.split_suffix("UBERON:1234")) self.assertEqual(("UBERON:1234 (something)", ""), remix.split_suffix("UBERON:1234 (something)")) - @unittest.mock.patch("local_server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.czi_hosted.converters.schema.ontology.get_ontology_label") def test_get_curie_and_label(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "test label" self.assertEqual( @@ -123,7 +123,7 @@ class TestManipulateAnndata(unittest.TestCase): json.dumps([{"name": "contributor1"}, {"name": "contributor2"}]) ) - @unittest.mock.patch("local_server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.czi_hosted.converters.schema.ontology.get_ontology_label") def test_remix_uns(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "Pan troglodytes" uns_config = { @@ -154,7 +154,7 @@ class TestManipulateAnndata(unittest.TestCase): self.assertEqual(self.adata.uns['contributors'], json.dumps([{"name": "scientist", "email": "scientist@science.com"}])) - @unittest.mock.patch("local_server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.czi_hosted.converters.schema.ontology.get_ontology_label") def test_remix_obs(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "lung (in a monkey)" obs_config = { @@ -189,10 +189,10 @@ class TestManipulateAnndata(unittest.TestCase): class TestFixupGeneSymbols(unittest.TestCase): def setUp(self): - self.seurat_path = f"{PROJECT_ROOT}/local_server/test/fixtures/schema_test_data/seurat_tutorial.h5ad" - self.seurat_merged_path = f"{PROJECT_ROOT}/local_server/test/fixtures/schema_test_data/seurat_tutorial_merged.h5ad" - self.sctransform_path = f"{PROJECT_ROOT}/local_server/test/fixtures/schema_test_data/sctransform.h5ad" - self.sctransform_merged_path = f"{PROJECT_ROOT}/local_server/test/fixtures/schema_test_data/sctransform_merged.h5ad" + self.seurat_path = f"{PROJECT_ROOT}/czi_hosted/test/fixtures/schema_test_data/seurat_tutorial.h5ad" + self.seurat_merged_path = f"{PROJECT_ROOT}/czi_hosted/test/fixtures/schema_test_data/seurat_tutorial_merged.h5ad" + self.sctransform_path = f"{PROJECT_ROOT}/czi_hosted/test/fixtures/schema_test_data/sctransform.h5ad" + self.sctransform_merged_path = f"{PROJECT_ROOT}/czi_hosted/test/fixtures/schema_test_data/sctransform_merged.h5ad" # There's lots of MALAT1, but it doesn't collide with any other names, # so it shouldn't change during merging. @@ -203,7 +203,7 @@ class TestFixupGeneSymbols(unittest.TestCase): if not os.path.isfile(self.seurat_path): return unittest.skip( "Skipping gene symbol conversion tests because test h5ads are not present. To create them, " - "run local_server/test/fixtures/schema_test_data/generate_test_data.sh" + "run czi_hosted/test/fixtures/schema_test_data/generate_test_data.sh" ) original_adata = sc.read_h5ad(self.seurat_path) @@ -232,7 +232,7 @@ class TestFixupGeneSymbols(unittest.TestCase): if not os.path.isfile(self.sctransform_path): return unittest.skip( "Skipping gene symbol conversion tests because test h5ads are not present. To create them, " - "run local_server/test/fixtures/schema_test_data/generate_test_data.sh" + "run czi_hosted/test/fixtures/schema_test_data/generate_test_data.sh" ) original_adata = sc.read_h5ad(self.sctransform_path) diff --git a/server/test/unit/converters/schema/test_validate.py b/backend/test/test_czi_hosted/unit/converters/schema/test_validate.py similarity index 98% rename from server/test/unit/converters/schema/test_validate.py rename to backend/test/test_czi_hosted/unit/converters/schema/test_validate.py index fba885a6..01978222 100644 --- a/server/test/unit/converters/schema/test_validate.py +++ b/backend/test/test_czi_hosted/unit/converters/schema/test_validate.py @@ -1,13 +1,12 @@ import json -import os import unittest import pandas as pd import scanpy as sc -from server.converters.schema import validate +from backend.czi_hosted.converters.schema import validate -PROJECT_ROOT = os.popen("git rev-parse --show-toplevel").read().strip() +from backend.test import PROJECT_ROOT class TestFieldValidation(unittest.TestCase): @@ -411,7 +410,7 @@ class TestGetSchema(unittest.TestCase): class TestValidate(unittest.TestCase): def setUp(self): - self.source_h5ad_path = f"{PROJECT_ROOT}/server/test/fixtures/pbmc3k-CSC-gz.h5ad" + self.source_h5ad_path = f"{PROJECT_ROOT}/backend/test/fixtures/pbmc3k-CSC-gz.h5ad" def test_shallow(self): diff --git a/server/test/unit/converters/test_h5ad_data_file.py b/backend/test/test_czi_hosted/unit/converters/test_h5ad_data_file.py similarity index 97% rename from server/test/unit/converters/test_h5ad_data_file.py rename to backend/test/test_czi_hosted/unit/converters/test_h5ad_data_file.py index 39412351..d0e0c6da 100644 --- a/server/test/unit/converters/test_h5ad_data_file.py +++ b/backend/test/test_czi_hosted/unit/converters/test_h5ad_data_file.py @@ -1,7 +1,7 @@ import json import unittest from glob import glob -from os import popen, remove, path +from os import remove, path from shutil import rmtree from uuid import uuid4 @@ -9,10 +9,10 @@ import anndata import numpy as np from pandas import Series, DataFrame -from server.common.utils.corpora_constants import CorporaConstants -from server.converters.h5ad_data_file import H5ADDataFile +from backend.czi_hosted.common.corpora import CorporaConstants +from backend.czi_hosted.converters.h5ad_data_file import H5ADDataFile -PROJECT_ROOT = popen("git rev-parse --show-toplevel").read().strip() +from backend.test import PROJECT_ROOT class TestH5ADDataFile(unittest.TestCase): @@ -222,7 +222,7 @@ class TestH5ADDataFile(unittest.TestCase): ) def _write_anndata_to_file(self, anndata): - temporary_filename = f"{PROJECT_ROOT}/server/test/fixtures/{uuid4()}.h5ad" + temporary_filename = f"{PROJECT_ROOT}/backend/test/fixtures/{uuid4()}.h5ad" anndata.write(temporary_filename) return temporary_filename diff --git a/server/test/test_database/__init__.py b/backend/test/test_czi_hosted/unit/data_anndata/__init__.py similarity index 100% rename from server/test/test_database/__init__.py rename to backend/test/test_czi_hosted/unit/data_anndata/__init__.py diff --git a/server/test/unit/data_anndata/test_anndata_adaptor.py b/backend/test/test_czi_hosted/unit/data_anndata/test_anndata_adaptor.py similarity index 96% rename from server/test/unit/data_anndata/test_anndata_adaptor.py rename to backend/test/test_czi_hosted/unit/data_anndata/test_anndata_adaptor.py index d0df5db1..0089b8fb 100644 --- a/server/test/unit/data_anndata/test_anndata_adaptor.py +++ b/backend/test/test_czi_hosted/unit/data_anndata/test_anndata_adaptor.py @@ -8,12 +8,12 @@ import pandas as pd import pytest from parameterized import parameterized_class -import server.test.unit.decode_fbs as decode_fbs -from server.common.data_locator import DataLocator -from server.common.errors import FilterError -from server.data_anndata.anndata_adaptor import AnndataAdaptor -from server.test import PROJECT_ROOT, app_config, FIXTURES_ROOT -from server.test.fixtures.fixtures import pbmc3k_colors +from backend.common.utils.data_locator import DataLocator +from backend.common.errors import FilterError +from backend.czi_hosted.data_anndata.anndata_adaptor import AnndataAdaptor +from backend.test.test_czi_hosted.unit import app_config +from backend.test import PROJECT_ROOT, FIXTURES_ROOT, decode_fbs +from backend.test.fixtures.fixtures import pbmc3k_colors """ Test the anndata adaptor using the pbmc3k data set. diff --git a/server/test/unit/data_anndata/test_anndata_adaptor_data_load.py b/backend/test/test_czi_hosted/unit/data_anndata/test_anndata_adaptor_data_load.py similarity index 90% rename from server/test/unit/data_anndata/test_anndata_adaptor_data_load.py rename to backend/test/test_czi_hosted/unit/data_anndata/test_anndata_adaptor_data_load.py index 9724eadb..297e455a 100644 --- a/server/test/unit/data_anndata/test_anndata_adaptor_data_load.py +++ b/backend/test/test_czi_hosted/unit/data_anndata/test_anndata_adaptor_data_load.py @@ -1,10 +1,10 @@ import unittest import json -from server.data_anndata.anndata_adaptor import AnndataAdaptor -from server.common.data_locator import DataLocator -from server.common.config.app_config import AppConfig -from server.test import PROJECT_ROOT +from backend.common.utils.data_locator import DataLocator +from backend.czi_hosted.data_anndata.anndata_adaptor import AnndataAdaptor +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.test import PROJECT_ROOT class DataLoadAdaptorTest(unittest.TestCase): @@ -59,7 +59,7 @@ class DataLocatorAdaptorTest(unittest.TestCase): self.assertEqual(data.gene_count, 1838) def test_posix_file(self): - locator = DataLocator("../example-dataset/pbmc3k.h5ad") + locator = DataLocator("../../example-dataset/pbmc3k.h5ad") config = self.get_basic_config() config.update_server_config(single_dataset__datapath=locator.path) config.complete_config() diff --git a/server/test/unit/data_anndata/test_nan_anndata_adaptor.py b/backend/test/test_czi_hosted/unit/data_anndata/test_nan_anndata_adaptor.py similarity index 90% rename from server/test/unit/data_anndata/test_nan_anndata_adaptor.py rename to backend/test/test_czi_hosted/unit/data_anndata/test_nan_anndata_adaptor.py index 48c4e020..16a20fe7 100644 --- a/server/test/unit/data_anndata/test_nan_anndata_adaptor.py +++ b/backend/test/test_czi_hosted/unit/data_anndata/test_nan_anndata_adaptor.py @@ -4,11 +4,11 @@ import warnings import pytest -import server.test.unit.decode_fbs as decode_fbs -from server.common.data_locator import DataLocator -from server.common.errors import FilterError -from server.data_anndata.anndata_adaptor import AnndataAdaptor -from server.test import app_config, FIXTURES_ROOT +from backend.common.utils.data_locator import DataLocator +from backend.common.errors import FilterError +from backend.czi_hosted.data_anndata.anndata_adaptor import AnndataAdaptor +from backend.test.test_czi_hosted.unit import app_config +from backend.test import FIXTURES_ROOT, decode_fbs class NaNTest(unittest.TestCase): diff --git a/server/test/unit/__init__.py b/backend/test/test_czi_hosted/unit/data_common/__init__.py similarity index 100% rename from server/test/unit/__init__.py rename to backend/test/test_czi_hosted/unit/data_common/__init__.py diff --git a/server/test/unit/auth/__init__.py b/backend/test/test_czi_hosted/unit/data_common/fbs/__init__.py similarity index 100% rename from server/test/unit/auth/__init__.py rename to backend/test/test_czi_hosted/unit/data_common/fbs/__init__.py diff --git a/local_server/test/unit/data_common/fbs/test_matrix.py b/backend/test/test_czi_hosted/unit/data_common/fbs/test_matrix.py similarity index 96% rename from local_server/test/unit/data_common/fbs/test_matrix.py rename to backend/test/test_czi_hosted/unit/data_common/fbs/test_matrix.py index aaaf12aa..9b80d042 100644 --- a/local_server/test/unit/data_common/fbs/test_matrix.py +++ b/backend/test/test_czi_hosted/unit/data_common/fbs/test_matrix.py @@ -3,8 +3,8 @@ import pandas as pd import numpy as np from scipy import sparse -import local_server.test.unit.decode_fbs as decode_fbs -from local_server.data_common.fbs.matrix import encode_matrix_fbs, decode_matrix_fbs +from backend.test import decode_fbs +from backend.common.fbs.matrix import encode_matrix_fbs, decode_matrix_fbs class FbsTests(unittest.TestCase): diff --git a/server/test/unit/data_common/test_matrix_loader.py b/backend/test/test_czi_hosted/unit/data_common/test_matrix_loader.py similarity index 95% rename from server/test/unit/data_common/test_matrix_loader.py rename to backend/test/test_czi_hosted/unit/data_common/test_matrix_loader.py index 9631de32..3b39e7c3 100644 --- a/server/test/unit/data_common/test_matrix_loader.py +++ b/backend/test/test_czi_hosted/unit/data_common/test_matrix_loader.py @@ -4,10 +4,10 @@ import tempfile import time import unittest -from server.common.config.app_config import AppConfig -from server.common.errors import DatasetAccessError -from server.data_common.matrix_loader import MatrixDataCacheManager -from server.test import FIXTURES_ROOT +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.common.errors import DatasetAccessError +from backend.czi_hosted.data_common.matrix_loader import MatrixDataCacheManager +from backend.test import FIXTURES_ROOT class MatrixCacheTest(unittest.TestCase): diff --git a/server/test/unit/cli/__init__.py b/backend/test/test_czi_hosted/unit/data_cxg/__init__.py similarity index 100% rename from server/test/unit/cli/__init__.py rename to backend/test/test_czi_hosted/unit/data_cxg/__init__.py diff --git a/server/test/unit/data_cxg/test_cxg_adaptor.py b/backend/test/test_czi_hosted/unit/data_cxg/test_cxg_adaptor.py similarity index 64% rename from server/test/unit/data_cxg/test_cxg_adaptor.py rename to backend/test/test_czi_hosted/unit/data_cxg/test_cxg_adaptor.py index 3544138c..8775a1f3 100644 --- a/server/test/unit/data_cxg/test_cxg_adaptor.py +++ b/backend/test/test_czi_hosted/unit/data_cxg/test_cxg_adaptor.py @@ -1,9 +1,10 @@ import unittest -from server.common.data_locator import DataLocator -from server.data_cxg.cxg_adaptor import CxgAdaptor -from server.test import FIXTURES_ROOT, app_config -from server.test.fixtures.fixtures import pbmc3k_colors +from backend.common.utils.data_locator import DataLocator +from backend.czi_hosted.data_cxg.cxg_adaptor import CxgAdaptor +from backend.test.test_czi_hosted.unit import app_config +from backend.test import FIXTURES_ROOT +from backend.test.fixtures.fixtures import pbmc3k_colors class TestCxgAdaptor(unittest.TestCase): diff --git a/server/test/unit/common/__init__.py b/backend/test/test_czi_hosted/unit/eb/__init__.py similarity index 100% rename from server/test/unit/common/__init__.py rename to backend/test/test_czi_hosted/unit/eb/__init__.py diff --git a/server/test/unit/eb/test_eb.py b/backend/test/test_czi_hosted/unit/eb/test_eb.py similarity index 89% rename from server/test/unit/eb/test_eb.py rename to backend/test/test_czi_hosted/unit/eb/test_eb.py index 61cf1867..938b9fb0 100644 --- a/server/test/unit/eb/test_eb.py +++ b/backend/test/test_czi_hosted/unit/eb/test_eb.py @@ -1,12 +1,13 @@ -import unittest -import tempfile +import os import requests import subprocess -from server.test import PROJECT_ROOT, FIXTURES_ROOT -from server.common.config.app_config import AppConfig -from contextlib import contextmanager +import tempfile import time -import os +import unittest + +from contextlib import contextmanager +from backend.czi_hosted.common.config.app_config import AppConfig +from backend.test import PROJECT_ROOT, FIXTURES_ROOT @contextmanager @@ -31,20 +32,17 @@ def run_eb_app(tempdirname): class Elastic_Beanstalk_Test(unittest.TestCase): def test_run(self): - - tempdir = tempfile.TemporaryDirectory(dir=f"{PROJECT_ROOT}/server") + tempdir = tempfile.TemporaryDirectory(dir=f"{PROJECT_ROOT}/backend/czi_hosted") tempdirname = tempdir.name - config = AppConfig() # test that eb works config.update_server_config(multi_dataset__dataroot=f"{FIXTURES_ROOT}", app__flask_secret_key="open sesame") config.complete_config() config.write_config(f"{tempdirname}/config.yaml") + subprocess.check_call(f"git ls-files . | cpio -pdm {tempdirname}", cwd=f"{PROJECT_ROOT}/backend/czi_hosted/eb", shell=True) - subprocess.check_call(f"git ls-files . | cpio -pdm {tempdirname}", cwd=f"{PROJECT_ROOT}/server/eb", shell=True) subprocess.check_call(["make", "build"], cwd=tempdirname) - with run_eb_app(tempdirname) as server: session = requests.Session() @@ -53,7 +51,7 @@ class Elastic_Beanstalk_Test(unittest.TestCase): assert data_config["config"]["displayNames"]["dataset"] == "pbmc3k" def test_config(self): - check_config_script = os.path.join(PROJECT_ROOT, "server", "eb", "check_config.py") + check_config_script = os.path.join(PROJECT_ROOT, "backend", "czi_hosted", "eb", "check_config.py") with tempfile.TemporaryDirectory() as tempdir: configfile = os.path.join(tempdir, "config.yaml") app_config = AppConfig() diff --git a/server/test/unit/common/utils/__init__.py b/backend/test/test_server/__init__.py similarity index 100% rename from server/test/unit/common/utils/__init__.py rename to backend/test/test_server/__init__.py diff --git a/server/test/locust/README.md b/backend/test/test_server/locust/README.md similarity index 100% rename from server/test/locust/README.md rename to backend/test/test_server/locust/README.md diff --git a/server/test/unit/compute/__init__.py b/backend/test/test_server/locust/__init__.py similarity index 100% rename from server/test/unit/compute/__init__.py rename to backend/test/test_server/locust/__init__.py diff --git a/server/test/locust/config.py b/backend/test/test_server/locust/config.py similarity index 100% rename from server/test/locust/config.py rename to backend/test/test_server/locust/config.py diff --git a/local_server/test/locust/locustfile.py b/backend/test/test_server/locust/locustfile.py similarity index 99% rename from local_server/test/locust/locustfile.py rename to backend/test/test_server/locust/locustfile.py index ec05ab95..9e38cd7c 100644 --- a/local_server/test/locust/locustfile.py +++ b/backend/test/test_server/locust/locustfile.py @@ -7,7 +7,7 @@ from locust import HttpUser, SequentialTaskSet, task, between, TaskSet from locust.clients import HttpSession from requests.packages.urllib3.exceptions import InsecureRequestWarning -import local_server.test.unit.decode_fbs as decode_fbs +import backend.test.decode_fbs as decode_fbs requests.packages.urllib3.disable_warnings(InsecureRequestWarning) diff --git a/server/test/locust/requirements-locust.txt b/backend/test/test_server/locust/requirements-locust.txt similarity index 100% rename from server/test/locust/requirements-locust.txt rename to backend/test/test_server/locust/requirements-locust.txt diff --git a/server/test/unit/converters/__init__.py b/backend/test/test_server/performance/__init__.py similarity index 100% rename from server/test/unit/converters/__init__.py rename to backend/test/test_server/performance/__init__.py diff --git a/server/test/performance/create_test_matrix.py b/backend/test/test_server/performance/create_test_matrix.py similarity index 100% rename from server/test/performance/create_test_matrix.py rename to backend/test/test_server/performance/create_test_matrix.py diff --git a/local_server/test/performance/run_diffexp.py b/backend/test/test_server/performance/run_diffexp.py similarity index 94% rename from local_server/test/performance/run_diffexp.py rename to backend/test/test_server/performance/run_diffexp.py index cd2634bd..ee2413aa 100644 --- a/local_server/test/performance/run_diffexp.py +++ b/backend/test/test_server/performance/run_diffexp.py @@ -4,10 +4,10 @@ import random import time import numpy as np -import local_server.compute.diffexp_generic as diffexp_generic +import backend.server.compute.diffexp_generic as diffexp_generic -from local_server.common.config.app_config import AppConfig -from local_server.data_common.matrix_loader import MatrixDataLoader +from backend.server.common.config.app_config import AppConfig +from backend.server.data_common.matrix_loader import MatrixDataLoader def main(): diff --git a/local_server/test/__init__.py b/backend/test/test_server/unit/__init__.py similarity index 83% rename from local_server/test/__init__.py rename to backend/test/test_server/unit/__init__.py index 7dbd481e..fe7d2b6b 100644 --- a/local_server/test/__init__.py +++ b/backend/test/test_server/unit/__init__.py @@ -1,7 +1,6 @@ import os import random import shutil -import string import tempfile import time from contextlib import contextmanager @@ -11,24 +10,21 @@ from subprocess import Popen import pandas as pd import requests -from local_server.common.annotations.local_file_csv import AnnotationsLocalFile -from local_server.common.config.app_config import AppConfig -from local_server.common.config import DEFAULT_SERVER_PORT -from local_server.common.data_locator import DataLocator -from local_server.common.utils.utils import find_available_port -from local_server.data_common.fbs.matrix import encode_matrix_fbs -from local_server.data_common.matrix_loader import MatrixDataLoader, MatrixDataType - -PROJECT_ROOT = popen("git rev-parse --show-toplevel").read().strip() -FIXTURES_ROOT = PROJECT_ROOT + "/local_server/test/fixtures" -H5AD_FIXTURE = FIXTURES_ROOT + "/pbmc3k-CSC-gz.h5ad" +from backend.server.common.annotations.local_file_csv import AnnotationsLocalFile +from backend.server.common.config.app_config import AppConfig +from backend.server.common.config import DEFAULT_SERVER_PORT +from backend.common.utils.data_locator import DataLocator +from backend.common.utils.utils import find_available_port +from backend.common.fbs.matrix import encode_matrix_fbs +from backend.server.data_common.matrix_loader import MatrixDataType, MatrixDataLoader +from backend.test import PROJECT_ROOT def data_with_tmp_annotations(ext: MatrixDataType, annotations_fixture=False): tmp_dir = tempfile.mkdtemp() annotations_file = path.join(tmp_dir, "test_annotations.csv") if annotations_fixture: - shutil.copyfile(f"{PROJECT_ROOT}/local_server/test/fixtures/pbmc3k-annotations.csv", annotations_file) + shutil.copyfile(f"{PROJECT_ROOT}/backend/test/fixtures/pbmc3k-annotations.csv", annotations_file) fname = { MatrixDataType.H5AD: f"{PROJECT_ROOT}/example-dataset/pbmc3k.h5ad", }[ext] @@ -92,16 +88,12 @@ def app_config(data_locator, backed=False, extra_server_config={}, extra_dataset return config -def random_string(n): - return "".join(random.choice(string.ascii_letters) for _ in range(n)) - - def start_test_server(command_line_args=[], app_config=None, env=None): """ Command line arguments can be passed in, as well as an app_config. This function is meant to be used like this, for example: - with test_server(...) as server: + with unit(...) as server: r = requests.get(f"{server}/...") // check r diff --git a/server/test/unit/converters/schema/__init__.py b/backend/test/test_server/unit/auth/__init__.py similarity index 100% rename from server/test/unit/converters/schema/__init__.py rename to backend/test/test_server/unit/auth/__init__.py diff --git a/local_server/test/unit/auth/test_auth.py b/backend/test/test_server/unit/auth/test_auth.py similarity index 96% rename from local_server/test/unit/auth/test_auth.py rename to backend/test/test_server/unit/auth/test_auth.py index f5075dd3..2db0c3ec 100644 --- a/local_server/test/unit/auth/test_auth.py +++ b/backend/test/test_server/unit/auth/test_auth.py @@ -2,8 +2,9 @@ import unittest import requests -from local_server.common.config.app_config import AppConfig -from local_server.test import H5AD_FIXTURE, test_server +from backend.server.common.config.app_config import AppConfig +from backend.test.test_server.unit import test_server +from backend.test import H5AD_FIXTURE class AuthTest(unittest.TestCase): @@ -31,7 +32,6 @@ class AuthTest(unittest.TestCase): app_config.update_server_config(authentication__type="session", single_dataset__datapath=self.dataset_datapath) app_config.update_dataset_config(user_annotations__enable=True) app_config.complete_config() - with test_server(app_config=app_config) as server: session = requests.Session() config = session.get(f"{server}/api/v0.2/config").json() diff --git a/server/test/unit/data_anndata/__init__.py b/backend/test/test_server/unit/cli/__init__.py similarity index 100% rename from server/test/unit/data_anndata/__init__.py rename to backend/test/test_server/unit/cli/__init__.py diff --git a/server/test/unit/cli/test_launch.py b/backend/test/test_server/unit/cli/test_launch.py similarity index 88% rename from server/test/unit/cli/test_launch.py rename to backend/test/test_server/unit/cli/test_launch.py index 09906abe..b799bf55 100644 --- a/server/test/unit/cli/test_launch.py +++ b/backend/test/test_server/unit/cli/test_launch.py @@ -5,8 +5,8 @@ import unittest import yaml -from server.default_config import default_config -from server.test import FIXTURES_ROOT +from backend.server.default_config import default_config +from backend.test import FIXTURES_ROOT class CLIPLaunchTests(unittest.TestCase): diff --git a/local_server/test/unit/cli/test_prepare.py b/backend/test/test_server/unit/cli/test_prepare.py similarity index 88% rename from local_server/test/unit/cli/test_prepare.py rename to backend/test/test_server/unit/cli/test_prepare.py index 85ea4bd6..517bed54 100644 --- a/local_server/test/unit/cli/test_prepare.py +++ b/backend/test/test_server/unit/cli/test_prepare.py @@ -2,7 +2,7 @@ import unittest import pandas as pd -from local_server.cli.prepare import make_index_unique +from backend.server.cli.prepare import make_index_unique class CLIPrepareTests(unittest.TestCase): diff --git a/local_server/test/unit/cli/test_upgrade.py b/backend/test/test_server/unit/cli/test_upgrade.py similarity index 92% rename from local_server/test/unit/cli/test_upgrade.py rename to backend/test/test_server/unit/cli/test_upgrade.py index 9e5dae43..d4ebb352 100644 --- a/local_server/test/unit/cli/test_upgrade.py +++ b/backend/test/test_server/unit/cli/test_upgrade.py @@ -1,6 +1,6 @@ import unittest -from local_server.cli.upgrade import validate_version_str, split_version, version_gt +from backend.server.cli.upgrade import validate_version_str, split_version, version_gt class CLIUpgradeTests(unittest.TestCase): diff --git a/server/test/unit/data_common/__init__.py b/backend/test/test_server/unit/common/__init__.py similarity index 100% rename from server/test/unit/data_common/__init__.py rename to backend/test/test_server/unit/common/__init__.py diff --git a/local_server/test/unit/common/config/__init__.py b/backend/test/test_server/unit/common/config/__init__.py similarity index 99% rename from local_server/test/unit/common/config/__init__.py rename to backend/test/test_server/unit/common/config/__init__.py index 577d2e16..5ce5f04f 100644 --- a/local_server/test/unit/common/config/__init__.py +++ b/backend/test/test_server/unit/common/config/__init__.py @@ -5,7 +5,7 @@ import random from unittest import mock import yaml -from local_server.test import FIXTURES_ROOT +from backend.test import FIXTURES_ROOT def mockenv(**envvars): diff --git a/local_server/test/unit/common/config/test_app_config.py b/backend/test/test_server/unit/common/config/test_app_config.py similarity index 95% rename from local_server/test/unit/common/config/test_app_config.py rename to backend/test/test_server/unit/common/config/test_app_config.py index b2280f86..99656df3 100644 --- a/local_server/test/unit/common/config/test_app_config.py +++ b/backend/test/test_server/unit/common/config/test_app_config.py @@ -4,11 +4,11 @@ import unittest import yaml -from local_server.default_config import default_config -from local_server.common.config.app_config import AppConfig -from local_server.test.unit.common.config import ConfigTests -from local_server.common.errors import ConfigurationError -from local_server.test import FIXTURES_ROOT, H5AD_FIXTURE +from backend.server.default_config import default_config +from backend.server.common.config.app_config import AppConfig +from backend.common.errors import ConfigurationError +from backend.test.test_server.unit.common.config import ConfigTests +from backend.test import FIXTURES_ROOT, H5AD_FIXTURE class AppConfigTest(ConfigTests): diff --git a/local_server/test/unit/common/config/test_base_config.py b/backend/test/test_server/unit/common/config/test_base_config.py similarity index 91% rename from local_server/test/unit/common/config/test_base_config.py rename to backend/test/test_server/unit/common/config/test_base_config.py index c289106a..3212ec9b 100644 --- a/local_server/test/unit/common/config/test_base_config.py +++ b/backend/test/test_server/unit/common/config/test_base_config.py @@ -1,9 +1,9 @@ import unittest -from local_server.common.config.app_config import AppConfig -from local_server.test import H5AD_FIXTURE -from local_server.test.unit.common.config import ConfigTests -from local_server.common.errors import ConfigurationError +from backend.server.common.config.app_config import AppConfig +from backend.test import H5AD_FIXTURE +from backend.common.errors import ConfigurationError +from backend.test.test_server.unit.common.config import ConfigTests class BaseConfigTest(ConfigTests): diff --git a/local_server/test/unit/common/config/test_dataset_config.py b/backend/test/test_server/unit/common/config/test_dataset_config.py similarity index 93% rename from local_server/test/unit/common/config/test_dataset_config.py rename to backend/test/test_server/unit/common/config/test_dataset_config.py index 4a66a80a..1c9f5126 100644 --- a/local_server/test/unit/common/config/test_dataset_config.py +++ b/backend/test/test_server/unit/common/config/test_dataset_config.py @@ -4,13 +4,13 @@ import tempfile import unittest from unittest.mock import patch -from local_server.common.annotations.local_file_csv import AnnotationsLocalFile -from local_server.common.config.app_config import AppConfig -from local_server.common.config.base_config import BaseConfig -from local_server.test import FIXTURES_ROOT, H5AD_FIXTURE +from backend.server.common.annotations.local_file_csv import AnnotationsLocalFile +from backend.server.common.config.app_config import AppConfig +from backend.server.common.config.base_config import BaseConfig +from backend.test import FIXTURES_ROOT, H5AD_FIXTURE -from local_server.common.errors import ConfigurationError -from local_server.test.unit.common.config import ConfigTests +from backend.common.errors import ConfigurationError +from backend.test.test_server.unit.common.config import ConfigTests class TestDatasetConfig(ConfigTests): @@ -42,7 +42,7 @@ class TestDatasetConfig(ConfigTests): self.assertEqual(config.dataset_config.diffexp__lfc_cutoff, 0.01) self.assertIsNone(config.dataset_config.user_annotations__ontology__obo_location) - @patch("local_server.common.config.dataset_config.BaseConfig.validate_correct_type_of_configuration_attribute") + @patch("backend.server.common.config.dataset_config.BaseConfig.validate_correct_type_of_configuration_attribute") def test_complete_config_checks_all_attr(self, mock_check_attrs): mock_check_attrs.side_effect = BaseConfig.validate_correct_type_of_configuration_attribute() self.dataset_config.complete_config(self.context) diff --git a/local_server/test/unit/common/config/test_external_config.py b/backend/test/test_server/unit/common/config/test_external_config.py similarity index 95% rename from local_server/test/unit/common/config/test_external_config.py rename to backend/test/test_server/unit/common/config/test_external_config.py index b0751c44..e0f36096 100644 --- a/local_server/test/unit/common/config/test_external_config.py +++ b/backend/test/test_server/unit/common/config/test_external_config.py @@ -3,11 +3,12 @@ from unittest.mock import patch import requests -from local_server.common.errors import ConfigurationError -from local_server.common.config.app_config import AppConfig -from local_server.test import test_server, FIXTURES_ROOT -from local_server.common.utils.type_conversion_utils import convert_string_to_value -from local_server.test.unit.common.config import ConfigTests +from backend.common.errors import ConfigurationError +from backend.server.common.config.app_config import AppConfig +from backend.test.test_server.unit import test_server +from backend.test import FIXTURES_ROOT +from backend.common.utils.type_conversion_utils import convert_string_to_value +from backend.test.test_server.unit.common.config import ConfigTests class TestExternalConfig(ConfigTests): @@ -88,7 +89,7 @@ class TestExternalConfig(ConfigTests): app_config.complete_config() self.assertEqual(config_error.exception.message, "required environment variable 'THIS_ENV_IS_NOT_SET' not set") - @patch("local_server.common.config.external_config.get_secret_key") + @patch("backend.server.common.config.external_config.get_secret_key") def test_aws_secrets_manager(self, mock_get_secret_key): mock_get_secret_key.return_value = { "flask_secret_key": "mock_flask_secret_key", @@ -114,7 +115,7 @@ class TestExternalConfig(ConfigTests): self.assertEqual(app_config.server_config.app__flask_secret_key, "mock_flask_secret_key") - @patch("local_server.common.config.external_config.get_secret_key") + @patch("backend.server.common.config.external_config.get_secret_key") def test_aws_secrets_manager_error(self, mock_get_secret_key): mock_get_secret_key.return_value = { "db_uri": "mock_db_uri", diff --git a/local_server/test/unit/common/config/test_server_config.py b/backend/test/test_server/unit/common/config/test_server_config.py similarity index 90% rename from local_server/test/unit/common/config/test_server_config.py rename to backend/test/test_server/unit/common/config/test_server_config.py index f50430a5..1a1527f7 100644 --- a/local_server/test/unit/common/config/test_server_config.py +++ b/backend/test/test_server/unit/common/config/test_server_config.py @@ -3,12 +3,12 @@ import unittest from unittest import mock from unittest.mock import patch -from local_server.common.config.base_config import BaseConfig -from local_server.test import H5AD_FIXTURE +from backend.server.common.config.base_config import BaseConfig +from backend.test import H5AD_FIXTURE -from local_server.common.config.app_config import AppConfig -from local_server.common.errors import ConfigurationError -from local_server.test.unit.common.config import ConfigTests +from backend.server.common.config.app_config import AppConfig +from backend.common.errors import ConfigurationError +from backend.test.test_server.unit.common.config import ConfigTests def mockenv(**envvars): @@ -45,7 +45,7 @@ class TestServerConfig(ConfigTests): with self.assertRaises(ConfigurationError): invalid_config.complete_config() - @patch("local_server.common.config.server_config.BaseConfig.validate_correct_type_of_configuration_attribute") + @patch("backend.server.common.config.server_config.BaseConfig.validate_correct_type_of_configuration_attribute") def test_complete_config_checks_all_attr(self, mock_check_attrs): mock_check_attrs.side_effect = BaseConfig.validate_correct_type_of_configuration_attribute() self.server_config.complete_config(self.context) @@ -56,7 +56,7 @@ class TestServerConfig(ConfigTests): with self.assertRaises(ConfigurationError): config.server_config.handle_app(self.context) - @patch("local_server.common.config.server_config.discover_s3_region_name") + @patch("backend.server.common.config.server_config.discover_s3_region_name") def test_handle_data_locator_works_for_default_types(self, mock_discover_region_name): mock_discover_region_name.return_value = None # Default config diff --git a/local_server/test/unit/common/test_api.py b/backend/test/test_server/unit/common/test_api.py similarity index 99% rename from local_server/test/unit/common/test_api.py rename to backend/test/test_server/unit/common/test_api.py index 95536b05..711a8bc1 100644 --- a/local_server/test/unit/common/test_api.py +++ b/backend/test/test_server/unit/common/test_api.py @@ -9,17 +9,16 @@ from os import path import pandas as pd import requests -import local_server.test.unit.decode_fbs as decode_fbs -from local_server.data_common.matrix_loader import MatrixDataType -from local_server.test import ( +import backend.test.decode_fbs as decode_fbs +from backend.server.data_common.matrix_loader import MatrixDataType +from backend.test.test_server.unit import ( data_with_tmp_annotations, make_fbs, - PROJECT_ROOT, - FIXTURES_ROOT, start_test_server, stop_test_server, ) -from local_server.test.fixtures.fixtures import pbmc3k_colors +from backend.test.fixtures.fixtures import pbmc3k_colors +from backend.test import PROJECT_ROOT, FIXTURES_ROOT BAD_FILTER = {"filter": {"obs": {"annotation_value": [{"name": "xyz"}]}}} diff --git a/server/test/unit/common/test_corpora.py b/backend/test/test_server/unit/common/test_corpora.py similarity index 97% rename from server/test/unit/common/test_corpora.py rename to backend/test/test_server/unit/common/test_corpora.py index ee6e587b..f4e7c253 100644 --- a/server/test/unit/common/test_corpora.py +++ b/backend/test/test_server/unit/common/test_corpora.py @@ -7,12 +7,13 @@ from http import HTTPStatus import anndata import requests -from server.common.corpora import ( +from backend.server.common.corpora import ( corpora_get_versions_from_anndata, corpora_is_version_supported, corpora_get_props_from_anndata, ) -from server.test import PROJECT_ROOT, start_test_server, stop_test_server +from backend.test.test_server.unit import start_test_server, stop_test_server +from backend.test import PROJECT_ROOT VERSION = "v0.2" diff --git a/server/test/unit/common/test_nan_rest.py b/backend/test/test_server/unit/common/test_nan_rest.py similarity index 89% rename from server/test/unit/common/test_nan_rest.py rename to backend/test/test_server/unit/common/test_nan_rest.py index 1dd28a54..9690cb66 100644 --- a/server/test/unit/common/test_nan_rest.py +++ b/backend/test/test_server/unit/common/test_nan_rest.py @@ -1,9 +1,9 @@ from http import HTTPStatus import unittest import math -from server.test import start_test_server, stop_test_server - -import server.test.unit.decode_fbs as decode_fbs +from backend.test.test_server.unit import start_test_server, stop_test_server +from backend.test import FIXTURES_ROOT +import backend.test.decode_fbs as decode_fbs import requests @@ -16,7 +16,7 @@ class WithNaNs(unittest.TestCase): @classmethod def setUpClass(cls): - cls.ps, cls.server = start_test_server(["test/fixtures/nan.h5ad"]) + cls.ps, cls.server = start_test_server([f"{FIXTURES_ROOT}/nan.h5ad"]) @classmethod def tearDownClass(cls): diff --git a/server/test/unit/common/test_rest.py b/backend/test/test_server/unit/common/test_rest.py similarity index 95% rename from server/test/unit/common/test_rest.py rename to backend/test/test_server/unit/common/test_rest.py index 91991a7b..809fde43 100644 --- a/server/test/unit/common/test_rest.py +++ b/backend/test/test_server/unit/common/test_rest.py @@ -1,8 +1,8 @@ import unittest from urllib.parse import parse_qs from werkzeug.datastructures import MultiDict -from server.common.rest import _query_parameter_to_filter -from server.common.errors import FilterError +from backend.common.errors import FilterError +from backend.server.common.rest import _query_parameter_to_filter def _qsparse(qs): diff --git a/local_server/test/unit/common/test_writable_annotation.py b/backend/test/test_server/unit/common/test_writable_annotation.py similarity index 96% rename from local_server/test/unit/common/test_writable_annotation.py rename to backend/test/test_server/unit/common/test_writable_annotation.py index 2d26e630..635a26c1 100644 --- a/local_server/test/unit/common/test_writable_annotation.py +++ b/backend/test/test_server/unit/common/test_writable_annotation.py @@ -6,10 +6,10 @@ from os import path, listdir import numpy as np import pandas as pd -import local_server.test.unit.decode_fbs as decode_fbs -from local_server.common.rest import schema_get_helper, annotations_put_fbs_helper -from local_server.data_common.matrix_loader import MatrixDataType -from local_server.test import data_with_tmp_annotations, make_fbs +import backend.test.decode_fbs as decode_fbs +from backend.server.common.rest import annotations_put_fbs_helper, schema_get_helper +from backend.server.data_common.matrix_loader import MatrixDataType +from backend.test.test_server.unit import data_with_tmp_annotations, make_fbs class WritableAnnotationTest(unittest.TestCase): diff --git a/server/test/unit/data_common/fbs/__init__.py b/backend/test/test_server/unit/common/utils/__init__.py similarity index 100% rename from server/test/unit/data_common/fbs/__init__.py rename to backend/test/test_server/unit/common/utils/__init__.py diff --git a/server/test/unit/common/utils/test_utils.py b/backend/test/test_server/unit/common/utils/test_utils.py similarity index 72% rename from server/test/unit/common/utils/test_utils.py rename to backend/test/test_server/unit/common/utils/test_utils.py index 7d5b6272..49077179 100644 --- a/server/test/unit/common/utils/test_utils.py +++ b/backend/test/test_server/unit/common/utils/test_utils.py @@ -2,14 +2,14 @@ import os import shutil import unittest -from server.common.utils.utils import import_plugins -from server.test import PROJECT_ROOT, random_string +from backend.common.utils.utils import import_plugins +from backend.test import PROJECT_ROOT, random_string class TestPlugins(unittest.TestCase): """ Test plugin import functionality """ - plugins_dir = f"{PROJECT_ROOT}/server/test/plugins" + plugins_dir = f"{PROJECT_ROOT}/backend/test/plugins" test_plugin_path = f"{plugins_dir}/foo.py" secret = random_string(8) @@ -27,8 +27,8 @@ class TestPlugins(unittest.TestCase): def test_import_plugins(self): self.assertTrue(os.path.isfile(self.test_plugin_path)) - loaded_modules = import_plugins("server.test.plugins") + loaded_modules = import_plugins("backend.test.plugins") # test that import plugins found the file - self.assertEqual(["server.test.plugins.foo"], [ele.__name__ for ele in loaded_modules]) + self.assertEqual(["backend.test.plugins.foo"], [ele.__name__ for ele in loaded_modules]) # test that the module was properly executed self.assertEqual(self.secret, loaded_modules[0].SECRET) diff --git a/server/test/unit/data_cxg/__init__.py b/backend/test/test_server/unit/compute/__init__.py similarity index 100% rename from server/test/unit/data_cxg/__init__.py rename to backend/test/test_server/unit/compute/__init__.py diff --git a/local_server/test/unit/compute/test_diffexp_cxg.py b/backend/test/test_server/unit/compute/test_diffexp_cxg.py similarity index 94% rename from local_server/test/unit/compute/test_diffexp_cxg.py rename to backend/test/test_server/unit/compute/test_diffexp_cxg.py index dd5020b4..0febada5 100644 --- a/local_server/test/unit/compute/test_diffexp_cxg.py +++ b/backend/test/test_server/unit/compute/test_diffexp_cxg.py @@ -2,8 +2,9 @@ import unittest import numpy as np -from local_server.data_common.matrix_loader import MatrixDataLoader -from local_server.test import PROJECT_ROOT, app_config +from backend.server.data_common.matrix_loader import MatrixDataLoader +from backend.test.test_server.unit import app_config +from backend.test import PROJECT_ROOT class DiffExpTest(unittest.TestCase): diff --git a/server/test/unit/eb/__init__.py b/backend/test/test_server/unit/converters/__init__.py similarity index 100% rename from server/test/unit/eb/__init__.py rename to backend/test/test_server/unit/converters/__init__.py diff --git a/backend/test/test_server/unit/converters/schema/__init__.py b/backend/test/test_server/unit/converters/schema/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/server/test/unit/converters/schema/test_gene_symbol.py b/backend/test/test_server/unit/converters/schema/test_gene_symbol.py similarity index 96% rename from server/test/unit/converters/schema/test_gene_symbol.py rename to backend/test/test_server/unit/converters/schema/test_gene_symbol.py index dceca312..7cd44f2b 100644 --- a/server/test/unit/converters/schema/test_gene_symbol.py +++ b/backend/test/test_server/unit/converters/schema/test_gene_symbol.py @@ -3,8 +3,8 @@ import unittest import pandas as pd -from server.test import FIXTURES_ROOT -from server.converters.schema import gene_symbol +from backend.test import FIXTURES_ROOT +from backend.server.converters.schema import gene_symbol class TestHGNCSymbolChecker(unittest.TestCase): diff --git a/local_server/test/unit/converters/schema/test_ontology.py b/backend/test/test_server/unit/converters/schema/test_ontology.py similarity index 98% rename from local_server/test/unit/converters/schema/test_ontology.py rename to backend/test/test_server/unit/converters/schema/test_ontology.py index 25aa7f1e..4a39b191 100644 --- a/local_server/test/unit/converters/schema/test_ontology.py +++ b/backend/test/test_server/unit/converters/schema/test_ontology.py @@ -1,9 +1,8 @@ import json -import unittest import unittest.mock -from local_server.converters.schema import ontology +from backend.server.converters.schema import ontology class TestOntologyParsing(unittest.TestCase): diff --git a/server/test/unit/converters/schema/test_remix.py b/backend/test/test_server/unit/converters/schema/test_remix.py similarity index 92% rename from server/test/unit/converters/schema/test_remix.py rename to backend/test/test_server/unit/converters/schema/test_remix.py index 3e99f879..046a92fd 100644 --- a/server/test/unit/converters/schema/test_remix.py +++ b/backend/test/test_server/unit/converters/schema/test_remix.py @@ -8,18 +8,17 @@ import numpy import pandas as pd import scanpy as sc -from server.converters.schema import remix - -PROJECT_ROOT = os.popen("git rev-parse --show-toplevel").read().strip() +from backend.server.converters.schema import remix +from backend.test import PROJECT_ROOT class TestApplySchema(unittest.TestCase): def setUp(self): - self.source_h5ad_path = f"{PROJECT_ROOT}/server/test/fixtures/pbmc3k-CSC-gz.h5ad" - self.output_h5ad_path = f"{PROJECT_ROOT}/server/test/fixtures/test_remix.h5ad" - self.config_path = f"{PROJECT_ROOT}/server/test/fixtures/test_config.yaml" - self.bad_config_path = f"{PROJECT_ROOT}/server/test/fixtures/test_bad_config.yaml" + self.source_h5ad_path = f"{PROJECT_ROOT}/backend/test/fixtures/pbmc3k-CSC-gz.h5ad" + self.output_h5ad_path = f"{PROJECT_ROOT}/backend/test/fixtures/test_remix.h5ad" + self.config_path = f"{PROJECT_ROOT}/backend/test/fixtures/test_config.yaml" + self.bad_config_path = f"{PROJECT_ROOT}/backend/test/fixtures/test_bad_config.yaml" def tearDown(self): try: @@ -27,7 +26,7 @@ class TestApplySchema(unittest.TestCase): except OSError: pass - @unittest.mock.patch("server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.server.converters.schema.ontology.get_ontology_label") def test_apply_schema(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "test label" remix.apply_schema(self.source_h5ad_path, self.config_path, self.output_h5ad_path) @@ -42,7 +41,7 @@ class TestApplySchema(unittest.TestCase): self.assertIn("version", new_adata.uns_keys()) - @unittest.mock.patch("server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.server.converters.schema.ontology.get_ontology_label") def test_apply_bad_schema(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "test label" remix.apply_schema(self.source_h5ad_path, self.bad_config_path, self.output_h5ad_path) @@ -77,7 +76,7 @@ class TestFieldParsing(unittest.TestCase): self.assertEqual(("UBERON:1234", ""), remix.split_suffix("UBERON:1234")) self.assertEqual(("UBERON:1234 (something)", ""), remix.split_suffix("UBERON:1234 (something)")) - @unittest.mock.patch("server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.server.converters.schema.ontology.get_ontology_label") def test_get_curie_and_label(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "test label" self.assertEqual( @@ -123,7 +122,7 @@ class TestManipulateAnndata(unittest.TestCase): json.dumps([{"name": "contributor1"}, {"name": "contributor2"}]) ) - @unittest.mock.patch("server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.server.converters.schema.ontology.get_ontology_label") def test_remix_uns(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "Pan troglodytes" uns_config = { @@ -154,7 +153,7 @@ class TestManipulateAnndata(unittest.TestCase): self.assertEqual(self.adata.uns['contributors'], json.dumps([{"name": "scientist", "email": "scientist@science.com"}])) - @unittest.mock.patch("server.converters.schema.ontology.get_ontology_label") + @unittest.mock.patch("backend.server.converters.schema.ontology.get_ontology_label") def test_remix_obs(self, mock_get_ontology_label): mock_get_ontology_label.return_value = "lung (in a monkey)" obs_config = { diff --git a/local_server/test/unit/converters/schema/test_validate.py b/backend/test/test_server/unit/converters/schema/test_validate.py similarity index 98% rename from local_server/test/unit/converters/schema/test_validate.py rename to backend/test/test_server/unit/converters/schema/test_validate.py index 269e629b..adf3142f 100644 --- a/local_server/test/unit/converters/schema/test_validate.py +++ b/backend/test/test_server/unit/converters/schema/test_validate.py @@ -1,13 +1,12 @@ import json -import os import unittest import pandas as pd import scanpy as sc -from local_server.converters.schema import validate +from backend.server.converters.schema import validate -PROJECT_ROOT = os.popen("git rev-parse --show-toplevel").read().strip() +from backend.test import PROJECT_ROOT class TestFieldValidation(unittest.TestCase): @@ -411,7 +410,7 @@ class TestGetSchema(unittest.TestCase): class TestValidate(unittest.TestCase): def setUp(self): - self.source_h5ad_path = f"{PROJECT_ROOT}/local_server/test/fixtures/pbmc3k-CSC-gz.h5ad" + self.source_h5ad_path = f"{PROJECT_ROOT}/backend/test/fixtures/pbmc3k-CSC-gz.h5ad" def test_shallow(self): diff --git a/backend/test/test_server/unit/data_anndata/__init__.py b/backend/test/test_server/unit/data_anndata/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/local_server/test/unit/data_anndata/test_anndata_adaptor.py b/backend/test/test_server/unit/data_anndata/test_anndata_adaptor.py similarity index 96% rename from local_server/test/unit/data_anndata/test_anndata_adaptor.py rename to backend/test/test_server/unit/data_anndata/test_anndata_adaptor.py index 7aeae152..c3e6f665 100644 --- a/local_server/test/unit/data_anndata/test_anndata_adaptor.py +++ b/backend/test/test_server/unit/data_anndata/test_anndata_adaptor.py @@ -8,12 +8,13 @@ import pandas as pd import pytest from parameterized import parameterized_class -import local_server.test.unit.decode_fbs as decode_fbs -from local_server.common.data_locator import DataLocator -from local_server.common.errors import FilterError -from local_server.data_anndata.anndata_adaptor import AnndataAdaptor -from local_server.test import PROJECT_ROOT, app_config, FIXTURES_ROOT -from local_server.test.fixtures.fixtures import pbmc3k_colors +import backend.test.decode_fbs as decode_fbs +from backend.common.utils.data_locator import DataLocator +from backend.common.errors import FilterError +from backend.server.data_anndata.anndata_adaptor import AnndataAdaptor +from backend.test import PROJECT_ROOT, FIXTURES_ROOT +from backend.test.test_server.unit import app_config +from backend.test.fixtures.fixtures import pbmc3k_colors """ Test the anndata adaptor using the pbmc3k data set. diff --git a/local_server/test/unit/data_anndata/test_anndata_adaptor_data_load.py b/backend/test/test_server/unit/data_anndata/test_anndata_adaptor_data_load.py similarity index 90% rename from local_server/test/unit/data_anndata/test_anndata_adaptor_data_load.py rename to backend/test/test_server/unit/data_anndata/test_anndata_adaptor_data_load.py index dfef08da..c480d8d5 100644 --- a/local_server/test/unit/data_anndata/test_anndata_adaptor_data_load.py +++ b/backend/test/test_server/unit/data_anndata/test_anndata_adaptor_data_load.py @@ -1,10 +1,10 @@ import unittest import json -from local_server.data_anndata.anndata_adaptor import AnndataAdaptor -from local_server.common.data_locator import DataLocator -from local_server.common.config.app_config import AppConfig -from local_server.test import PROJECT_ROOT +from backend.common.utils.data_locator import DataLocator +from backend.server.data_anndata.anndata_adaptor import AnndataAdaptor +from backend.server.common.config.app_config import AppConfig +from backend.test import PROJECT_ROOT class DataLoadAdaptorTest(unittest.TestCase): @@ -59,7 +59,7 @@ class DataLocatorAdaptorTest(unittest.TestCase): self.assertEqual(data.gene_count, 1838) def test_posix_file(self): - locator = DataLocator("../example-dataset/pbmc3k.h5ad") + locator = DataLocator("../../example-dataset/pbmc3k.h5ad") config = self.get_basic_config() config.update_server_config(single_dataset__datapath=locator.path) config.complete_config() diff --git a/local_server/test/unit/data_anndata/test_nan_anndata_adaptor.py b/backend/test/test_server/unit/data_anndata/test_nan_anndata_adaptor.py similarity index 89% rename from local_server/test/unit/data_anndata/test_nan_anndata_adaptor.py rename to backend/test/test_server/unit/data_anndata/test_nan_anndata_adaptor.py index 2ab1c559..591133b2 100644 --- a/local_server/test/unit/data_anndata/test_nan_anndata_adaptor.py +++ b/backend/test/test_server/unit/data_anndata/test_nan_anndata_adaptor.py @@ -4,11 +4,12 @@ import warnings import pytest -import local_server.test.unit.decode_fbs as decode_fbs -from local_server.common.data_locator import DataLocator -from local_server.common.errors import FilterError -from local_server.data_anndata.anndata_adaptor import AnndataAdaptor -from local_server.test import app_config, FIXTURES_ROOT +import backend.test.decode_fbs as decode_fbs +from backend.common.utils.data_locator import DataLocator +from backend.common.errors import FilterError +from backend.server.data_anndata.anndata_adaptor import AnndataAdaptor +from backend.test import FIXTURES_ROOT +from backend.test.test_server.unit import app_config class NaNTest(unittest.TestCase): diff --git a/client/Makefile b/client/Makefile index ad1ed798..33b02144 100644 --- a/client/Makefile +++ b/client/Makefile @@ -1,6 +1,6 @@ include ../common.mk -ANNOTATIONS := $(if $(ANNOTATIONS),$(ANNOTATIONS),../local_server/test/fixtures/pbmc3k-annotations.csv) +ANNOTATIONS := $(if $(ANNOTATIONS),$(ANNOTATIONS),../backend/test/fixtures/pbmc3k-annotations.csv) ANNOTATIONS_FILENAME := $(shell basename $(ANNOTATIONS)) CXG_CONFIG := $(if $(CXG_CONFIG), $(CXG_CONFIG), ./__tests__/e2e/test_config.yaml) diff --git a/common.mk b/common.mk index ee2e4b0b..e331c579 100644 --- a/common.mk +++ b/common.mk @@ -26,7 +26,7 @@ export JEST_ENV := $(call env_or_else_default,JEST_ENV) start-server: cellxgene launch -p $(CXG_SERVER_PORT) $(CXG_OPTIONS) $(DATASET) -# copy the client assests to a location known to the server +# copy the client assets to a location known to the server # $(1) is the source of the client assets # $(2) is the destination define copy_client_assets diff --git a/local_server/Makefile b/local_server/Makefile deleted file mode 100644 index 5f7acf13..00000000 --- a/local_server/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -include ../common.mk - -.PHONY: clean -clean: - rm -f common/web/templates/index.html - rm -rf common/web/static - rm -f common/web/csp-hashes.json - -.PHONY: unit-test -unit-test: - PYTHONWARNINGS=ignore:ResourceWarning coverage run \ - --source=app,cli,common,compute,converters,data_anndata,data_common \ - --omit=.coverage,data_common/fbs/NetEncoding,venv \ - -m unittest discover \ - --start-directory test/ \ - --top-level-directory ../ \ - --verbose; test_result=$$?; \ - exit $$test_result \ - -.PHONY: test-annotations-performance -test-annotations-performance: - python test/performance/performance_test_annotations_backend.py - -.PHONY: test-annotations-scale -test-annotations-scale: - locust -f test/performance/scale_test_annotations.py --headless -u 30 -r 10 --host https://api.cellxgene.dev.single-cell.czi.technology/cellxgene/e/ --run-time 5m 2>&1 | tee locust_dev_stats.txt diff --git a/local_server/auth/__init__.py b/local_server/auth/__init__.py deleted file mode 100644 index c0c238b4..00000000 --- a/local_server/auth/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# import the built in auth types so they can be registered - -import local_server.auth.auth_none # noqa: F401 -import local_server.auth.auth_test # noqa: F401 -import local_server.auth.auth_session # noqa: F401 diff --git a/local_server/common/aws_secret_utils.py b/local_server/common/aws_secret_utils.py deleted file mode 100644 index 4cfb1159..00000000 --- a/local_server/common/aws_secret_utils.py +++ /dev/null @@ -1,23 +0,0 @@ -import logging - -import boto3 -from flask import json - -from local_server.common.errors import SecretKeyRetrievalError - - -def get_secret_key(region_name, secret_name): - session = boto3.session.Session() - client = session.client(service_name="secretsmanager", region_name=region_name) - - try: - get_secret_value_response = client.get_secret_value(SecretId=secret_name) - if "SecretString" in get_secret_value_response: - var = get_secret_value_response["SecretString"] - secret = json.loads(var) - return secret - except Exception as e: - logging.critical(f"Caught exception during get_secret_key, {e}", exc_info=True) - raise SecretKeyRetrievalError(str(e)) - - return None diff --git a/local_server/common/colors.py b/local_server/common/colors.py deleted file mode 100644 index b1e8d0bb..00000000 --- a/local_server/common/colors.py +++ /dev/null @@ -1,233 +0,0 @@ -import re - -from local_server.common.errors import ColorFormatException - -HEX_COLOR_FORMAT = re.compile("^#[a-fA-F0-9]{6,6}$") - -# https://www.w3.org/TR/css-color-4/#named-colors -CSS4_NAMED_COLORS = dict( - aliceblue="#f0f8ff", - antiquewhite="#faebd7", - aqua="#00ffff", - aquamarine="#7fffd4", - azure="#f0ffff", - beige="#f5f5dc", - bisque="#ffe4c4", - black="#000000", - blanchedalmond="#ffebcd", - blue="#0000ff", - blueviolet="#8a2be2", - brown="#a52a2a", - burlywood="#deb887", - cadetblue="#5f9ea0", - chartreuse="#7fff00", - chocolate="#d2691e", - coral="#ff7f50", - cornflowerblue="#6495ed", - cornsilk="#fff8dc", - crimson="#dc143c", - cyan="#00ffff", - darkblue="#00008b", - darkcyan="#008b8b", - darkgoldenrod="#b8860b", - darkgray="#a9a9a9", - darkgreen="#006400", - darkgrey="#a9a9a9", - darkkhaki="#bdb76b", - darkmagenta="#8b008b", - darkolivegreen="#556b2f", - darkorange="#ff8c00", - darkorchid="#9932cc", - darkred="#8b0000", - darksalmon="#e9967a", - darkseagreen="#8fbc8f", - darkslateblue="#483d8b", - darkslategray="#2f4f4f", - darkslategrey="#2f4f4f", - darkturquoise="#00ced1", - darkviolet="#9400d3", - deeppink="#ff1493", - deepskyblue="#00bfff", - dimgray="#696969", - dimgrey="#696969", - dodgerblue="#1e90ff", - firebrick="#b22222", - floralwhite="#fffaf0", - forestgreen="#228b22", - fuchsia="#ff00ff", - gainsboro="#dcdcdc", - ghostwhite="#f8f8ff", - gold="#ffd700", - goldenrod="#daa520", - gray="#808080", - green="#008000", - greenyellow="#adff2f", - grey="#808080", - honeydew="#f0fff0", - hotpink="#ff69b4", - indianred="#cd5c5c", - indigo="#4b0082", - ivory="#fffff0", - khaki="#f0e68c", - lavender="#e6e6fa", - lavenderblush="#fff0f5", - lawngreen="#7cfc00", - lemonchiffon="#fffacd", - lightblue="#add8e6", - lightcoral="#f08080", - lightcyan="#e0ffff", - lightgoldenrodyellow="#fafad2", - lightgray="#d3d3d3", - lightgreen="#90ee90", - lightgrey="#d3d3d3", - lightpink="#ffb6c1", - lightsalmon="#ffa07a", - lightseagreen="#20b2aa", - lightskyblue="#87cefa", - lightslategray="#778899", - lightslategrey="#778899", - lightsteelblue="#b0c4de", - lightyellow="#ffffe0", - lime="#00ff00", - limegreen="#32cd32", - linen="#faf0e6", - magenta="#ff00ff", - maroon="#800000", - mediumaquamarine="#66cdaa", - mediumblue="#0000cd", - mediumorchid="#ba55d3", - mediumpurple="#9370db", - mediumseagreen="#3cb371", - mediumslateblue="#7b68ee", - mediumspringgreen="#00fa9a", - mediumturquoise="#48d1cc", - mediumvioletred="#c71585", - midnightblue="#191970", - mintcream="#f5fffa", - mistyrose="#ffe4e1", - moccasin="#ffe4b5", - navajowhite="#ffdead", - navy="#000080", - oldlace="#fdf5e6", - olive="#808000", - olivedrab="#6b8e23", - orange="#ffa500", - orangered="#ff4500", - orchid="#da70d6", - palegoldenrod="#eee8aa", - palegreen="#98fb98", - paleturquoise="#afeeee", - palevioletred="#db7093", - papayawhip="#ffefd5", - peachpuff="#ffdab9", - peru="#cd853f", - pink="#ffc0cb", - plum="#dda0dd", - powderblue="#b0e0e6", - purple="#800080", - rebeccapurple="#663399", - red="#ff0000", - rosybrown="#bc8f8f", - royalblue="#4169e1", - saddlebrown="#8b4513", - salmon="#fa8072", - sandybrown="#f4a460", - seagreen="#2e8b57", - seashell="#fff5ee", - sienna="#a0522d", - silver="#c0c0c0", - skyblue="#87ceeb", - slateblue="#6a5acd", - slategray="#708090", - slategrey="#708090", - snow="#fffafa", - springgreen="#00ff7f", - steelblue="#4682b4", - tan="#d2b48c", - teal="#008080", - thistle="#d8bfd8", - tomato="#ff6347", - turquoise="#40e0d0", - violet="#ee82ee", - wheat="#f5deb3", - white="#ffffff", - whitesmoke="#f5f5f5", - yellow="#ffff00", - yellowgreen="#9acd32", -) - - -def convert_color_to_hex_format(unknown): - """ - Try to convert color info to a hex triplet string https://en.wikipedia.org/wiki/Web_colors#Hex_triplet. - - The function accepts for the following formats: - - A CSS4 color name, as supported by matplotlib https://matplotlib.org/3.1.0/gallery/color/named_colors.html - - RGB tuple/list with values ranging from 0.0 to 1.0, as in [0.5, 0.75, 1.0] - - RFB tuple/list with values ranging from 0 to 255, as in [128, 192, 255] - - Hex triplet string, as in "#08c0ff" - - :param unknown: color info of unknown format - :return: a hex triplet representing that color - """ - try: - if type(unknown) in (list, tuple) and len(unknown) == 3: - if all(0.0 <= ele <= 1.0 for ele in unknown): - tup = tuple(int(ele * 255) for ele in unknown) - elif all(0 <= ele <= 255 and isinstance(ele, int) for ele in unknown): - tup = tuple(unknown) - else: - raise ColorFormatException("Unknown color iterable format!") - return "#%02x%02x%02x" % tup - elif isinstance(unknown, str) and unknown.lower() in CSS4_NAMED_COLORS: - return CSS4_NAMED_COLORS[unknown.lower()] - elif isinstance(unknown, str) and HEX_COLOR_FORMAT.match(unknown): - return unknown.lower() - else: - raise ColorFormatException("Unknown color format type!") - except Exception as e: - raise ColorFormatException(e) - - -def convert_anndata_category_colors_to_cxg_category_colors(data): - """ - Convert color information from anndata files to the cellxgene color data format as described below: - { - "": { - "": "", - ... - }, - ... - } - - For more on the cxg color data structure, see https://github.com/chanzuckerberg/cellxgene/issues/1307. - - For more on the anndata color data structure, see - https://github.com/chanzuckerberg/cellxgene/issues/1152#issuecomment-587276178. - - Handling of malformed data: - - For any color info in a adata.uns[f"{category}_colors"] color array that convert_color_to_hex_format cannot - convert to a hex triplet string, a ColorFormatException is raised - - No category_name key group is returned for adata.uns[f"{category}_colors"] keys for which there is no - adata.obs[f"{category}"] key - - :param data: the anndata file - :return: cellxgene color data structure as described above - """ - cxg_colors = dict() - color_key_suffix = "_colors" - for uns_key in data.uns.keys(): - # find uns array that describes colors for a category - if not uns_key.endswith(color_key_suffix): - continue - - # check to see if we actually have observations for that category - category_name = uns_key[: -len(color_key_suffix)] - if category_name not in data.obs.keys(): - continue - - # create the cellxgene color entry for this category - cxg_colors[category_name] = dict( - zip(data.obs[category_name].cat.categories, [convert_color_to_hex_format(c) for c in data.uns[uns_key]]) - ) - return cxg_colors diff --git a/local_server/common/config/__init__.py b/local_server/common/config/__init__.py deleted file mode 100644 index fa1a0dcc..00000000 --- a/local_server/common/config/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from local_server.common.aws_secret_utils import get_secret_key # noqa F504 - -DEFAULT_SERVER_PORT = 5005 -BIG_FILE_SIZE_THRESHOLD = 100 * 2 ** 20 # 100MB diff --git a/local_server/common/utils/utils.py b/local_server/common/utils/utils.py deleted file mode 100644 index 909999c8..00000000 --- a/local_server/common/utils/utils.py +++ /dev/null @@ -1,118 +0,0 @@ -import contextlib -import errno -import importlib.util -import logging -import os -import pkgutil -import socket -from urllib.parse import urlsplit, urljoin - -import numpy as np -from flask import json - -from local_server.common.errors import ConfigurationError - - -def find_available_port(host, port=5005): - """ - Helper method to find open port on host. Tries 5000 ports incremented from the specified port - """ - # Takes approx 2 seconds to do a scan of 5000 ports on my laptop - num_ports_to_try = 5000 - for port_to_try in range(port, port + num_ports_to_try): - if is_port_available(host, port_to_try): - return port_to_try - raise socket.error(errno.EADDRINUSE, f"No port in range {port} - {port + num_ports_to_try - 1} available.") - - -def is_port_available(host, port): - is_available = False - with contextlib.closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: - try: - s.bind((host, port)) - is_available = True - except socket.error: - pass - return is_available - - -def sort_options(command): - """ - Helper for the click options - will sort options in a command, and can - be used as a decorator. - """ - command.params.sort(key=lambda p: p.name) - return command - - -def path_join(base, *urls): - """ - this is like urllib.parse.urljoin, except it works around the scheme-specific - cleverness in the aforementioned code, ignores anything in the url except the path, - and accepts more than one url. - """ - if not base.endswith("/"): - base += "/" - btpl = urlsplit(base) - path = btpl.path - for url in urls: - utpl = urlsplit(url) - if btpl.scheme == "": - path = os.path.join(path, utpl.path) - path = os.path.normpath(path) - else: - path = urljoin(path, utpl.path) - return btpl._replace(path=path).geturl() - - -class Float32JSONEncoder(json.JSONEncoder): - def __init__(self, *args, **kwargs): - """ - NaN/Infinities are illegal in standard JSON. Python extends JSON with - non-standard symbols that most JavaScript JSON parsers do not understand. - The `allow_nan` parameter will force Python simplejson to throw an ValueError - if it runs into non-finite floating point values which are unsupported by - standard JSON. - """ - kwargs["allow_nan"] = False - super().__init__(*args, **kwargs) - - def default(self, obj): - if isinstance(obj, np.float32): - return float(obj) - elif isinstance(obj, np.integer): - return int(obj) - return json.JSONEncoder.default(self, obj) - - -def custom_format_warning(msg, *args, **kwargs): - return f"[cellxgene] Warning: {msg} \n" - - -def jsonify_numpy(data): - return json.dumps(data, cls=Float32JSONEncoder, allow_nan=False) - - -def import_plugins(plugin_module): - """ - Load optional plugin modules from local_server.common.plugins - - If you would like to customize cellxgene, you can add submodules to server.common.plugins before running the app. - This code will import each, loading the code in each. If no plugins are defined, initializing the app continues as - normal. - """ - loaded_modules = [] - try: - pkg = importlib.import_module(plugin_module) - for loader, name, is_pkg in pkgutil.walk_packages(pkg.__path__): - full_name = f"{plugin_module}.{name}" - try: - module = importlib.import_module(full_name) - except Exception as e: - raise ConfigurationError(f"Unexpected error while importing plugin: {plugin_module}.{name}: {str(e)}") - loaded_modules.append(module) - except ModuleNotFoundError as e: - # This exception occurs when the plugin_module does not exist (not an error). - logging.debug(f"No plugins found in module: {plugin_module}: {str(e)}") - - return loaded_modules diff --git a/local_server/data_common/fbs/matrix.py b/local_server/data_common/fbs/matrix.py deleted file mode 100644 index 14fa71ba..00000000 --- a/local_server/data_common/fbs/matrix.py +++ /dev/null @@ -1,248 +0,0 @@ -import json - -import numpy as np -import pandas as pd -from flatbuffers import Builder -from scipy import sparse - -import local_server.data_common.fbs.NetEncoding.Column as Column -import local_server.data_common.fbs.NetEncoding.Float32Array as Float32Array -import local_server.data_common.fbs.NetEncoding.Float64Array as Float64Array -import local_server.data_common.fbs.NetEncoding.Int32Array as Int32Array -import local_server.data_common.fbs.NetEncoding.JSONEncodedArray as JSONEncodedArray -import local_server.data_common.fbs.NetEncoding.Matrix as Matrix -import local_server.data_common.fbs.NetEncoding.TypedArray as TypedArray -import local_server.data_common.fbs.NetEncoding.Uint32Array as Uint32Array - - -# Serialization helper -def serialize_column(builder, typed_arr): - """ Serialize NetEncoding.Column """ - - (u_type, u_value) = typed_arr - Column.ColumnStart(builder) - Column.ColumnAddUType(builder, u_type) - Column.ColumnAddU(builder, u_value) - return Column.ColumnEnd(builder) - - -# Serialization helper -def serialize_matrix(builder, n_rows, n_cols, columns, col_idx): - """ Serialize NetEncoding.Matrix """ - - Matrix.MatrixStart(builder) - Matrix.MatrixAddNRows(builder, n_rows) - Matrix.MatrixAddNCols(builder, n_cols) - Matrix.MatrixAddColumns(builder, columns) - if col_idx is not None: - (u_type, u_val) = col_idx - Matrix.MatrixAddColIndexType(builder, u_type) - Matrix.MatrixAddColIndex(builder, u_val) - return Matrix.MatrixEnd(builder) - - -# Serialization helper -def serialize_typed_array(builder, source_array, encoding_info): - """ - Serialize any of the various typed arrays, eg, Float32Array. Specific means of serialization and type conversion - are provided by type_info. - """ - - arr = source_array - (array_type, as_type) = encoding_info(source_array) - - if isinstance(arr, pd.Index): - arr = arr.to_series() - - # convert to a simple ndarray - if as_type == "json": - as_json = arr.to_json(orient="records") - arr = np.array(bytearray(as_json, "utf-8")) - else: - if sparse.issparse(arr): - arr = arr.toarray() - elif isinstance(arr, pd.Series): - arr = arr.to_numpy() - if arr.dtype != as_type: - arr = arr.astype(as_type) - - # serialize the ndarray into a vector - if arr.ndim == 2: - if arr.shape[0] == 1: - arr = arr[0] - elif arr.shape[1] == 1: - arr = arr.T[0] - - vec = builder.CreateNumpyVector(arr) - - # serialize the typed array table - builder.StartObject(1) - builder.PrependUOffsetTRelativeSlot(0, vec, 0) - array_value = builder.EndObject() - return (array_type, array_value) - - -def column_encoding(arr): - column_encoding_type_map = { - # array protocol string: ( array_type, as_type ) - np.dtype(np.float64).str: (TypedArray.TypedArray.Float64Array, np.float64), - np.dtype(np.float32).str: (TypedArray.TypedArray.Float32Array, np.float32), - np.dtype(np.float16).str: (TypedArray.TypedArray.Float32Array, np.float32), - np.dtype(np.int8).str: (TypedArray.TypedArray.Int32Array, np.int32), - np.dtype(np.int16).str: (TypedArray.TypedArray.Int32Array, np.int32), - np.dtype(np.int32).str: (TypedArray.TypedArray.Int32Array, np.int32), - np.dtype(np.int64).str: (TypedArray.TypedArray.Int32Array, np.int32), - np.dtype(np.uint8).str: (TypedArray.TypedArray.Uint32Array, np.uint32), - np.dtype(np.uint16).str: (TypedArray.TypedArray.Uint32Array, np.uint32), - np.dtype(np.uint32).str: (TypedArray.TypedArray.Uint32Array, np.uint32), - np.dtype(np.uint64).str: (TypedArray.TypedArray.Uint32Array, np.uint32), - } - column_encoding_default = (TypedArray.TypedArray.JSONEncodedArray, "json") - - return column_encoding_type_map.get(arr.dtype.str, column_encoding_default) - - -def index_encoding(arr): - index_encoding_type_map = { - # array protocol string: ( array_type, as_type ) - np.dtype(np.int32).str: (TypedArray.TypedArray.Int32Array, np.int32), - np.dtype(np.int64).str: (TypedArray.TypedArray.Int32Array, np.int32), - np.dtype(np.uint32).str: (TypedArray.TypedArray.Uint32Array, np.uint32), - np.dtype(np.uint64).str: (TypedArray.TypedArray.Uint32Array, np.uint32), - } - index_encoding_default = (TypedArray.TypedArray.JSONEncodedArray, "json") - - return index_encoding_type_map.get(arr.dtype.str, index_encoding_default) - - -def guess_at_mem_needed(matrix): - (n_rows, n_cols) = matrix.shape - if isinstance(matrix, np.ndarray) or sparse.issparse(matrix): - guess = (n_rows * n_cols * matrix.dtype.itemsize) + 1024 - elif isinstance(matrix, pd.DataFrame): - # XXX TODO - DataFrame type estimate - guess = 1 - else: - guess = 1 - - # round up to nearest 1024 bytes - guess = (guess + 0x400) & (~0x3FF) - return guess - - -def encode_matrix_fbs(matrix, row_idx=None, col_idx=None): - """ - Given a 2D DataFrame, ndarray or sparse equivalent, create and return a Matrix flatbuffer. - - :param matrix: 2D DataFrame, ndarray or sparse equivalent - :param row_idx: index for row dimension, Index or ndarray - :param col_idx: index for col dimension, Index or ndarray - - NOTE: row indices are (currently) unsupported and must be None - """ - - if row_idx is not None: - raise ValueError("row indexing not supported for FBS Matrix") - if matrix.ndim != 2: - raise ValueError("FBS Matrix must be 2D") - - (n_rows, n_cols) = matrix.shape - - # estimate size needed, so we don't unnecessarily realloc. - builder = Builder(guess_at_mem_needed(matrix)) - - columns = [] - for cidx in range(n_cols - 1, -1, -1): - # serialize the typed array - col = matrix.iloc[:, cidx] if isinstance(matrix, pd.DataFrame) else matrix[:, cidx] - typed_arr = serialize_typed_array(builder, col, column_encoding) - - # serialize the Column union - columns.append(serialize_column(builder, typed_arr)) - - # Serialize Matrix.columns[] - Matrix.MatrixStartColumnsVector(builder, n_cols) - for c in columns: - builder.PrependUOffsetTRelative(c) - matrix_column_vec = builder.EndVector(n_cols) - - # serialize the colIndex if provided - cidx = None - if col_idx is not None: - cidx = serialize_typed_array(builder, col_idx, index_encoding) - - # Serialize Matrix - matrix = serialize_matrix(builder, n_rows, n_cols, matrix_column_vec, cidx) - - builder.Finish(matrix) - return builder.Output() - - -def deserialize_typed_array(tarr): - type_map = { - TypedArray.TypedArray.NONE: None, - TypedArray.TypedArray.Uint32Array: Uint32Array.Uint32Array, - TypedArray.TypedArray.Int32Array: Int32Array.Int32Array, - TypedArray.TypedArray.Float32Array: Float32Array.Float32Array, - TypedArray.TypedArray.Float64Array: Float64Array.Float64Array, - TypedArray.TypedArray.JSONEncodedArray: JSONEncodedArray.JSONEncodedArray, - } - (u_type, u) = tarr - if u_type is TypedArray.TypedArray.NONE: - return None - - TarType = type_map.get(u_type, None) - if TarType is None: - raise TypeError(f"FBS contains unknown data type: {u_type}") - - arr = TarType() - arr.Init(u.Bytes, u.Pos) - narr = arr.DataAsNumpy() - if u_type == TypedArray.TypedArray.JSONEncodedArray: - narr = json.loads(narr.tostring().decode("utf-8")) - return narr - - -def decode_matrix_fbs(fbs): - """ - Given an FBS-encoded Matrix, return a Pandas DataFrame the contains the data and indices. - """ - - matrix = Matrix.Matrix.GetRootAsMatrix(fbs, 0) - n_rows = matrix.NRows() - n_cols = matrix.NCols() - if n_rows == 0 or n_cols == 0: - return pd.DataFrame() - - if matrix.RowIndexType() is not TypedArray.TypedArray.NONE: - raise ValueError("row indexing not supported for FBS Matrix") - - columns_length = matrix.ColumnsLength() - - columns_index = deserialize_typed_array((matrix.ColIndexType(), matrix.ColIndex())) - if columns_index is None: - columns_index = range(0, n_cols) - - # sanity checks - if len(columns_index) != n_cols or columns_length != n_cols: - raise ValueError("FBS column count does not match number of columns in underlying matrix") - - columns_data = {} - columns_type = {} - for col_idx in range(0, columns_length): - col = matrix.Columns(col_idx) - tarr = (col.UType(), col.U()) - data = deserialize_typed_array(tarr) - columns_data[columns_index[col_idx]] = data - if len(data) != n_rows: - raise ValueError("FBS column length does not match number of rows") - if col.UType() is TypedArray.TypedArray.JSONEncodedArray: - columns_type[columns_index[col_idx]] = "category" - - df = pd.DataFrame.from_dict(data=columns_data).astype(columns_type, copy=False) - - # more sanity checks - if not df.columns.is_unique or len(df.columns) != n_cols: - raise KeyError("FBS column indices are not unique") - - return df diff --git a/local_server/test/fixtures/schema_test_data/generate_test_data.sh b/local_server/test/fixtures/schema_test_data/generate_test_data.sh deleted file mode 100755 index bb33d5a5..00000000 --- a/local_server/test/fixtures/schema_test_data/generate_test_data.sh +++ /dev/null @@ -1,139 +0,0 @@ -#!/bin/bash -wget "https://s3-us-west-2.amazonaws.com/10x.files/samples/cell/pbmc3k/pbmc3k_filtered_gene_bc_matrices.tar.gz" -tar xf "pbmc3k_filtered_gene_bc_matrices.tar.gz" - -python3 - < genes_tmp.tsv; mv genes_tmp.tsv merged/genes.tsv - -echo -e "\n\n\nRunning tutorial on original\n\n\n" -Rscript - < str: - return self.value - - -class Axis(AugmentedEnum): - OBS = "obs" - VAR = "var" - - -class DiffExpMode(AugmentedEnum): - TOP_N = "topN" - VAR_FILTER = "varFilter" - - -JSON_NaN_to_num_warning_msg = "JSON encoding failure - please verify all data are finite values (no NaN or Infinities)" -REACTIVE_LIMIT = 1_000_000 - -MAX_LAYOUTS = 30 diff --git a/server/common/data_locator.py b/server/common/data_locator.py deleted file mode 100644 index bf47d724..00000000 --- a/server/common/data_locator.py +++ /dev/null @@ -1,154 +0,0 @@ -import os -import tempfile -import fsspec -from datetime import datetime -import boto3 -import botocore -from urllib.parse import urlparse - - -class DataLocator: - """ - DataLocator is a simple wrapper around fsspec functionality, and provides a - set of functions to encapsulate a data location (URI or path), interogate - metadata about the object at that location (size, existance, etc) and - access the underlying data. - - https://filesystem-spec.readthedocs.io/en/latest/index.html - - Example: - dl = DataLocator("/tmp/foo.h5ad") - if dl.exists(): - print(dl.size()) - with dl.open() as f: - thecontents = f.read() - - DataLocator will accept a URI or native path. Error handling is as defined - in fsspec. - - """ - - def __init__(self, uri_or_path, region_name=None): - if isinstance(uri_or_path, DataLocator): - locator = uri_or_path - self.uri_or_path = locator.uri_or_path - self.protocol = locator.protocol - self.path = locator.path - self.cname = locator.cname - else: - self.uri_or_path = uri_or_path - self.protocol, self.path = DataLocator._get_protocol_and_path(uri_or_path) - # work-around for LocalFileSystem not treating file: and None as the same scheme/protocol - self.cname = self.path if self.protocol == "file" else self.uri_or_path - - # fsspec.filesystem will throw RuntimeError if the protocol is unsupported - if self.protocol == "s3": - if region_name: - config_kwargs = dict(region_name=region_name) - self.fs = fsspec.filesystem(self.protocol, listings_expiry_time=30, config_kwargs=config_kwargs) - else: - self.fs = fsspec.filesystem(self.protocol, listings_expiry_time=30) - else: - self.fs = fsspec.filesystem(self.protocol) - - def __repr__(self): - return f"DataLocator(protocol={self.protocol}, cname={self.cname}, " - f"path={self.path}, uri_or_path={self.uri_or_path})" - - @staticmethod - def _get_protocol_and_path(uri_or_path): - if "://" in uri_or_path: - protocol, path = uri_or_path.split("://", 1) - # windows!!! Ignore single letter drive identifiers, - # eg, G:\foo.txt - if len(protocol) > 1: - return protocol, path - return None, uri_or_path - - def exists(self): - return self.fs.exists(self.cname) - - def size(self): - return self.fs.size(self.cname) - - def lastmodtime(self): - """ return datetime object representing last modification time, or None if unavailable """ - info = self.fs.info(self.cname) - if self.islocal() and info is not None: - return datetime.fromtimestamp(info["mtime"]) - else: - return getattr(info, "LastModified", None) - - def abspath(self): - """ - return the absolute path for the locator - only really does something - for file: protocol, as all others are already absolute - """ - if self.islocal(): - return os.path.abspath(self.path) - else: - return self.uri_or_path - - def isfile(self): - return self.fs.isfile(self.cname) - - def open(self, *args): - return self.fs.open(self.uri_or_path, *args) - - def islocal(self): - return self.protocol is None or self.protocol == "file" - - def local_handle(self): - if self.islocal(): - return LocalFilePath(self.path) - - # if not local, create a tmp file system object to contain the data, - # and clean it up when done. If the path has a suffix/extension, - # do our best to create a file with the same. - ext = os.path.splitext(self.path) - suffix = None if ext[1] == "" else ext[1] - with self.open() as src, tempfile.NamedTemporaryFile(prefix="cellxgene_", suffix=suffix, delete=False) as tmp: - tmp.write(src.read()) - tmp.close() - src.close() - tmp_path = tmp.name - return LocalFilePath(tmp_path, delete=True) - - def ls(self): - paths = self.fs.ls(self.uri_or_path) - return [os.path.basename(p) for p in paths] - - -class LocalFilePath: - def __init__(self, tmp_path, delete=False): - self.tmp_path = tmp_path - self.delete = delete - - def __enter__(self): - return self.tmp_path - - def __exit__(self, *args): - if self.delete: - os.unlink(self.tmp_path) - - -def discover_s3_region_name(uri): - """If this is an s3 protocol, discover and return the (aws) region name. - If a return name could not be discovered, or if the uri is not an s3 protocol, return None.""" - - protocol, _ = DataLocator._get_protocol_and_path(uri) - if protocol == "s3": - bucket = urlparse(uri).netloc - client = boto3.client("s3") - try: - res = client.head_bucket(Bucket=bucket) - except botocore.exceptions.ClientError: - return None - - region = res.get("ResponseMetadata", {}).get("HTTPHeaders", {}).get("x-amz-bucket-region") - if region: - return region - else: - return None - - return None diff --git a/server/common/errors.py b/server/common/errors.py deleted file mode 100644 index ca339bee..00000000 --- a/server/common/errors.py +++ /dev/null @@ -1,57 +0,0 @@ -from http import HTTPStatus - - -class CellxgeneException(Exception): - """Base class for cellxgene exceptions""" - - def __init__(self, message): - self.message = message - super().__init__(message) - - -class RequestException(CellxgeneException): - """Baseclass for exceptions that can be raised from a request.""" - - # The default status code is 400 (Bad Request) - default_status_code = HTTPStatus.BAD_REQUEST - - def __init__(self, message, status_code=None): - super().__init__(message) - self.status_code = status_code or self.default_status_code - - -def define_exception(name, doc): - globals()[name] = type(name, (CellxgeneException,), dict(__doc__=doc)) - - -def define_request_exception(name, doc, default_status_code=HTTPStatus.BAD_REQUEST): - globals()[name] = type(name, (RequestException,), dict(__doc__=doc, default_status_code=default_status_code)) - - -define_request_exception("FilterError", "Raised when filter is malformed") -define_request_exception("JSONEncodingValueError", "Raised when data cannot be encoded into json") -define_request_exception("MimeTypeError", "Raised when incompatible MIME type selected") -define_request_exception("DatasetAccessError", "Raised when file loaded into a DataAdaptor is misformatted") -define_request_exception("DisabledFeatureError", "Raised when an attempt to use a disabled feature occurs") -define_request_exception("AnnotationsError", "Raised when an attempt to use the annotations feature fails") -define_request_exception( - "ComputeError", - "Raised when an error occurs during a compute algorithm (such as diffexp)", - HTTPStatus.INTERNAL_SERVER_ERROR, -) -define_request_exception("ExceedsLimitError", "Raised when an HTTP request exceeds a limit/quota") -define_request_exception("ColorFormatException", "Raised when color helper functions encounter an unknown color format") -define_request_exception( - "AuthenticationError", "Raised when there is an authentication error", default_status_code=HTTPStatus.UNAUTHORIZED -) - -define_request_exception( - "AnnotationCategoryNameError", - "Raised when an annotation category name cant be saved", - default_status_code=HTTPStatus.UNPROCESSABLE_ENTITY, -) - -define_exception("OntologyLoadFailure", "Raised when reading the ontology file fails") -define_exception("ConfigurationError", "Raised when checking configuration errors") -define_exception("PrepareError", "Raised when data is misprepared") -define_exception("SecretKeyRetrievalError", "Raised when get_secret_key from AWS fails") diff --git a/server/common/utils/type_conversion_utils.py b/server/common/utils/type_conversion_utils.py deleted file mode 100644 index 971bf641..00000000 --- a/server/common/utils/type_conversion_utils.py +++ /dev/null @@ -1,158 +0,0 @@ -import logging - -import numpy as np -import pandas as pd - - -def get_dtypes_and_schemas_of_dataframe(dataframe: pd.DataFrame): - dtypes_by_column_name = {} - schema_type_hints_by_column_name = {} - - for column_name, column_values in dataframe.items(): - ( - dtypes_by_column_name[column_name], - schema_type_hints_by_column_name[column_name], - ) = get_dtype_and_schema_of_array(column_values) - - return dtypes_by_column_name, schema_type_hints_by_column_name - - -def get_dtype_of_array(array: pd.Series): - return get_dtype_and_schema_of_array(array)[0] - - -def get_schema_type_hint_of_array(array: pd.Series): - return get_dtype_and_schema_of_array(array)[1] - - -def get_dtype_and_schema_of_array(array: pd.Series): - return ( - get_dtype_from_dtype(array.dtype, array_values=array), - get_schema_type_hint_from_dtype(array.dtype, array_values=array), - ) - - -def get_dtype_from_dtype(dtype, array_values=None): - """ - Given a data type, finds the equivalent data type that the array should be encoded as. Notably, this is relevant - for 64 bit values which will get downcast to 32 bit. - """ - - dtype_name = dtype.name - dtype_kind = dtype.kind - - if dtype_name == "bool": - return np.uint8 - if dtype_name == "object" and dtype_kind == "O": - return str - if dtype_name == "category": - return get_dtype_from_dtype(dtype.categories.dtype, array_values) - - if can_cast_to_int32(dtype, array_values): - return np.int32 - if can_cast_to_float32(dtype, array_values): - return np.float32 - if not can_cast_to_float32(dtype, array_values): - return np.float64 - - raise TypeError(f"Annotations of type {dtype} are unsupported.") - - -def get_schema_type_hint_from_dtype(dtype, array_values=None): - """ - Returns a dictionary that contains type hints about the data type given, especially if the data type is 64 bit - and will be downcast to 32 bit. - """ - - dtype_name = dtype.name - dtype_kind = dtype.kind - - if dtype == np.float32 or dtype == np.int32: - return {"type": dtype_name} - if dtype_name == "bool": - return {"type": "boolean"} - if dtype_name == "object" and dtype_kind == "O": - return {"type": "string"} - if dtype_name == "category": - return {"type": "categorical", "categories": dtype.categories.tolist()} - - if can_cast_to_int32(dtype, array_values): - return {"type": "int32"} - if can_cast_to_float32(dtype, array_values): - return {"type": "float32"} - if dtype_kind == "f" and not can_cast_to_float32(dtype, array_values): - return {"type": "float64"} - - raise TypeError(f"Annotations of type {dtype} are unsupported.") - - -def can_cast_to_float32(dtype, array_values): - """ - Optimistically returns True signifying that a type downcast to float32 is possible whenever the incoming type is - a float. - - We also handle a special case here where the array is a Series object with integer categorical values AND NaNs. - Since NaNs are floating points in numpy, we upcast the integer array to float32 and return True. - """ - - if dtype.kind == "f": - if not np.can_cast(dtype, np.float32): - logging.warning(f"Type {dtype.name} will be converted to 32 bit float and may lose precision.") - - return True - - if dtype.kind == "O" and array_values.hasnans: - return True - - return False - - -def can_cast_to_int32(dtype, array_values=None): - """ - A type can be cast to 32 bit, overriding the numpy `cast_cast` function if the values in the array that are of - the higher precision type has values that are entirely within the range of the downcast type. - """ - - # Since a NaN is technically a float, any array that contains NaNs cannot be cast to an integer so immediately - # return False. - if array_values.hasnans: - return False - - # If the array is categorical, then we need to order the array values so that functions min and max that occur - # later, can function. They do not function on unordered categories. - ordered_array_values = array_values - if array_values.dtype.name == "category" and not array_values.cat.ordered: - ordered_array_values = array_values.cat.as_ordered() - - if dtype.kind in ["i", "u"]: - if np.can_cast(dtype, np.int32): - return True - ii32 = np.iinfo(np.int32) - if ( - not ordered_array_values.empty - and (ordered_array_values.min() >= ii32.min and ordered_array_values.max() <= ii32.max) - or ordered_array_values.empty - ): - return True - return False - - -def convert_pandas_series_to_numpy(series_to_convert: pd.Series, dtype): - if series_to_convert.hasnans and dtype == np.int32: - logging.error("Cannot convert a pandas Series object to an integer dtype if it contains NaNs.") - - return series_to_convert.to_numpy(dtype) - - -def convert_string_to_value(value: str): - """convert a string to value with the most appropriate type""" - if value.lower() == "true": - return True - if value.lower() == "false": - return False - if value == "null": - return None - try: - return eval(value) - except: # noqa E722 - return value diff --git a/server/data_common/fbs/NetEncoding/Column.py b/server/data_common/fbs/NetEncoding/Column.py deleted file mode 100644 index 89b786d6..00000000 --- a/server/data_common/fbs/NetEncoding/Column.py +++ /dev/null @@ -1,41 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# namespace: NetEncoding - -import flatbuffers - -class Column(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsColumn(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = Column() - x.Init(buf, n + offset) - return x - - # Column - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # Column - def UType(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) - return 0 - - # Column - def U(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - from flatbuffers.table import Table - obj = Table(bytearray(), 0) - self._tab.Union(obj, o) - return obj - return None - -def ColumnStart(builder): builder.StartObject(2) -def ColumnAddUType(builder, uType): builder.PrependUint8Slot(0, uType, 0) -def ColumnAddU(builder, u): builder.PrependUOffsetTRelativeSlot(1, flatbuffers.number_types.UOffsetTFlags.py_type(u), 0) -def ColumnEnd(builder): return builder.EndObject() diff --git a/server/data_common/fbs/NetEncoding/Float32Array.py b/server/data_common/fbs/NetEncoding/Float32Array.py deleted file mode 100644 index 1acc426c..00000000 --- a/server/data_common/fbs/NetEncoding/Float32Array.py +++ /dev/null @@ -1,46 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# namespace: NetEncoding - -import flatbuffers - -class Float32Array(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsFloat32Array(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = Float32Array() - x.Init(buf, n + offset) - return x - - # Float32Array - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # Float32Array - def Data(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Float32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # Float32Array - def DataAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float32Flags, o) - return 0 - - # Float32Array - def DataLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def Float32ArrayStart(builder): builder.StartObject(1) -def Float32ArrayAddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0) -def Float32ArrayStartDataVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Float32ArrayEnd(builder): return builder.EndObject() diff --git a/server/data_common/fbs/NetEncoding/Float64Array.py b/server/data_common/fbs/NetEncoding/Float64Array.py deleted file mode 100644 index 2ec343a2..00000000 --- a/server/data_common/fbs/NetEncoding/Float64Array.py +++ /dev/null @@ -1,46 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# namespace: NetEncoding - -import flatbuffers - -class Float64Array(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsFloat64Array(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = Float64Array() - x.Init(buf, n + offset) - return x - - # Float64Array - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # Float64Array - def Data(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Float64Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 8)) - return 0 - - # Float64Array - def DataAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Float64Flags, o) - return 0 - - # Float64Array - def DataLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def Float64ArrayStart(builder): builder.StartObject(1) -def Float64ArrayAddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0) -def Float64ArrayStartDataVector(builder, numElems): return builder.StartVector(8, numElems, 8) -def Float64ArrayEnd(builder): return builder.EndObject() diff --git a/server/data_common/fbs/NetEncoding/Int32Array.py b/server/data_common/fbs/NetEncoding/Int32Array.py deleted file mode 100644 index f3f8156f..00000000 --- a/server/data_common/fbs/NetEncoding/Int32Array.py +++ /dev/null @@ -1,46 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# namespace: NetEncoding - -import flatbuffers - -class Int32Array(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsInt32Array(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = Int32Array() - x.Init(buf, n + offset) - return x - - # Int32Array - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # Int32Array - def Data(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Int32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # Int32Array - def DataAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Int32Flags, o) - return 0 - - # Int32Array - def DataLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def Int32ArrayStart(builder): builder.StartObject(1) -def Int32ArrayAddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0) -def Int32ArrayStartDataVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Int32ArrayEnd(builder): return builder.EndObject() diff --git a/server/data_common/fbs/NetEncoding/JSONEncodedArray.py b/server/data_common/fbs/NetEncoding/JSONEncodedArray.py deleted file mode 100644 index 366ebadd..00000000 --- a/server/data_common/fbs/NetEncoding/JSONEncodedArray.py +++ /dev/null @@ -1,46 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# namespace: NetEncoding - -import flatbuffers - -class JSONEncodedArray(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsJSONEncodedArray(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = JSONEncodedArray() - x.Init(buf, n + offset) - return x - - # JSONEncodedArray - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # JSONEncodedArray - def Data(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Uint8Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 1)) - return 0 - - # JSONEncodedArray - def DataAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint8Flags, o) - return 0 - - # JSONEncodedArray - def DataLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def JSONEncodedArrayStart(builder): builder.StartObject(1) -def JSONEncodedArrayAddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0) -def JSONEncodedArrayStartDataVector(builder, numElems): return builder.StartVector(1, numElems, 1) -def JSONEncodedArrayEnd(builder): return builder.EndObject() diff --git a/server/data_common/fbs/NetEncoding/Matrix.py b/server/data_common/fbs/NetEncoding/Matrix.py deleted file mode 100644 index 8c9d0eb8..00000000 --- a/server/data_common/fbs/NetEncoding/Matrix.py +++ /dev/null @@ -1,98 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# namespace: NetEncoding - -import flatbuffers - -class Matrix(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsMatrix(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = Matrix() - x.Init(buf, n + offset) - return x - - # Matrix - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # Matrix - def NRows(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) - return 0 - - # Matrix - def NCols(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(6)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint32Flags, o + self._tab.Pos) - return 0 - - # Matrix - def Columns(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - x = self._tab.Vector(o) - x += flatbuffers.number_types.UOffsetTFlags.py_type(j) * 4 - x = self._tab.Indirect(x) - from .Column import Column - obj = Column() - obj.Init(self._tab.Bytes, x) - return obj - return None - - # Matrix - def ColumnsLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(8)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - - # Matrix - def ColIndexType(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(10)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) - return 0 - - # Matrix - def ColIndex(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(12)) - if o != 0: - from flatbuffers.table import Table - obj = Table(bytearray(), 0) - self._tab.Union(obj, o) - return obj - return None - - # Matrix - def RowIndexType(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(14)) - if o != 0: - return self._tab.Get(flatbuffers.number_types.Uint8Flags, o + self._tab.Pos) - return 0 - - # Matrix - def RowIndex(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(16)) - if o != 0: - from flatbuffers.table import Table - obj = Table(bytearray(), 0) - self._tab.Union(obj, o) - return obj - return None - -def MatrixStart(builder): builder.StartObject(7) -def MatrixAddNRows(builder, nRows): builder.PrependUint32Slot(0, nRows, 0) -def MatrixAddNCols(builder, nCols): builder.PrependUint32Slot(1, nCols, 0) -def MatrixAddColumns(builder, columns): builder.PrependUOffsetTRelativeSlot(2, flatbuffers.number_types.UOffsetTFlags.py_type(columns), 0) -def MatrixStartColumnsVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def MatrixAddColIndexType(builder, colIndexType): builder.PrependUint8Slot(3, colIndexType, 0) -def MatrixAddColIndex(builder, colIndex): builder.PrependUOffsetTRelativeSlot(4, flatbuffers.number_types.UOffsetTFlags.py_type(colIndex), 0) -def MatrixAddRowIndexType(builder, rowIndexType): builder.PrependUint8Slot(5, rowIndexType, 0) -def MatrixAddRowIndex(builder, rowIndex): builder.PrependUOffsetTRelativeSlot(6, flatbuffers.number_types.UOffsetTFlags.py_type(rowIndex), 0) -def MatrixEnd(builder): return builder.EndObject() diff --git a/server/data_common/fbs/NetEncoding/TypedArray.py b/server/data_common/fbs/NetEncoding/TypedArray.py deleted file mode 100644 index e36c4f1b..00000000 --- a/server/data_common/fbs/NetEncoding/TypedArray.py +++ /dev/null @@ -1,12 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# namespace: NetEncoding - -class TypedArray(object): - NONE = 0 - Float32Array = 1 - Int32Array = 2 - Uint32Array = 3 - Float64Array = 4 - JSONEncodedArray = 5 - diff --git a/server/data_common/fbs/NetEncoding/Uint32Array.py b/server/data_common/fbs/NetEncoding/Uint32Array.py deleted file mode 100644 index 01c7dfdd..00000000 --- a/server/data_common/fbs/NetEncoding/Uint32Array.py +++ /dev/null @@ -1,46 +0,0 @@ -# automatically generated by the FlatBuffers compiler, do not modify - -# namespace: NetEncoding - -import flatbuffers - -class Uint32Array(object): - __slots__ = ['_tab'] - - @classmethod - def GetRootAsUint32Array(cls, buf, offset): - n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) - x = Uint32Array() - x.Init(buf, n + offset) - return x - - # Uint32Array - def Init(self, buf, pos): - self._tab = flatbuffers.table.Table(buf, pos) - - # Uint32Array - def Data(self, j): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - a = self._tab.Vector(o) - return self._tab.Get(flatbuffers.number_types.Uint32Flags, a + flatbuffers.number_types.UOffsetTFlags.py_type(j * 4)) - return 0 - - # Uint32Array - def DataAsNumpy(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.GetVectorAsNumpy(flatbuffers.number_types.Uint32Flags, o) - return 0 - - # Uint32Array - def DataLength(self): - o = flatbuffers.number_types.UOffsetTFlags.py_type(self._tab.Offset(4)) - if o != 0: - return self._tab.VectorLen(o) - return 0 - -def Uint32ArrayStart(builder): builder.StartObject(1) -def Uint32ArrayAddData(builder, data): builder.PrependUOffsetTRelativeSlot(0, flatbuffers.number_types.UOffsetTFlags.py_type(data), 0) -def Uint32ArrayStartDataVector(builder, numElems): return builder.StartVector(4, numElems, 4) -def Uint32ArrayEnd(builder): return builder.EndObject() diff --git a/server/test/fixtures/1e4dfec4-c0b2-46ad-a04e-ff3ffb3c0a8f.h5ad b/server/test/fixtures/1e4dfec4-c0b2-46ad-a04e-ff3ffb3c0a8f.h5ad deleted file mode 100644 index eee29036..00000000 Binary files a/server/test/fixtures/1e4dfec4-c0b2-46ad-a04e-ff3ffb3c0a8f.h5ad and /dev/null differ diff --git a/server/test/fixtures/a95c59b4-7f5d-4b80-ad53-a694834ca18b.h5ad b/server/test/fixtures/a95c59b4-7f5d-4b80-ad53-a694834ca18b.h5ad deleted file mode 100644 index 9d7ffcc6..00000000 Binary files a/server/test/fixtures/a95c59b4-7f5d-4b80-ad53-a694834ca18b.h5ad and /dev/null differ diff --git a/server/test/fixtures/fixtures.py b/server/test/fixtures/fixtures.py deleted file mode 100644 index e1a1368d..00000000 --- a/server/test/fixtures/fixtures.py +++ /dev/null @@ -1,12 +0,0 @@ -pbmc3k_colors = { - "louvain": { - "B cells": "#2ca02c", - "CD14+ Monocytes": "#ff7f0e", - "CD4 T cells": "#1f77b4", - "CD8 T cells": "#d62728", - "Dendritic cells": "#e377c2", - "FCGR3A+ Monocytes": "#8c564b", - "Megakaryocytes": "#bcbd22", - "NK cells": "#9467bd", - } -} diff --git a/server/test/fixtures/hgnc_example.txt.gz b/server/test/fixtures/hgnc_example.txt.gz deleted file mode 100644 index 4c7704c4..00000000 Binary files a/server/test/fixtures/hgnc_example.txt.gz and /dev/null differ diff --git a/server/test/fixtures/nan.h5ad b/server/test/fixtures/nan.h5ad deleted file mode 100644 index d97078b0..00000000 Binary files a/server/test/fixtures/nan.h5ad and /dev/null differ diff --git a/server/test/fixtures/pbmc3k-CSC-gz.h5ad b/server/test/fixtures/pbmc3k-CSC-gz.h5ad deleted file mode 100644 index 2c2909c5..00000000 Binary files a/server/test/fixtures/pbmc3k-CSC-gz.h5ad and /dev/null differ diff --git a/server/test/fixtures/pbmc3k-CSR-gz.h5ad b/server/test/fixtures/pbmc3k-CSR-gz.h5ad deleted file mode 100644 index 3053f0a9..00000000 Binary files a/server/test/fixtures/pbmc3k-CSR-gz.h5ad and /dev/null differ diff --git a/server/test/fixtures/pbmc3k-annotations.csv b/server/test/fixtures/pbmc3k-annotations.csv deleted file mode 100644 index 8031f7cd..00000000 --- a/server/test/fixtures/pbmc3k-annotations.csv +++ /dev/null @@ -1,2641 +0,0 @@ -# Annotations generated on 2020-02-24T23:19:31 using cellxgene version 0.14.0 -# Input data file was example-dataset/pbmc3k.h5ad, which was last modified on 2019-12-17T17:13:17 -index,cluster-test -AAACATACAACCAC-1,four -AAACATTGAGCTAC-1,three -AAACATTGATCAGC-1,four -AAACCGTGCTTCCG-1,two -AAACCGTGTATGCG-1,five -AAACGCACTGGTAC-1,four -AAACGCTGACCAGT-1,unassigned -AAACGCTGGTTCTT-1,four -AAACGCTGTAGCCA-1,five -AAACGCTGTTTCTG-1,one -AAACTTGAAAAACG-1,three -AAACTTGATCCAGA-1,four -AAAGAGACGAGATA-1,four -AAAGAGACGCGAGA-1,two -AAAGAGACGGACTT-1,five -AAAGAGACGGCATT-1,four -AAAGCAGATATCGG-1,two -AAAGCCTGTATGCG-1,four -AAAGGCCTGTCTAG-1,three -AAAGTTTGATCACG-1,three -AAAGTTTGGGGTGA-1,three -AAAGTTTGTAGAGA-1,four -AAAGTTTGTAGCGT-1,two -AAATCAACAATGCC-1,three -AAATCAACACCAGT-1,four -AAATCAACCAGGAG-1,four -AAATCAACCCTATT-1,seven -AAATCAACGGAAGC-1,four -AAATCAACTCGCAA-1,four -AAATCATGACCACA-1,one -AAATCCCTCCACAA-1,four -AAATCCCTGCTATG-1,three -AAATGTTGAACGAA-1,two -AAATGTTGCCACAA-1,four -AAATGTTGTGGCAT-1,two -AAATTCGAAGGTTC-1,four -AAATTCGAATCACG-1,two -AAATTCGAGCTGAT-1,one -AAATTCGAGGAGTG-1,four -AAATTCGATTCTCA-1,five -AAATTGACACGACT-1,five -AAATTGACTCGCTC-1,unassigned -AACAAACTCATTTC-1,four -AACAAACTTTCGTT-1,four -AACAATACGACGAG-1,four -AACACGTGCAGAGG-1,four -AACACGTGGAAAGT-1,four -AACACGTGGAACCT-1,two -AACACGTGGCTACA-1,four -AACACGTGTACGAC-1,one -AACAGCACAAGAGT-1,two -AACATTGATGGGAG-1,one -AACCAGTGATACCG-1,one -AACCCAGATCGCTC-1,four -AACCGATGCTCCCA-1,four -AACCGATGGTCATG-1,three -AACCGATGTTCTAC-1,two -AACCGCCTAGCGTT-1,four -AACCGCCTCTACGA-1,two -AACCTACTGTGAGG-1,two -AACCTACTGTGTTG-1,four -AACCTTACGAGACG-1,four -AACCTTACGCGAGA-1,five -AACCTTACTAACGC-1,one -AACCTTTGGACGGA-1,four -AACCTTTGTACGCA-1,one -AACGCAACAAGTAG-1,four -AACGCATGACCCAA-1,four -AACGCATGCCTTCG-1,four -AACGCATGTACTTC-1,four -AACGCCCTCGGGAA-1,four -AACGCCCTCGTACA-1,five -AACGCCCTGGCATT-1,four -AACGTCGAGTATCG-1,five -AACGTGTGAAAGCA-1,four -AACGTGTGGCGGAA-1,three -AACGTGTGTCCAAG-1,four -AACGTGTGTGCTTT-1,four -AACTACCTTAGAGA-1,four -AACTCACTCAAGCT-1,two -AACTCACTTGGAGG-1,two -AACTCGGAAAGTGA-1,five -AACTCGGAAGGTCT-1,two -AACTCTTGCAGGAG-1,four -AACTGTCTCCCTTG-1,two -AACTTGCTACGCTA-1,three -AACTTGCTGGGACA-1,four -AAGAACGAGTGTTG-1,four -AAGAAGACGTAGGG-1,three -AAGACAGAAGTCTG-1,three -AAGACAGAGGATCT-1,four -AAGACAGATTACCT-1,two -AAGAGATGGGTAGG-1,three -AAGATGGAAAACAG-1,three -AAGATGGAGAACTC-1,two -AAGATGGAGATAAG-1,two -AAGATTACAACCTG-1,four -AAGATTACAGATCC-1,two -AAGATTACCCGTTC-1,two -AAGATTACCGCCTT-1,unassigned -AAGATTACCTCAAG-1,five -AAGATTACTCCTCG-1,two -AAGCAAGAGCGAGA-1,four -AAGCAAGAGCTTAG-1,five -AAGCAAGAGGTGTT-1,five -AAGCACTGAGCAAA-1,three -AAGCACTGCATACG-1,five -AAGCACTGGTTCTT-1,three -AAGCCAACGTGTTG-1,four -AAGCCATGAACTGC-1,unassigned -AAGCCATGACACGT-1,two -AAGCCATGCGTGAT-1,four -AAGCCATGTCTCGC-1,four -AAGCCTGACATGCA-1,four -AAGCCTGACCGAAT-1,two -AAGCGACTCCTCAC-1,one -AAGCGACTGTGTCA-1,four -AAGCGACTTACAGC-1,three -AAGCGACTTTGACG-1,one -AAGCGTACGTCTTT-1,four -AAGGCTTGCGAACT-1,five -AAGGTCACGGTTAC-1,two -AAGGTCACTGTTTC-1,three -AAGGTCACTTCCCG-1,five -AAGGTCTGACAGTC-1,four -AAGGTCTGCAGATC-1,four -AAGTAACTCTGAAC-1,two -AAGTAACTGAGATA-1,three -AAGTAGGATACAGC-1,five -AAGTATACCGAACT-1,four -AAGTCCGACTTGTT-1,four -AAGTCCGATAGAAG-1,four -AAGTCTCTAGTCGT-1,four -AAGTCTCTCGGAGA-1,five -AAGTGGCTTGGAGG-1,three -AAGTTCCTCATTCT-1,unassigned -AAGTTCCTTCTTAC-1,four -AATAAGCTCGAATC-1,four -AATAAGCTCGTTGA-1,four -AATACCCTGGACGA-1,three -AATACCCTGGCATT-1,four -AATACTGAAAGGGC-1,five -AATACTGAATTGGC-1,five -AATAGGGAACCCTC-1,three -AATAGGGAGAATGA-1,five -AATCAAACTATCGG-1,five -AATCCGGAATGCTG-1,three -AATCCTACCGGTAT-1,four -AATCCTTGACGGGA-1,two -AATCCTTGGTGAGG-1,five -AATCGGTGGAACTC-1,five -AATCGGTGTGCTTT-1,four -AATCTAGAAAAGTG-1,four -AATCTAGAATCGGT-1,four -AATCTCACAGCCTA-1,two -AATCTCACTCTAGG-1,four -AATCTCTGAACAGA-1,four -AATCTCTGCTTTAC-1,five -AATGATACACCAAC-1,five -AATGATACGGTCAT-1,two -AATGCGTGACACCA-1,three -AATGCGTGGACGGA-1,unassigned -AATGCGTGGCTATG-1,three -AATGGAGAATCGTG-1,two -AATGGAGATCCTTA-1,five -AATGGCTGACACCA-1,three -AATGGCTGCGTGAT-1,four -AATGGCTGTAAAGG-1,five -AATGGCTGTACTCT-1,five -AATGGCTGTGAAGA-1,four -AATGTAACGGTGGA-1,four -AATGTCCTCTTCTA-1,four -AATGTTGACAGTCA-1,four -AATGTTGAGTTGAC-1,two -AATGTTGATCTACT-1,four -AATTACGAATTCCT-1,unassigned -AATTACGACTTCTA-1,four -AATTACGAGTGAGG-1,unassigned -AATTACGATTGGCA-1,three -AATTCCTGCTCAGA-1,three -AATTGATGTCGCAA-1,one -AATTGTGACTTGGA-1,three -ACAAAGGAGGGTGA-1,four -ACAAATTGATTCTC-1,one -ACAAATTGCTCAGA-1,two -ACAAATTGTTGCGA-1,five -ACAACCGAGGGATG-1,five -ACAACCGAGTTACG-1,four -ACAAGAGAAGTCGT-1,two -ACAAGAGACTTATC-1,four -ACAAGAGAGTTGAC-1,three -ACAATCCTAACCGT-1,four -ACAATCCTTAGCGT-1,three -ACAATTGACTGACA-1,five -ACAATTGATGACTG-1,five -ACACAGACCATACG-1,five -ACACCAGAGGGCAA-1,five -ACACCCTGGTGTTG-1,five -ACACGAACAGTTCG-1,four -ACACGATGACGCAT-1,five -ACACGATGATGTGC-1,unassigned -ACACGATGTCGTAG-1,five -ACACGATGTGGTCA-1,five -ACAGACACGGCATT-1,four -ACAGACACGTTGTG-1,four -ACAGCAACACCTAG-1,two -ACAGCAACCTCAAG-1,one -ACAGGTACCCCACT-1,four -ACAGGTACGCTGTA-1,five -ACAGGTACTGGTGT-1,five -ACAGTCGACCCAAA-1,four -ACAGTCGACCGATA-1,five -ACAGTGACTCACCC-1,five -ACAGTGACTCTATC-1,five -ACAGTGTGGTCACA-1,four -ACAGTGTGTTGCGA-1,two -ACATCACTCTACTT-1,two -ACATGGTGAAGCCT-1,four -ACATGGTGCAACCA-1,three -ACATGGTGCGAGTT-1,four -ACATTCTGGCATAC-1,four -ACATTCTGGGAACG-1,two -ACCAACGACATGCA-1,four -ACCACAGAAAGTAG-1,four -ACCACAGAGTTGGT-1,four -ACCACCTGTGTGCA-1,four -ACCACGCTACAGCT-1,four -ACCACGCTACCCAA-1,five -ACCACGCTGCGAGA-1,four -ACCACGCTGCTGTA-1,four -ACCAGCCTGACAGG-1,four -ACCAGTGAACGGTT-1,three -ACCAGTGAATACCG-1,one -ACCAGTGAGGGATG-1,four -ACCAGTGATGACTG-1,two -ACCATTACCTTCTA-1,four -ACCATTACGAGATA-1,four -ACCATTTGTCATTC-1,four -ACCCAAGAACTGTG-1,five -ACCCAAGAATTCCT-1,one -ACCCAAGAGGACAG-1,four -ACCCAAGATTCACT-1,three -ACCCACTGCGCCTT-1,two -ACCCACTGGACAGG-1,four -ACCCACTGGTTCAG-1,six -ACCCACTGTCGTAG-1,two -ACCCAGCTCAGAAA-1,four -ACCCAGCTGTTAGC-1,two -ACCCAGCTTGCTTT-1,four -ACCCGTTGATGACC-1,three -ACCCGTTGCTGCAA-1,four -ACCCGTTGCTTCTA-1,unassigned -ACCCTCGACCTATT-1,four -ACCCTCGACGGTAT-1,three -ACCCTCGATAAGGA-1,two -ACCCTCGATCAAGC-1,unassigned -ACCGTGCTACCAGT-1,four -ACCGTGCTGGAACG-1,three -ACCTATTGCTGAGT-1,three -ACCTATTGTGCCCT-1,one -ACCTCCGAGTCCTC-1,four -ACCTCCGATATGCG-1,four -ACCTCCGATGCTGA-1,four -ACCTCGTGAACCAC-1,unassigned -ACCTGAGATATCGG-1,one -ACCTGGCTAAGTAG-1,five -ACCTTTGACTCCCA-1,two -ACCTTTGAGGAACG-1,two -ACCTTTGAGGAAGC-1,one -ACGAACACCTTGTT-1,five -ACGAACTGGCTATG-1,six -ACGAAGCTCTCCAC-1,four -ACGAAGCTCTGAGT-1,three -ACGACCCTATCTCT-1,one -ACGACCCTGATGAA-1,four -ACGACCCTTGACAC-1,three -ACGACCCTTGACCA-1,four -ACGAGGGACAGGAG-1,unassigned -ACGAGGGACGAACT-1,four -ACGAGGGATGTAGC-1,four -ACGAGTACCCTAAG-1,three -ACGAGTACGAATCC-1,three -ACGATCGAGGACTT-1,five -ACGATCGAGTCACA-1,two -ACGATGACAATGCC-1,four -ACGATGACTGGTCA-1,four -ACGATTCTACGGGA-1,four -ACGCAATGGTTCAG-1,five -ACGCACCTGTTAGC-1,three -ACGCCACTGAACTC-1,two -ACGCCGGAAACCAC-1,two -ACGCCGGAAAGCCT-1,four -ACGCCGGAAATGCC-1,four -ACGCCTTGCTCCCA-1,one -ACGCGGTGGCGAGA-1,four -ACGCGGTGTGTGGT-1,three -ACGCGGTGTTTGCT-1,five -ACGCTCACAGTACC-1,four -ACGCTCACCCTTGC-1,four -ACGCTGCTGTTCTT-1,five -ACGGAACTCAGATC-1,five -ACGGAACTGTCGTA-1,one -ACGGAGGACTCTTA-1,two -ACGGATTGGGAGGT-1,three -ACGGATTGGTTAGC-1,four -ACGGCTCTGAGCAG-1,four -ACGGCTCTTGCACA-1,four -ACGGTAACCGCTAA-1,four -ACGGTAACCTTCGC-1,five -ACGGTAACGGTGGA-1,four -ACGGTAACTCGCAA-1,five -ACGGTATGAGTCGT-1,two -ACGGTATGGGTATC-1,three -ACGGTATGGTTGTG-1,three -ACGGTCCTAACGGG-1,four -ACGGTCCTCGGGAA-1,four -ACGTAGACAACCAC-1,four -ACGTAGACTACAGC-1,three -ACGTCAGAAACGAA-1,four -ACGTCAGAGAGCTT-1,two -ACGTCAGAGGGATG-1,four -ACGTCCTGATAAGG-1,two -ACGTCCTGTGAACC-1,unassigned -ACGTCGCTCCTGAA-1,five -ACGTCGCTCTATTC-1,unassigned -ACGTCGCTTCTCAT-1,three -ACGTGATGCCATGA-1,unassigned -ACGTGATGGGTCTA-1,four -ACGTGATGTAACCG-1,one -ACGTGATGTGACAC-1,five -ACGTGCCTCCGTAA-1,four -ACGTGCCTTCTATC-1,five -ACGTTACTTTCCAT-1,four -ACGTTGGAAAAGCA-1,four -ACGTTGGAAACCTG-1,five -ACGTTGGACCGTAA-1,two -ACGTTGGAGCCAAT-1,five -ACGTTGGATATGGC-1,three -ACGTTGGATCAGGT-1,two -ACGTTTACATCAGC-1,four -ACTAAAACCCACAA-1,five -ACTAAAACTCGACA-1,two -ACTACGGAATTTCC-1,four -ACTACGGACCTATT-1,four -ACTACGGATCGCTC-1,four -ACTACTACTAAGGA-1,four -ACTAGGTGGAACCT-1,five -ACTAGGTGGAACTC-1,four -ACTATCACCTTGGA-1,five -ACTATCACTGCCAA-1,four -ACTCAGGACTGAAC-1,four -ACTCAGGATCTATC-1,three -ACTCAGGATTCGTT-1,two -ACTCCTCTCAACTG-1,four -ACTCGCACGAAAGT-1,two -ACTCGCACTACGAC-1,two -ACTCTCCTGACACT-1,four -ACTCTCCTGCATAC-1,four -ACTCTCCTGTTTGG-1,four -ACTGAGACAACCAC-1,five -ACTGAGACCCATAG-1,one -ACTGAGACGTTGGT-1,three -ACTGCCACACACGT-1,five -ACTGCCACTCCGTC-1,five -ACTGGCCTTCAGTG-1,five -ACTGTGGACGTGTA-1,five -ACTGTGGATCTAGG-1,three -ACTGTTACCCACAA-1,two -ACTGTTACTGCAGT-1,four -ACTTAAGAACCACA-1,four -ACTTAAGATTACTC-1,unassigned -ACTTAGCTGCGTAT-1,one -ACTTAGCTGGGAGT-1,four -ACTTCAACAAGCAA-1,unassigned -ACTTCAACGTAGGG-1,five -ACTTCCCTTTCCGC-1,four -ACTTCTGACATGCA-1,three -ACTTGACTCCACAA-1,three -ACTTGGGAGAAAGT-1,two -ACTTGGGAGGTTTG-1,four -ACTTGGGATGTGAC-1,one -ACTTGGGATTGACG-1,two -ACTTGTACCTGTCC-1,four -ACTTTGTGGAAAGT-1,four -ACTTTGTGGATAGA-1,two -AGAAACGAAAGTAG-1,three -AGAAAGTGCGCAAT-1,four -AGAAAGTGGGGATG-1,two -AGAACAGAAATGCC-1,five -AGAACAGACGACTA-1,three -AGAACAGAGACAAA-1,four -AGAACGCTTTGCTT-1,four -AGAAGATGTGACTG-1,four -AGAATGGAAGAAGT-1,five -AGAATTTGTAACCG-1,four -AGAATTTGTAGAGA-1,four -AGACACACTGTAGC-1,four -AGACACTGTCAAGC-1,two -AGACCTGAAGTAGA-1,two -AGACCTGACCAACA-1,four -AGACCTGAGGAAGC-1,five -AGACGTACAGAGGC-1,four -AGACGTACCCCTAC-1,three -AGACGTACCTCTTA-1,unassigned -AGACGTACTCGTGA-1,one -AGACTGACCATCAG-1,five -AGACTGACCCTTTA-1,four -AGACTTCTCATGCA-1,three -AGAGATGACAGTCA-1,three -AGAGATGACTGAAC-1,four -AGAGATGAGGTTTG-1,two -AGAGATGATCTCGC-1,three -AGAGATGATTGTGG-1,four -AGAGCGGAGGCAAG-1,two -AGAGTCTGGTCGTA-1,one -AGAGTGCTCAGCTA-1,four -AGAGTGCTCGAATC-1,four -AGAGTGCTGTCATG-1,four -AGAGTGCTGTCCTC-1,five -AGAGTGCTGTGTTG-1,three -AGATATACCCGTAA-1,five -AGATATACGATGAA-1,four -AGATATACTGTTCT-1,three -AGATATTGCCTACC-1,five -AGATATTGGCCAAT-1,two -AGATCGTGTCTGGA-1,two -AGATCGTGTTTGTC-1,three -AGATCTCTATCACG-1,three -AGATTAACGTTCTT-1,one -AGATTCCTATCGTG-1,four -AGATTCCTCACTTT-1,two -AGATTCCTGACGAG-1,two -AGATTCCTGTTCAG-1,five -AGCAAAGATATGCG-1,four -AGCACAACAGTCTG-1,four -AGCACTGAGGGAGT-1,four -AGCACTGATATGCG-1,four -AGCACTGATGCTTT-1,unassigned -AGCACTGATTGCGA-1,four -AGCATCGAAGATCC-1,four -AGCATCGAAGGGTG-1,three -AGCATCGAGCTTCC-1,two -AGCATCGAGTGAGG-1,four -AGCATCGATAACCG-1,two -AGCATGACGATGAA-1,five -AGCCAATGGGGAGT-1,one -AGCCAATGTATCTC-1,four -AGCCACCTGGATCT-1,five -AGCCGGTGCCAATG-1,four -AGCCGGTGTGTTTC-1,four -AGCCGTCTCAATCG-1,four -AGCCGTCTGAGAGC-1,four -AGCCTCACGTTCGA-1,four -AGCCTCACTGTCAG-1,one -AGCCTCTGCAGTTG-1,three -AGCCTCTGCCAATG-1,five -AGCGAACTGGATCT-1,four -AGCGAACTTACTGG-1,four -AGCGATACGGAGCA-1,four -AGCGATTGAGATCC-1,five -AGCGCCGAATCTCT-1,four -AGCGCCGACAGAGG-1,four -AGCGCTCTACCTTT-1,four -AGCGGCACCGGGAA-1,four -AGCGGCTGATGTGC-1,four -AGCGGGCTTGCCAA-1,four -AGCGTAACATGCTG-1,four -AGCGTAACTGAGAA-1,two -AGCTCGCTACTGGT-1,four -AGCTCGCTCTGCTC-1,four -AGCTGAACCATACG-1,one -AGCTGAACCTCTCG-1,four -AGCTGCCTTGGGAG-1,two -AGCTGCCTTTCATC-1,four -AGCTGCCTTTCTGT-1,four -AGCTGTGATCCAAG-1,four -AGCTTTACAAGTAG-1,four -AGCTTTACACCAAC-1,five -AGCTTTACTCTCAT-1,three -AGGAAATGAGGAGC-1,four -AGGAACCTCTTAGG-1,one -AGGAACCTTGCCTC-1,five -AGGAATGATAACGC-1,four -AGGAATGATTTGTC-1,four -AGGAGTCTGGTTTG-1,four -AGGAGTCTTGTCAG-1,four -AGGATAGACATTTC-1,four -AGGATAGAGGATTC-1,five -AGGATGCTACTAGC-1,three -AGGATGCTTTAGGC-1,five -AGGCAACTGAAGGC-1,four -AGGCAGGAGTACCA-1,five -AGGCCTCTAGTCGT-1,four -AGGCCTCTCGGAGA-1,four -AGGCCTCTCGTAAC-1,four -AGGGACGACGTTGA-1,four -AGGGACGAGTCAAC-1,five -AGGGACGAGTTGTG-1,four -AGGGACGATAGAGA-1,five -AGGGACGATGCATG-1,five -AGGGAGTGAGCCTA-1,four -AGGGCCACCATACG-1,four -AGGGCGCTAACCAC-1,unassigned -AGGGCGCTATGGTC-1,four -AGGGTGGACAGTCA-1,three -AGGGTGGACTCAAG-1,two -AGGGTGGAGTTGCA-1,five -AGGGTTTGTTCATC-1,two -AGGTCATGAGTGTC-1,three -AGGTCATGCTTATC-1,five -AGGTCTGATTCTCA-1,one -AGGTGGGAAGAATG-1,unassigned -AGGTGGGAAGTTCG-1,four -AGGTGTTGGTTACG-1,three -AGGTTCGAACCTCC-1,two -AGGTTCGAACGTAC-1,two -AGGTTCGAGGGTGA-1,four -AGTAAGGAGTTTGG-1,four -AGTAAGGATTCTTG-1,four -AGTAATACATCACG-1,five -AGTAATACCGAACT-1,three -AGTAATTGTCCCAC-1,four -AGTACGTGAGGGTG-1,four -AGTACGTGCTGCAA-1,four -AGTACGTGCTTGGA-1,four -AGTACTCTACGTGT-1,three -AGTACTCTCAACCA-1,five -AGTACTCTCGGTAT-1,five -AGTAGGCTTGCCTC-1,one -AGTATAACTTGTCT-1,one -AGTATCCTAGAACA-1,four -AGTCACGATGAGCT-1,five -AGTCAGACGAATAG-1,four -AGTCAGACGCTTAG-1,four -AGTCAGACTAGAGA-1,five -AGTCAGACTGCACA-1,four -AGTCCAGATATCTC-1,four -AGTCCAGATTTCAC-1,four -AGTCGAACCAACCA-1,four -AGTCGCCTCCGTAA-1,four -AGTCTACTAGGGTG-1,two -AGTCTACTTGCATG-1,one -AGTCTTACACCACA-1,four -AGTCTTACTTCGCC-1,five -AGTCTTACTTCGGA-1,six -AGTGACTGCAACTG-1,one -AGTGTTCTAACCTG-1,four -AGTGTTCTATAAGG-1,four -AGTGTTCTCACTTT-1,two -AGTTAAACCACTTT-1,four -AGTTATGAACAGTC-1,two -AGTTATGACTGAGT-1,four -AGTTATGAGTTCAG-1,four -AGTTCTACCAGCTA-1,two -AGTTCTTGAAGCCT-1,five -AGTTGTCTACTACG-1,four -AGTTTAGATGGTCA-1,four -AGTTTCACGGTCTA-1,five -AGTTTGCTACAGTC-1,four -AGTTTGCTACTGGT-1,five -AGTTTGCTCCAAGT-1,four -ATAAACACAGTGCT-1,three -ATAAACACCACCAA-1,four -ATAACAACATGCTG-1,two -ATAACAACGTCTAG-1,four -ATAACAACTTTGTC-1,four -ATAACATGTACTCT-1,four -ATAACCCTGTTGGT-1,four -ATAACCCTTGGTAC-1,four -ATAAGTACGAATGA-1,three -ATAAGTTGGTACGT-1,one -ATAAGTTGTCTAGG-1,four -ATAATCGAGCTGAT-1,three -ATAATCGATGGTTG-1,four -ATAATGACCTACTT-1,four -ATAATGACTCGTGA-1,two -ATACAATGTTAGGC-1,four -ATACCACTCGTACA-1,two -ATACCACTCTAAGC-1,unassigned -ATACCACTGCCAAT-1,five -ATACCGGAATGCTG-1,unassigned -ATACCGGACATTTC-1,two -ATACCGGACTTCGC-1,four -ATACCGGAGGTGTT-1,two -ATACCGGATCTCGC-1,four -ATACCTACGCATCA-1,unassigned -ATACCTTGGGGCAA-1,four -ATACGGACAGACTC-1,two -ATACGGACCTACTT-1,two -ATACGGACGAGGTG-1,three -ATACGGACTATGCG-1,three -ATACGGACTCTGGA-1,two -ATACGTCTTAACGC-1,two -ATACTCTGCTTCGC-1,two -ATACTCTGGTATGC-1,five -ATAGATACCATGGT-1,four -ATAGATACGACGAG-1,four -ATAGATTGGTGTAC-1,three -ATAGCCGAACGGAG-1,four -ATAGCGTGCAGATC-1,four -ATAGCGTGCCCTTG-1,two -ATAGCGTGGTATCG-1,two -ATAGCGTGTCTCTA-1,four -ATAGCTCTCTGATG-1,four -ATAGCTCTGAGGTG-1,four -ATAGGAGAAACAGA-1,two -ATAGGCTGTCAGAC-1,four -ATAGTCCTAGTGTC-1,two -ATAGTCCTTGCATG-1,five -ATAGTCCTTGTCGA-1,four -ATAGTTGACAACTG-1,four -ATAGTTGACCCTCA-1,one -ATAGTTGAGACGTT-1,four -ATAGTTGATAAGCC-1,four -ATATACGAAGCCAT-1,four -ATATACGAATTGGC-1,four -ATATAGTGGAATGA-1,two -ATATGCCTAGATCC-1,two -ATATGCCTGGACAG-1,four -ATATGCCTTCTCTA-1,four -ATATGCCTTGGTAC-1,four -ATCAAATGAGCCTA-1,two -ATCAAATGGGTAAA-1,one -ATCAACCTAAACGA-1,four -ATCAACCTGAGGAC-1,four -ATCAACCTTCTCTA-1,five -ATCAACCTTTGTCT-1,five -ATCACACTTTGTCT-1,four -ATCACGGATTTCGT-1,three -ATCATCTGACACCA-1,six -ATCATGCTAGAGTA-1,five -ATCATGCTGAACCT-1,three -ATCCAGGACGCTAA-1,one -ATCCAGGATGGAAA-1,four -ATCCATACTCCTTA-1,two -ATCCATACTTCATC-1,one -ATCCCGTGCAGTCA-1,five -ATCCCGTGCATGCA-1,three -ATCCCGTGGCTGAT-1,three -ATCCGCACGCATCA-1,three -ATCCTAACGACGGA-1,three -ATCCTAACGCTACA-1,five -ATCGACGAAACTGC-1,two -ATCGACGAATGACC-1,four -ATCGAGTGGACGTT-1,five -ATCGCAGAATCTCT-1,one -ATCGCAGAGTGTCA-1,three -ATCGCCACTGAGGG-1,four -ATCGCCTGGGTCAT-1,four -ATCGCCTGTGGCAT-1,three -ATCGCGCTCAGAGG-1,two -ATCGCGCTGGGATG-1,four -ATCGCGCTTTTCGT-1,three -ATCGGAACCAGTCA-1,four -ATCGGTGAGTCAAC-1,four -ATCGGTGATTGCAG-1,four -ATCGTTTGCCTACC-1,two -ATCGTTTGGGTACT-1,two -ATCGTTTGTGCCAA-1,two -ATCTACACCCGCTT-1,two -ATCTACACCGGGAA-1,four -ATCTCAACAGGAGC-1,three -ATCTCAACCTCGAA-1,four -ATCTCAACCTTGTT-1,two -ATCTGGGAAACCAC-1,two -ATCTGGGAAGTGTC-1,unassigned -ATCTGGGATTCCGC-1,five -ATCTGTTGAACGGG-1,four -ATCTGTTGACCTCC-1,four -ATCTGTTGCCTTCG-1,one -ATCTGTTGGTTGCA-1,four -ATCTTGACACCAAC-1,four -ATCTTGACCTCCCA-1,two -ATCTTTCTGCATCA-1,unassigned -ATCTTTCTGTTTCT-1,five -ATCTTTCTTGTCCC-1,five -ATGAAACTCTGTGA-1,five -ATGAAACTGAGGCA-1,four -ATGAAGGAACAGCT-1,five -ATGAAGGACCTGTC-1,three -ATGAAGGACCTTAT-1,three -ATGAAGGACTAGTG-1,three -ATGAAGGACTTGCC-1,five -ATGACGTGACGACT-1,three -ATGACGTGATCGGT-1,one -ATGAGAGAAAGTGA-1,four -ATGAGAGAACGCAT-1,four -ATGAGAGAAGTAGA-1,three -ATGAGCACACAGCT-1,four -ATGAGCACATCTTC-1,four -ATGATAACTTCACT-1,five -ATGATATGAAACAG-1,four -ATGATATGACTGGT-1,four -ATGATATGAGCACT-1,four -ATGATATGGTCATG-1,four -ATGATATGGTGCTA-1,five -ATGATATGTTGTCT-1,two -ATGCACGAATGTCG-1,three -ATGCACGACTGTAG-1,four -ATGCACGAGAACCT-1,three -ATGCACGAGTTCGA-1,four -ATGCACGATTGGTG-1,two -ATGCAGTGTTACCT-1,three -ATGCAGTGTTCTAC-1,four -ATGCCAGAACGACT-1,four -ATGCCAGACAGTCA-1,two -ATGCCGCTTGAACC-1,two -ATGCGATGCTATGG-1,two -ATGCGATGCTGAGT-1,four -ATGCGATGGTTACG-1,three -ATGCGCCTTCATTC-1,four -ATGCTTTGCGAATC-1,four -ATGCTTTGGGCGAA-1,five -ATGCTTTGTAGTCG-1,three -ATGGACACATCGGT-1,four -ATGGACACGCATCA-1,five -ATGGGTACAACCTG-1,three -ATGGGTACATCGGT-1,five -ATGGGTACTATTCC-1,four -ATGGGTACTGGGAG-1,four -ATGTAAACACCTCC-1,four -ATGTAAACCCGCTT-1,four -ATGTAAACGGGATG-1,unassigned -ATGTAAACTCTCCG-1,unassigned -ATGTAAACTTCACT-1,two -ATGTACCTCAGTCA-1,four -ATGTACCTTAGTCG-1,four -ATGTACCTTTATCC-1,two -ATGTACCTTTCACT-1,five -ATGTCACTAATGCC-1,two -ATGTCACTCTGCTC-1,four -ATGTCGGAGGTGAG-1,four -ATGTTCACAGTCTG-1,two -ATGTTCACCGTAGT-1,four -ATGTTGCTTTCAGG-1,four -ATTAACGATGAGAA-1,five -ATTAACGATGCAAC-1,five -ATTAAGACTGCAGT-1,four -ATTACCTGCCTTAT-1,two -ATTACCTGGAGGAC-1,one -ATTAGATGTTTCAC-1,four -ATTATGGAATCTCT-1,four -ATTCAAGAACGGGA-1,four -ATTCAAGACCTTTA-1,four -ATTCAGCTCATTGG-1,six -ATTCCAACCATTGG-1,two -ATTCCAACTTAGGC-1,five -ATTCGACTCACTAG-1,four -ATTCGACTGAATAG-1,two -ATTCGACTTTTGTC-1,one -ATTCGGGAAAGGCG-1,two -ATTCGGGATTAGGC-1,four -ATTCTTCTGATACC-1,unassigned -ATTGAATGGACGGA-1,four -ATTGATGAAGGTTC-1,four -ATTGATGACTGAGT-1,four -ATTGATGAGCGAAG-1,four -ATTGATGATCTATC-1,four -ATTGCACTGACGGA-1,four -ATTGCACTGAGAGC-1,one -ATTGCACTGGAGCA-1,two -ATTGCACTTAGCCA-1,four -ATTGCACTTGCTTT-1,one -ATTGCTTGTTACTC-1,three -ATTGGTCTGACTAC-1,three -ATTGGTCTTGTCTT-1,three -ATTGTAGATTCCCG-1,unassigned -ATTGTAGATTGCAG-1,four -ATTGTCTGCGTACA-1,four -ATTTAGGAACCATG-1,one -ATTTAGGACAGAGG-1,four -ATTTCCGAGATGAA-1,four -ATTTCCGAGTGCTA-1,four -ATTTCGTGTATGGC-1,five -ATTTCTCTACTTTC-1,one -ATTTCTCTAGCAAA-1,four -ATTTCTCTCACTTT-1,unassigned -ATTTCTCTTCCCAC-1,four -ATTTGCACAAGATG-1,two -CAAAGCACAGCTCA-1,four -CAAAGCACCGTAAC-1,three -CAAAGCACGGTAAA-1,five -CAAAGCTGAAAGTG-1,four -CAAAGCTGTTGCTT-1,two -CAAATATGTGACAC-1,four -CAAATTGAGGGCAA-1,four -CAAATTGATGGAGG-1,two -CAACCAGAAAAGTG-1,four -CAACCAGAAGTGCT-1,four -CAACCAGAGTTCAG-1,two -CAACCAGATAGAAG-1,two -CAACCGCTGTTCAG-1,four -CAACCGCTTTGAGC-1,four -CAACGATGCGCAAT-1,one -CAACGTGACTCCAC-1,two -CAACGTGAGCCATA-1,five -CAACGTGATCAAGC-1,two -CAAGAAGACCACAA-1,four -CAAGAAGACGTCTC-1,two -CAAGAAGATTCTAC-1,four -CAAGACTGACCTGA-1,three -CAAGACTGAGTAGA-1,three -CAAGCTGACCATAG-1,one -CAAGCTGATCTATC-1,five -CAAGGACTGTTCAG-1,four -CAAGGACTTCTTTG-1,five -CAAGGTTGCTCCAC-1,four -CAAGGTTGTCATTC-1,three -CAAGGTTGTCTGGA-1,five -CAAGTCGAAACAGA-1,three -CAAGTCGATAGCGT-1,two -CAATAAACGCCATA-1,two -CAATAATGAACTGC-1,two -CAATATGACATGGT-1,four -CAATATGACCTTCG-1,five -CAATATGACGTTAG-1,four -CAATATGAGGAGCA-1,four -CAATCGGAGAAACA-1,four -CAATCTACTGACTG-1,five -CAATTCACCCAACA-1,five -CAATTCACGATAGA-1,four -CAATTCACTTGTGG-1,four -CAATTCTGCTTGTT-1,two -CAATTCTGGCGTAT-1,two -CACAACGATACGAC-1,four -CACAATCTTGTTCT-1,four -CACAATCTTTCCAT-1,five -CACACCTGCTTGAG-1,four -CACACCTGTATGGC-1,four -CACAGAACCCTTGC-1,four -CACAGAACCTGATG-1,four -CACAGATGGGATTC-1,four -CACAGATGGTTTCT-1,two -CACAGCCTGATACC-1,unassigned -CACAGCCTTGCCAA-1,one -CACAGCCTTGTAGC-1,four -CACAGTGATGAAGA-1,two -CACATACTACAGCT-1,five -CACATGGAACACGT-1,four -CACATGGAAGTCGT-1,four -CACCACTGCCAACA-1,four -CACCACTGGCGAAG-1,five -CACCCATGTTCTGT-1,four -CACCGGGAATCGAC-1,unassigned -CACCGGGACGAGAG-1,five -CACCGGGACGTGTA-1,four -CACCGGGACTTCTA-1,unassigned -CACCGGGACTTGCC-1,five -CACCGGGATTCGGA-1,five -CACCGTACTAAGGA-1,three -CACCGTACTAGCGT-1,four -CACCTGACACCCAA-1,five -CACCTGACCAGAAA-1,four -CACCTGACCTCAAG-1,five -CACCTGACGAAAGT-1,three -CACCTGACTCGTAG-1,four -CACGAAACTTCCGC-1,three -CACGACCTCGATAC-1,three -CACGCTACAGAAGT-1,four -CACGCTACTGTTCT-1,three -CACGGGACAGAGTA-1,four -CACGGGACATAAGG-1,four -CACGGGACGTAGGG-1,four -CACGGGTGCTTCGC-1,five -CACGGGTGGAGGAC-1,five -CACGGGTGTGTTTC-1,four -CACTAACTCCTAAG-1,three -CACTAACTGAAAGT-1,four -CACTAGGATGATGC-1,three -CACTATACCCCGTT-1,three -CACTATACGTTTGG-1,five -CACTGAGACAGTCA-1,two -CACTGCACTTCATC-1,four -CACTGCTGAGACTC-1,unassigned -CACTGCTGGAAAGT-1,four -CACTTAACCGAATC-1,four -CACTTAACCGTACA-1,three -CACTTTGACTCTAT-1,five -CACTTTGAGCTGTA-1,five -CAGAAGCTCTCAAG-1,four -CAGACATGAACGGG-1,four -CAGACATGTCGACA-1,four -CAGACCCTAAGGTA-1,one -CAGACCCTAATGCC-1,four -CAGACCCTAGGAGC-1,four -CAGACTGAGTATGC-1,four -CAGATCGAATGTCG-1,three -CAGATCGACCTGAA-1,four -CAGATCGATATGGC-1,four -CAGATGACATTCTC-1,five -CAGCAATGCCTTCG-1,four -CAGCAATGGAGGGT-1,five -CAGCAATGGTGCTA-1,four -CAGCAATGTCTACT-1,two -CAGCAATGTGACCA-1,four -CAGCAATGTGAGGG-1,two -CAGCACCTAAGCCT-1,four -CAGCACCTAGGCGA-1,four -CAGCACCTGTAGGG-1,two -CAGCATGACAACCA-1,two -CAGCATGAGACGTT-1,unassigned -CAGCCTACCCAACA-1,four -CAGCCTTGCTACCC-1,two -CAGCCTTGGGGACA-1,four -CAGCGGACACCCTC-1,four -CAGCGGACCTTTAC-1,five -CAGCGTCTAAAGCA-1,four -CAGCGTCTTATCGG-1,four -CAGCTAGATGTGAC-1,two -CAGCTCTGAGGCGA-1,four -CAGCTCTGCAAGCT-1,five -CAGCTCTGTCGTAG-1,two -CAGCTCTGTGTGGT-1,five -CAGGAACTAACTGC-1,five -CAGGAACTCTCAGA-1,two -CAGGCCGAACACCA-1,four -CAGGCCGAACACGT-1,four -CAGGCCGAACGACT-1,four -CAGGCCGAATCTCT-1,unassigned -CAGGCCGACTAGCA-1,three -CAGGGCACCATACG-1,three -CAGGGCACCCAACA-1,four -CAGGGCACTCCCGT-1,four -CAGGTAACAGACTC-1,two -CAGGTATGAGTCGT-1,four -CAGGTATGTGCTTT-1,four -CAGGTTGAGGATCT-1,three -CAGTGATGGACGGA-1,three -CAGTGATGGCTAAC-1,five -CAGTGATGGGACAG-1,four -CAGTGATGTAAGGA-1,three -CAGTGATGTACGCA-1,four -CAGTGTGATGTCAG-1,four -CAGTTACTAAGGTA-1,three -CAGTTACTGATAGA-1,four -CAGTTGGAAAGAGT-1,two -CAGTTGGACATACG-1,four -CAGTTTACACACGT-1,five -CAGTTTACCCCAAA-1,four -CATAAAACGGAGCA-1,two -CATAAATGAACTGC-1,four -CATAACCTTCTCCG-1,four -CATACTACCTCGAA-1,four -CATACTACCTGAAC-1,four -CATACTACGTACCA-1,two -CATACTTGGGTTAC-1,seven -CATAGTCTAATCGC-1,four -CATAGTCTCACTTT-1,four -CATATAGACTAAGC-1,unassigned -CATATAGATCAGGT-1,three -CATCAACTAGAAGT-1,four -CATCAACTCCCTCA-1,four -CATCAGGACTTCCG-1,five -CATCAGGATAGCCA-1,five -CATCAGGATCCTAT-1,one -CATCAGGATGCACA-1,two -CATCAGGATTTCGT-1,two -CATCATACCGCATA-1,two -CATCATACGGAGCA-1,three -CATCATACTCAAGC-1,four -CATCGCTGGGATCT-1,four -CATCGCTGTGGCAT-1,three -CATCGGCTATGCTG-1,four -CATCGGCTTTGGCA-1,four -CATCTCCTATGTGC-1,three -CATCTCCTCGAACT-1,unassigned -CATGAGACACGGGA-1,three -CATGAGACGTTGAC-1,five -CATGAGACTCGCCT-1,four -CATGCCACGGGTGA-1,four -CATGCCACTGCCAA-1,four -CATGCGCTAGTCAC-1,one -CATGCGCTCAGATC-1,two -CATGCGCTTTGCAG-1,one -CATGGCCTAGGGTG-1,two -CATGGCCTGTGCAT-1,four -CATGTACTATCGTG-1,five -CATGTTACAGTCGT-1,five -CATGTTACCTGAGT-1,four -CATGTTTGGGGATG-1,two -CATTACACACGGAG-1,three -CATTACACCAACTG-1,five -CATTACACGGAGTG-1,four -CATTACACTACTCT-1,four -CATTAGCTCCACAA-1,two -CATTGACTAGCGGA-1,two -CATTGGGACTCGAA-1,four -CATTGTACAGCGTT-1,four -CATTGTACTCGATG-1,three -CATTGTACTTATCC-1,four -CATTGTACTTTGCT-1,one -CATTGTTGCTAGTG-1,four -CATTTCGACTCTAT-1,five -CATTTCGAGATACC-1,five -CATTTGACCACACA-1,five -CATTTGACCCTGAA-1,five -CATTTGTGACGACT-1,three -CATTTGTGCATTGG-1,four -CATTTGTGCGGAGA-1,four -CATTTGTGGGATCT-1,three -CCAAAGTGCTACGA-1,two -CCAAAGTGTGAGAA-1,two -CCAACCTGAAGTAG-1,five -CCAACCTGACGTAC-1,two -CCAACCTGTTCGCC-1,unassigned -CCAAGAACCCAATG-1,four -CCAAGAACGTAGCT-1,four -CCAAGAACGTGTCA-1,four -CCAAGAACTACTGG-1,five -CCAAGAACTCCTAT-1,three -CCAAGATGTCATTC-1,four -CCAAGATGTTTCAC-1,four -CCAAGTGAGGAACG-1,four -CCAAGTGATCAAGC-1,four -CCAATTTGAACGTC-1,two -CCACCATGAACGTC-1,four -CCACCATGATCGGT-1,four -CCACCATGGACGAG-1,one -CCACCATGGGGAGT-1,four -CCACCATGTCCTGC-1,five -CCACTGACCCGCTT-1,two -CCACTGTGGGAAGC-1,two -CCACTGTGTGTAGC-1,four -CCACTTCTCGGGAA-1,two -CCAGAAACCCTGTC-1,three -CCAGAAACGAACTC-1,four -CCAGAAACGGTCTA-1,four -CCAGACCTCTGAGT-1,unassigned -CCAGACCTTGTGGT-1,four -CCAGCACTGCGATT-1,one -CCAGCGGAAAGGCG-1,two -CCAGCGGACGACTA-1,two -CCAGCGGATGGGAG-1,four -CCAGCTACACAGTC-1,four -CCAGCTACCAGCTA-1,three -CCAGGTCTACACCA-1,three -CCAGGTCTAGCATC-1,two -CCAGGTCTATGGTC-1,four -CCAGTCACACTGGT-1,unassigned -CCAGTCACACTGTG-1,three -CCAGTCACGTTGTG-1,four -CCAGTGCTAACCAC-1,four -CCAGTGCTCGTAGT-1,four -CCATCCGAAAGCAA-1,four -CCATCCGAACGACT-1,unassigned -CCATCCGAAGGTTC-1,three -CCATCCGATTCGCC-1,two -CCATCGTGAACGGG-1,four -CCATCGTGCTAGAC-1,unassigned -CCCAACACCTCGCT-1,three -CCCAACACGCATCA-1,four -CCCAACACTTTGTC-1,two -CCCAACTGCAATCG-1,two -CCCAGACTGCCTTC-1,two -CCCAGACTGGTTTG-1,three -CCCAGACTTTCGCC-1,one -CCCAGTTGCAGTTG-1,two -CCCAGTTGGGTACT-1,four -CCCAGTTGTCTATC-1,three -CCCGATTGTGTTTC-1,four -CCCGGAGAAGGGTG-1,two -CCCTACGAATTGGC-1,two -CCCTAGTGCAAAGA-1,four -CCCTCAGACACTTT-1,three -CCCTCAGACGAGAG-1,four -CCCTCAGAGGTCAT-1,four -CCCTGAACTAAAGG-1,three -CCCTGATGCAACCA-1,four -CCCTGATGCAAGCT-1,three -CCCTTACTAACCAC-1,two -CCCTTACTGCAGTT-1,four -CCGAAAACCTTGTT-1,unassigned -CCGACACTGGTTTG-1,four -CCGACTACCCAGTA-1,two -CCGACTACCGTGTA-1,four -CCGACTACTGAGGG-1,four -CCGATAGACCTAAG-1,four -CCGATAGAGTTGGT-1,two -CCGCGAGACACACA-1,two -CCGCGAGAGGTTCA-1,five -CCGCTATGGGACGA-1,three -CCGCTATGTGCAAC-1,two -CCGCTATGTGCACA-1,two -CCGGTACTGTCCTC-1,four -CCGTACACAAGCAA-1,four -CCGTACACAGCGTT-1,three -CCGTACACGTCATG-1,five -CCGTACACGTTGGT-1,two -CCGTACACTAACGC-1,five -CCTAAACTTTCGTT-1,four -CCTAAGGACCCAAA-1,four -CCTAAGGACTAGCA-1,two -CCTAAGGAGGGCAA-1,five -CCTAAGGATGATGC-1,four -CCTAAGGATGTCAG-1,four -CCTACCGACTCTTA-1,four -CCTACCGAGGGATG-1,three -CCTAGAGAGGTGAG-1,three -CCTATAACCAAAGA-1,four -CCTATAACGAGACG-1,one -CCTATAACTCAGAC-1,four -CCTATAACTGCATG-1,one -CCTCGAACACTTTC-1,five -CCTCGAACCCGTAA-1,unassigned -CCTCGAACGTATCG-1,four -CCTCGAACTTACTC-1,four -CCTCTACTCTTCGC-1,unassigned -CCTCTACTGGCATT-1,four -CCTGACTGAAGTAG-1,five -CCTGACTGGGGAGT-1,four -CCTGACTGTGTCTT-1,three -CCTGCAACACGTTG-1,two -CCTGGACTCGTGAT-1,four -CCTTAATGCCCAAA-1,three -CCTTAATGTTCTAC-1,one -CCTTCACTACGACT-1,four -CCTTCACTCAGTCA-1,three -CCTTCACTGGAGTG-1,two -CCTTTAGATTCATC-1,two -CGAACATGCCCTAC-1,two -CGAACATGTCAGAC-1,four -CGAAGACTGGAACG-1,five -CGAAGACTGTTACG-1,four -CGAAGGGAAACCTG-1,five -CGAAGGGATCCGAA-1,three -CGAAGTACCAACTG-1,three -CGAATCGAGGAGCA-1,two -CGAATCGAGGAGGT-1,four -CGACAAACCCATAG-1,four -CGACAAACCGACAT-1,three -CGACCACTAAAGTG-1,five -CGACCACTGCCAAT-1,five -CGACCGGAAGGTCT-1,four -CGACCGGATGGAAA-1,four -CGACCTTGCTAGTG-1,four -CGACGTCTATCGTG-1,four -CGACGTCTCGTGTA-1,four -CGACGTCTGAGGCA-1,four -CGACTCACGTCGTA-1,four -CGACTCACGTTGCA-1,four -CGACTCTGTGTGAC-1,unassigned -CGACTGCTTCCTCG-1,two -CGAGAACTAAGGCG-1,five -CGAGAACTACGTTG-1,four -CGAGAACTTGTTCT-1,two -CGAGATTGGACACT-1,five -CGAGATTGGCCATA-1,five -CGAGCCGAACACCA-1,four -CGAGCCGAGGCGAA-1,four -CGAGCGTGCTCCAC-1,four -CGAGCGTGGATACC-1,four -CGAGCGTGTATGCG-1,two -CGAGGAGACCTCCA-1,three -CGAGGAGATGTCGA-1,four -CGAGGCACCTATGG-1,five -CGAGGCACTATGCG-1,two -CGAGGCACTCTTCA-1,four -CGAGGCTGACGCTA-1,five -CGAGGCTGGCAGTT-1,two -CGAGGGCTACGACT-1,three -CGAGGGCTCGAATC-1,four -CGAGTATGTCACCC-1,one -CGATACGAACAGTC-1,two -CGATACGACAGGAG-1,unassigned -CGATACGATTCACT-1,three -CGATAGACCCGTAA-1,unassigned -CGATAGACCGTACA-1,four -CGATAGACGTAGGG-1,two -CGATAGACTGTTCT-1,four -CGATCAGAAGAACA-1,five -CGATCAGAGAGGGT-1,four -CGATCAGAGGTACT-1,four -CGATCAGATGTGAC-1,unassigned -CGATCCACCGGGAA-1,five -CGATCCACTTCCAT-1,three -CGCAAATGCTCGAA-1,four -CGCAACCTCCTTGC-1,four -CGCAACCTGGACGA-1,four -CGCACGGAGGACGA-1,three -CGCACGGATCTTTG-1,four -CGCACTACAGAATG-1,four -CGCACTACAGCCAT-1,four -CGCACTACATTGGC-1,four -CGCACTACTCGCCT-1,three -CGCACTACTCGTGA-1,four -CGCACTTGTCACGA-1,two -CGCAGGACAGATCC-1,five -CGCAGGACCTACTT-1,four -CGCAGGACTTGTCT-1,one -CGCAGGTGCACTGA-1,four -CGCAGGTGCCATAG-1,one -CGCAGGTGGGAACG-1,four -CGCATAGATCACGA-1,two -CGCCATACTGCAAC-1,four -CGCCATTGAGAGGC-1,four -CGCCATTGCTATGG-1,four -CGCCATTGGAGACG-1,four -CGCCATTGGAGCAG-1,three -CGCCATTGTACTGG-1,three -CGCCGAGAGCTTAG-1,five -CGCCTAACGAATGA-1,unassigned -CGCCTAACTGCTCC-1,four -CGCGAGACACAGCT-1,four -CGCGAGACAGGTCT-1,three -CGCGAGACGCTACA-1,unassigned -CGCGATCTCAGTCA-1,two -CGCGATCTGTTGAC-1,two -CGCGATCTTTCTTG-1,three -CGCGGATGGCCAAT-1,four -CGCTAAGAATGTCG-1,four -CGCTAAGACAACTG-1,four -CGCTAAGACCCTTG-1,four -CGCTACTGAACAGA-1,two -CGCTACTGAGAACA-1,four -CGCTACTGTGAGCT-1,four -CGCTACTGTTCCCG-1,five -CGCTCATGCATTTC-1,two -CGGAATTGGTTTGG-1,four -CGGAATTGTGGAGG-1,four -CGGACCGATGCGTA-1,five -CGGACCGATGGGAG-1,four -CGGACTCTAAACAG-1,three -CGGACTCTCCAATG-1,four -CGGACTCTCCTCGT-1,five -CGGAGGCTATTCCT-1,four -CGGAGGCTTGGATC-1,four -CGGATAACAACGAA-1,two -CGGATAACAGCTCA-1,four -CGGATAACTCAGTG-1,two -CGGCACGAACTCAG-1,five -CGGCACGAAGGGTG-1,four -CGGCACGACTACGA-1,one -CGGCATCTTAGAAG-1,five -CGGCATCTTCGTAG-1,two -CGGCCAGAAAGGTA-1,four -CGGCCAGAGAGGCA-1,five -CGGCGAACCAGTCA-1,two -CGGCGAACGACAAA-1,five -CGGCGAACGGTCTA-1,four -CGGCGAACTACTTC-1,five -CGGGACTGCGTGTA-1,four -CGGGACTGGAATAG-1,five -CGGGCATGACCCAA-1,five -CGGGCATGTCTCTA-1,five -CGGGCATGTTGTGG-1,four -CGGTAAACTCGCAA-1,unassigned -CGGTCACTGTTTGG-1,four -CGGTCACTTACTTC-1,four -CGTAACGATCGCCT-1,four -CGTACCACACACAC-1,four -CGTACCACACGTTG-1,four -CGTACCACCTCATT-1,four -CGTACCACGGAGCA-1,four -CGTACCTGGCATCA-1,five -CGTAGCCTCTCTCG-1,two -CGTAGCCTGCGAAG-1,four -CGTAGCCTGTATGC-1,one -CGTCAAGAAAGGTA-1,two -CGTCAAGAACGTGT-1,four -CGTCAAGACAGAGG-1,four -CGTCAAGACAGGAG-1,five -CGTCCATGCTCTTA-1,four -CGTCGACTTTCCGC-1,five -CGTGATGACGCTAA-1,four -CGTGATGAGGTTCA-1,four -CGTGCACTTATGGC-1,two -CGTGTAGAAAAACG-1,four -CGTGTAGACGATAC-1,five -CGTGTAGAGTTACG-1,five -CGTGTAGAGTTCAG-1,two -CGTGTAGATTCGGA-1,five -CGTTAGGAAACCAC-1,four -CGTTAGGATCATTC-1,two -CGTTATACCCTGAA-1,five -CGTTTAACTGGTCA-1,four -CTAAACCTCTGACA-1,five -CTAAACCTGTGCAT-1,three -CTAACACTAACGTC-1,four -CTAACACTAGTGCT-1,one -CTAACGGAACCGAT-1,five -CTAACGGATTTCTG-1,four -CTAACTACGGCAAG-1,four -CTAAGGACACCATG-1,four -CTAAGGACCGTTAG-1,four -CTAAGGACGCCATA-1,two -CTAAGGTGCCTAAG-1,three -CTAAGGTGTTGCAG-1,four -CTAAGGTGTTTCTG-1,four -CTAATAGAGCTATG-1,four -CTAATGCTTGTGGT-1,two -CTACAACTCCCGTT-1,five -CTACCTCTCAACCA-1,unassigned -CTACGCACACCTAG-1,one -CTACGCACTCTCCG-1,four -CTACGCACTGGTCA-1,five -CTACGGCTTTCTTG-1,two -CTACTATGAACCAC-1,two -CTACTATGATGTGC-1,two -CTACTATGCTAAGC-1,unassigned -CTACTATGTAAAGG-1,three -CTACTCCTATGTCG-1,five -CTACTCCTGCCATA-1,two -CTAGAGACACTTTC-1,four -CTAGAGACAGCATC-1,five -CTAGAGACTTTGGG-1,two -CTAGATCTCTCTAT-1,four -CTAGATCTTCGACA-1,four -CTAGGATGAGCCTA-1,three -CTAGGATGATCGTG-1,three -CTAGGCCTCTCAGA-1,four -CTAGGTGATGGTTG-1,one -CTAGTTACCAGAGG-1,four -CTAGTTACCGCATA-1,four -CTAGTTACGAAACA-1,five -CTATAAGATCGTTT-1,three -CTATACTGAGGTTC-1,two -CTATACTGCCAGTA-1,four -CTATACTGCGCTAA-1,two -CTATACTGCTACGA-1,five -CTATACTGTCTCAT-1,five -CTATACTGTTCGTT-1,four -CTATAGCTGTCACA-1,four -CTATAGCTTCGCTC-1,two -CTATAGCTTGCCTC-1,two -CTATCAACGAACTC-1,four -CTATCAACGCAGAG-1,four -CTATCAACTTTGGG-1,four -CTATCCCTCCACCT-1,two -CTATGTACGAGAGC-1,four -CTATGTACGCTTAG-1,four -CTATGTACTGTTTC-1,four -CTATGTTGAAAGCA-1,four -CTATGTTGTCCTCG-1,four -CTATGTTGTCTCGC-1,four -CTATTGACAAACGA-1,two -CTATTGACACTGGT-1,two -CTATTGACGGTGAG-1,one -CTATTGTGGCAAGG-1,four -CTCAATTGGTTCAG-1,four -CTCAATTGGTTGCA-1,two -CTCAGAGATAGAAG-1,four -CTCAGCACTCTAGG-1,four -CTCAGCACTGAACC-1,two -CTCAGCACTTGCAG-1,four -CTCAGCTGAACCTG-1,two -CTCAGCTGCAGTTG-1,four -CTCAGGCTCGTTGA-1,one -CTCAGGCTGCTAAC-1,four -CTCATTGACCTTAT-1,four -CTCATTGATGCTTT-1,one -CTCCACGAGAGATA-1,unassigned -CTCCATCTCTTAGG-1,four -CTCCATCTGACGAG-1,four -CTCCGAACAAGTGA-1,one -CTCCTACTGCCTTC-1,two -CTCGAAGATGTGGT-1,four -CTCGAAGATTAGGC-1,two -CTCGACTGCTCTAT-1,four -CTCGACTGGGTGAG-1,four -CTCGACTGGTTGAC-1,five -CTCGAGCTCTGGAT-1,five -CTCGCATGACTTTC-1,four -CTCGCATGCTTAGG-1,four -CTCTAAACCTCGAA-1,four -CTCTAAACGGCGAA-1,four -CTCTAATGTCCAAG-1,two -CTGAACGACAGTCA-1,four -CTGAACGATGAGGG-1,four -CTGAAGACCCAACA-1,four -CTGAAGACGTGCAT-1,three -CTGAAGTGAAGCCT-1,one -CTGAAGTGCAGCTA-1,three -CTGAAGTGGCTATG-1,four -CTGAAGTGTCCAGA-1,four -CTGAATCTGAATAG-1,four -CTGACAGAATCGTG-1,five -CTGACCACAGCAAA-1,four -CTGAGAACCGGGAA-1,four -CTGAGAACGTAAAG-1,five -CTGATACTAGTAGA-1,four -CTGATTTGGTGTTG-1,two -CTGCAGCTAACCGT-1,four -CTGCAGCTGACACT-1,four -CTGCAGCTGGATTC-1,two -CTGCAGCTTGGCAT-1,unassigned -CTGCCAACAGGAGC-1,five -CTGCCAACCAGCTA-1,four -CTGCCAACTAACCG-1,two -CTGCCAACTGCTCC-1,five -CTGCCAACTTGCAG-1,four -CTGCCAACTTGCTT-1,five -CTGCGACTCCACCT-1,four -CTGGAAACAAACGA-1,five -CTGGAAACATCGAC-1,four -CTGGATGACTGGAT-1,five -CTGGATGACTTGTT-1,four -CTGGATGATGTGAC-1,three -CTGGCACTCAAGCT-1,two -CTGTAACTAACCAC-1,four -CTGTAACTAGCGTT-1,four -CTGTATACGTAAAG-1,four -CTGTATACGTACGT-1,two -CTGTATACGTTGGT-1,four -CTGTGAGACAACCA-1,one -CTGTGAGACCTTGC-1,five -CTGTGAGACGAACT-1,two -CTGTGAGACTGTAG-1,two -CTTAAAGAACCTGA-1,four -CTTAACACCTGTAG-1,four -CTTAACACTATCGG-1,three -CTTAAGCTACCTAG-1,four -CTTAAGCTAGTACC-1,four -CTTAAGCTCATCAG-1,four -CTTAAGCTCCGCTT-1,three -CTTACAACTAACGC-1,four -CTTACAACTCCCGT-1,two -CTTACTGACGTACA-1,four -CTTAGACTAAACGA-1,four -CTTAGGGACTTGCC-1,four -CTTAGGGAGAATCC-1,four -CTTATCGACTCATT-1,four -CTTCACCTACCTGA-1,one -CTTCATGAAGCATC-1,three -CTTCATGAAGTACC-1,four -CTTCATGACCGAAT-1,five -CTTGAACTACGCAT-1,four -CTTGATTGAGGTTC-1,five -CTTGATTGATCTTC-1,two -CTTGATTGCATTCT-1,four -CTTGATTGTTTCGT-1,four -CTTGTATGACACCA-1,three -CTTGTATGCGCAAT-1,three -CTTTACGAGCGAAG-1,four -CTTTAGACCGTGAT-1,four -CTTTAGACGAGACG-1,four -CTTTAGACGATACC-1,four -CTTTAGACGTTGGT-1,four -CTTTAGACTCATTC-1,five -CTTTAGTGACGGGA-1,five -CTTTAGTGGGTGGA-1,four -CTTTCAGAGAAACA-1,four -CTTTGATGAGCACT-1,four -CTTTGATGTCTAGG-1,unassigned -CTTTGATGTGTCCC-1,four -CTTTGATGTGTGGT-1,four -GAAACAGAACTACG-1,four -GAAACAGAATCACG-1,four -GAAACAGACATTCT-1,four -GAAACCTGATCGTG-1,four -GAAACCTGATGCCA-1,four -GAAACCTGCTTATC-1,four -GAAACCTGGACTAC-1,one -GAAACCTGTGCTAG-1,four -GAAAGATGATTTCC-1,four -GAAAGATGCTGATG-1,one -GAAAGATGCTTCGC-1,two -GAAAGATGTAAGGA-1,four -GAAAGCCTACGTTG-1,three -GAAAGTGAAAGTGA-1,unassigned -GAAAGTGACCACAA-1,unassigned -GAAAGTGACTCAAG-1,four -GAAATACTACCAAC-1,two -GAAATACTCTTAGG-1,three -GAAATACTTCCTCG-1,four -GAACACACGTGCAT-1,two -GAACACACTGCCTC-1,four -GAACAGCTAACTGC-1,two -GAACAGCTCTCAGA-1,one -GAACCAACCACAAC-1,four -GAACCAACTTCCGC-1,five -GAACCTGAACGTGT-1,unassigned -GAACCTGAGAGACG-1,four -GAACCTGATGAACC-1,four -GAACGGGATACTTC-1,four -GAACTGTGACCTGA-1,one -GAACTGTGCCAGTA-1,two -GAAGAATGCAATCG-1,four -GAAGCGGACCTATT-1,two -GAAGCTACGAATGA-1,two -GAAGCTACGGTTTG-1,four -GAAGGGTGAAAGTG-1,four -GAAGGGTGCTTAGG-1,two -GAAGGTCTGAAAGT-1,four -GAAGGTCTGTTGCA-1,four -GAAGGTCTTAAAGG-1,unassigned -GAAGTAGACTCCCA-1,five -GAAGTAGATCCAAG-1,one -GAAGTCACCCTCGT-1,two -GAAGTCACCCTGTC-1,three -GAAGTCTGTCGCAA-1,three -GAAGTCTGTTCTGT-1,four -GAAGTGCTAAACGA-1,five -GAAGTGCTCCGCTT-1,two -GAAGTGCTTAACCG-1,four -GAATGCACCCTAAG-1,four -GAATGCACCTTCGC-1,five -GAATGCTGCGGTAT-1,four -GAATTAACGATAAG-1,four -GAATTAACGGTCAT-1,four -GAATTAACGTCGTA-1,five -GAATTAACTGAAGA-1,three -GACAACACAGGCGA-1,four -GACAACACATCGTG-1,four -GACAACACTCGCCT-1,four -GACAACTGAGGTTC-1,four -GACAGGGAAGAGTA-1,three -GACAGGGAATGCCA-1,four -GACAGTACGAGCTT-1,one -GACAGTACTTCGGA-1,one -GACAGTTGAGTAGA-1,three -GACATTCTCCACCT-1,unassigned -GACCAAACGACTAC-1,two -GACCAAACGTATCG-1,two -GACCCTACTAAAGG-1,three -GACCTAGACCTCAC-1,four -GACCTAGACGAGAG-1,four -GACCTCACAAGGTA-1,four -GACCTCACGTACGT-1,two -GACCTCTGCATCAG-1,four -GACGAACTCCCACT-1,four -GACGATTGCCAATG-1,three -GACGCCGACCTTCG-1,four -GACGCTCTCTCTCG-1,six -GACGGCACACGGGA-1,five -GACGGCACGAGATA-1,two -GACGTAACCTATGG-1,four -GACGTAACCTGTGA-1,four -GACGTAACTATGGC-1,four -GACGTATGTTGACG-1,four -GACGTATGTTTGCT-1,four -GACGTCCTACGGAG-1,four -GACGTCCTCTCAAG-1,two -GACGTCCTGATAAG-1,three -GACTACGATGGTCA-1,three -GACTCCTGCTCGCT-1,four -GACTCCTGGGTTAC-1,four -GACTCCTGTTATCC-1,four -GACTCCTGTTGGTG-1,two -GACTGAACCAATCG-1,two -GACTGATGTGATGC-1,four -GACTTTACATGCCA-1,four -GACTTTACGACAGG-1,three -GAGAAATGTTCTCA-1,three -GAGATAGAAAAAGC-1,two -GAGATCACGACAAA-1,one -GAGATGCTCTGGAT-1,five -GAGATGCTGAATGA-1,four -GAGCAGGATTCCCG-1,five -GAGCATACTTTGCT-1,four -GAGCGCACGCGTAT-1,two -GAGCGCACGGTGAG-1,four -GAGCGCTGAAGATG-1,five -GAGCGCTGTCTTAC-1,two -GAGCGGCTGGGAGT-1,three -GAGGACGACTCAGA-1,four -GAGGATCTGAAAGT-1,three -GAGGCAGACTTGCC-1,five -GAGGGAACACCAGT-1,four -GAGGGAACGAGGGT-1,four -GAGGGATGGGAAAT-1,four -GAGGGCCTTCACCC-1,four -GAGGGTGAAGAGTA-1,four -GAGGTACTACGGTT-1,four -GAGGTACTACTCAG-1,two -GAGGTACTGACACT-1,five -GAGGTACTGGGAGT-1,four -GAGGTACTTAGCGT-1,two -GAGGTGGAGTACGT-1,four -GAGGTGGATCCTCG-1,five -GAGGTTACTCGTTT-1,two -GAGGTTTGTAAGCC-1,two -GAGTCAACCATTCT-1,four -GAGTCAACGGGAGT-1,four -GAGTCTGATCGTGA-1,four -GAGTCTGATTTGGG-1,three -GAGTGACTCAGCTA-1,four -GAGTGACTCGGTAT-1,five -GAGTGACTCTTGCC-1,three -GAGTGACTGACTAC-1,three -GAGTGACTGTCTAG-1,four -GAGTGGGAGTCTTT-1,three -GAGTGGGATGCCCT-1,four -GAGTGGGATGCTGA-1,three -GAGTGTTGCTGTAG-1,four -GAGTGTTGTGGTCA-1,four -GAGTTGTGCATGGT-1,unassigned -GAGTTGTGCTGAGT-1,five -GAGTTGTGGCGAGA-1,two -GAGTTGTGGTAGCT-1,six -GAGTTGTGTATGCG-1,one -GATAAGGAGAAACA-1,two -GATAAGGATTCACT-1,two -GATACTCTATCGGT-1,four -GATACTCTTACTTC-1,four -GATACTCTTGACTG-1,two -GATAGAGAAGGGTG-1,five -GATAGAGACTGTGA-1,four -GATAGAGATCACGA-1,unassigned -GATAGCACCCATAG-1,four -GATAGCACGAAGGC-1,two -GATAGCACTTGTCT-1,four -GATATAACAAGGTA-1,four -GATATAACACGCAT-1,four -GATATATGCTGGAT-1,four -GATATATGTCCGTC-1,five -GATATATGTGGAGG-1,two -GATATCCTAGAAGT-1,four -GATATCCTCCCGTT-1,two -GATATTGACAGGAG-1,four -GATATTGACGAGTT-1,one -GATATTGAGCCAAT-1,four -GATCCCTGACCTTT-1,five -GATCCCTGTGTAGC-1,five -GATCCGCTGGTCAT-1,two -GATCGAACCGAGAG-1,unassigned -GATCGATGACTAGC-1,three -GATCGATGGTAAAG-1,three -GATCGATGTAAGGA-1,two -GATCGTGACACTAG-1,four -GATCGTGATTCACT-1,four -GATCTACTGGTGAG-1,four -GATCTACTTTGCAG-1,three -GATCTTACACCCAA-1,one -GATCTTACCCTACC-1,four -GATCTTACGAATAG-1,two -GATCTTACGAGATA-1,two -GATGCAACTCCAGA-1,four -GATGCCCTACGTAC-1,four -GATGCCCTCTCATT-1,four -GATGCCCTGGCAAG-1,two -GATGCCCTTTTGCT-1,four -GATTACCTTGTTCT-1,four -GATTCGGAACGACT-1,four -GATTCGGACAGGAG-1,two -GATTCGGAGAAGGC-1,one -GATTCTTGATTCGG-1,two -GATTCTTGCCGATA-1,four -GATTCTTGCGAGTT-1,three -GATTGGACCCGTTC-1,three -GATTGGACGGTGTT-1,three -GATTGGACTTTCGT-1,three -GATTGGTGTGTCAG-1,four -GATTTAGACACTCC-1,one -GATTTAGACTAAGC-1,three -GATTTAGATTCGTT-1,two -GATTTGCTAACGAA-1,four -GATTTGCTAACGGG-1,two -GCAACCCTCCTCGT-1,two -GCAACTGATTGCGA-1,four -GCAAGACTACTGGT-1,four -GCAAGACTAGGTCT-1,four -GCAAGACTCCCTTG-1,four -GCAATCGACTGCAA-1,four -GCAATCGAGACGTT-1,unassigned -GCAATCGATCCTTA-1,two -GCAATTCTCGTGTA-1,four -GCAATTCTTCTCCG-1,four -GCACAAACAATGCC-1,four -GCACAAACGGTACT-1,unassigned -GCACAATGGTGCAT-1,unassigned -GCACACCTGTGCTA-1,five -GCACCACTCATGAC-1,two -GCACCACTGTTTGG-1,two -GCACCACTTCCTTA-1,five -GCACCACTTTCGGA-1,two -GCACCTACGCGATT-1,four -GCACCTTGGCTGTA-1,four -GCACCTTGGGGAGT-1,two -GCACGGACCAGCTA-1,four -GCACGGTGACCTCC-1,four -GCACGGTGCTATGG-1,two -GCACTAGAACGGGA-1,four -GCACTAGAAGATGA-1,three -GCACTAGACCTTTA-1,one -GCACTAGACGTAAC-1,three -GCACTAGAGTCGTA-1,five -GCACTAGATGCAAC-1,four -GCACTGCTGAGGCA-1,five -GCAGATACAGCGTT-1,five -GCAGATACGACGGA-1,four -GCAGATACGCAGAG-1,four -GCAGCCGACAGTCA-1,four -GCAGCGTGCACTCC-1,four -GCAGCTCTCAATCG-1,four -GCAGCTCTGTTTCT-1,four -GCAGGGCTAAGAAC-1,four -GCAGGGCTAAGGGC-1,four -GCAGGGCTATCGAC-1,five -GCAGGGCTTGGGAG-1,five -GCAGTCCTAACTGC-1,four -GCAGTCCTCTCTTA-1,four -GCATCAGATGCGTA-1,unassigned -GCATGTGACAAGCT-1,four -GCATTGGAGAAGGC-1,four -GCCAAAACGAGGCA-1,five -GCCAAATGATCGAC-1,four -GCCAACCTACGGTT-1,four -GCCAACCTCGCCTT-1,four -GCCACGGAGGCGAA-1,two -GCCACGGATACTGG-1,four -GCCACTACGTCTTT-1,four -GCCCAACTACCGAT-1,four -GCCCAACTATGGTC-1,five -GCCCATACAGCGTT-1,unassigned -GCCGACGAACTCTT-1,two -GCCGAGTGCGTTGA-1,unassigned -GCCGGAACGAACTC-1,five -GCCGGAACGTTCTT-1,five -GCCGGAACTGCACA-1,five -GCCGGAACTTACTC-1,four -GCCGTACTACCTGA-1,four -GCCGTACTGGCAAG-1,two -GCCTACACAGTTCG-1,five -GCCTACACCACTGA-1,one -GCCTACACCTTGAG-1,four -GCCTAGCTACGGAG-1,three -GCCTAGCTCTATTC-1,four -GCCTAGCTTCTCAT-1,four -GCCTAGCTTCTCTA-1,one -GCCTCAACCATGGT-1,four -GCCTCAACTCTTTG-1,five -GCCTCATGTCTTAC-1,five -GCCTGACTCTCAAG-1,two -GCGAAGGAACTCTT-1,four -GCGAAGGATGCCAA-1,four -GCGAGAGAGGGACA-1,four -GCGAGCACTGTCGA-1,three -GCGAGCACTTGACG-1,four -GCGAGCACTTGCTT-1,unassigned -GCGATATGGTACGT-1,four -GCGATATGGTGTTG-1,four -GCGCACGAAGTCGT-1,four -GCGCACGACTTTAC-1,two -GCGCATCTAGGTCT-1,four -GCGCATCTGGTTAC-1,six -GCGCATCTTCGATG-1,four -GCGCATCTTGCTCC-1,five -GCGCATCTTTCTAC-1,four -GCGCGAACGTTCTT-1,three -GCGCGATGAACGGG-1,four -GCGCGATGGTGCAT-1,five -GCGGAGCTCCTGAA-1,four -GCGGCAACCCGATA-1,four -GCGGCAACGGAGGT-1,three -GCGGCAACTGTCGA-1,unassigned -GCGTAAACACGGTT-1,unassigned -GCGTAATGCACCAA-1,one -GCGTATGAACACCA-1,four -GCGTATGATGAGAA-1,two -GCTACAGAAAGGTA-1,four -GCTACAGAATCTTC-1,three -GCTACCTGAGAAGT-1,two -GCTACCTGATCACG-1,four -GCTACGCTAGAATG-1,four -GCTACGCTAGCTAC-1,four -GCTACGCTCCCTAC-1,four -GCTAGAACAGAGGC-1,three -GCTAGAACGGATCT-1,four -GCTAGAACTCCCGT-1,four -GCTAGATGAGCTCA-1,two -GCTAGATGGCGATT-1,five -GCTATACTAAGGCG-1,four -GCTATACTAGCGTT-1,five -GCTATACTCTCTTA-1,four -GCTATACTGGACGA-1,four -GCTCAAGAACCATG-1,three -GCTCAAGAAGTCAC-1,two -GCTCAGCTGTCTAG-1,four -GCTCCATGAGAAGT-1,five -GCTCCATGCCGAAT-1,four -GCTCGACTCTAGTG-1,two -GCTGATGAGGTATC-1,two -GCTTAACTACAGTC-1,two -GCTTAACTACTGGT-1,five -GCTTAACTGCTGAT-1,four -GCTTAACTTAGACC-1,two -GCTTAACTTCAGTG-1,four -GGAACACTCACTTT-1,two -GGAACACTTCAGAC-1,six -GGAACTACTACTTC-1,four -GGAACTTGAAGGTA-1,two -GGAACTTGAGAATG-1,four -GGAACTTGCTCCAC-1,two -GGAACTTGGGTAGG-1,three -GGAAGGACATCGGT-1,two -GGAAGGACCACTAG-1,four -GGAAGGACGAGGGT-1,four -GGAAGGACGCGAAG-1,four -GGAAGGTGGCGAGA-1,five -GGAATCTGAAGGGC-1,four -GGAATCTGAGGAGC-1,four -GGAATCTGCTTAGG-1,three -GGAATCTGCTTGTT-1,two -GGAATCTGGGAGGT-1,four -GGAATGCTTTCTAC-1,four -GGACAGGAAAGGGC-1,five -GGACAGGAGTGCTA-1,three -GGACAGGATCTCGC-1,four -GGACCCGAAGCTAC-1,two -GGACCGTGCTTACT-1,two -GGACCGTGGGAACG-1,unassigned -GGACCGTGTAACGC-1,four -GGACCTCTGTAAGA-1,two -GGACCTCTTTTCTG-1,five -GGACGAGAGTGTCA-1,two -GGACGCTGACGCAT-1,unassigned -GGACGCTGCTAGCA-1,four -GGACGCTGTCCTCG-1,five -GGAGAGACGTGAGG-1,three -GGAGCAGATTCAGG-1,three -GGAGCCACCTTCTA-1,three -GGAGCGCTACGCAT-1,two -GGAGCGCTCCGAAT-1,unassigned -GGAGGATGCCACCT-1,four -GGAGGATGGTTGAC-1,two -GGAGGATGTCAGTG-1,two -GGAGGCCTCGTTGA-1,five -GGAGGCCTTTCTTG-1,four -GGAGGTGATACGCA-1,four -GGAGGTGATCGCTC-1,four -GGATACTGCAGCTA-1,four -GGATACTGTCTAGG-1,four -GGATAGCTCGTCTC-1,four -GGATAGCTCTGAAC-1,five -GGATGTACCAAAGA-1,three -GGATGTACGCGAAG-1,four -GGATGTACGTCTTT-1,two -GGATGTACGTGTCA-1,four -GGATTTCTAGGTTC-1,four -GGATTTCTTTGTCT-1,two -GGCAAGGAAAAAGC-1,five -GGCAAGGAAGAAGT-1,four -GGCAAGGACTTGGA-1,unassigned -GGCAAGGAGGACTT-1,four -GGCAATACGCTAAC-1,three -GGCAATACGGCATT-1,five -GGCAATACGTTTCT-1,three -GGCACGTGGCTTAG-1,one -GGCACTCTTTTGTC-1,four -GGCATATGCTTATC-1,five -GGCATATGGGGAGT-1,six -GGCATATGTGTGAC-1,unassigned -GGCCACGACAGAGG-1,four -GGCCAGACTGGTTG-1,four -GGCCCAGAAAGTAG-1,two -GGCCGAACAACGAA-1,four -GGCCGAACGCAGAG-1,four -GGCCGAACGTAGGG-1,four -GGCCGAACTCTAGG-1,five -GGCCGATGCAGGAG-1,four -GGCCGATGCCGAAT-1,four -GGCCGATGTACTCT-1,five -GGCGACACTGCCCT-1,unassigned -GGCGACTGCGTAAC-1,four -GGCGCATGCCTAAG-1,one -GGCGCATGCTCCAC-1,four -GGCGCATGTGGAAA-1,four -GGCGGACTAGAGGC-1,four -GGCGGACTAGGAGC-1,five -GGCGGACTCTGACA-1,four -GGCGGACTCTTGGA-1,five -GGCGGACTTACTGG-1,four -GGCGGACTTGAACC-1,four -GGCTAAACACCTGA-1,five -GGCTAAACTCTTAC-1,four -GGCTAATGAGCACT-1,five -GGCTAATGGTCTAG-1,four -GGCTCACTACTCAG-1,two -GGGAACGAAGCTCA-1,one -GGGAACGACACAAC-1,three -GGGAACGAGTGTCA-1,two -GGGAAGTGTTGAGC-1,two -GGGACCACACGTTG-1,five -GGGACCACAGAACA-1,four -GGGACCACGAATAG-1,four -GGGACCACGTCATG-1,four -GGGACCACTCAAGC-1,four -GGGACCACTCGTGA-1,four -GGGACCACTGCATG-1,four -GGGACCTGACCCTC-1,two -GGGACCTGCTTGCC-1,four -GGGACCTGTGGAGG-1,three -GGGATGGACGACAT-1,three -GGGATGGATACTTC-1,four -GGGATGGATGGTTG-1,two -GGGATTACGTCTAG-1,four -GGGCAAGATGCATG-1,two -GGGCACACGGTGAG-1,four -GGGCACACGTTGCA-1,four -GGGCAGCTTGGGAG-1,five -GGGCAGCTTTTCTG-1,four -GGGCCAACCTTGGA-1,unassigned -GGGCCAACGCGTTA-1,three -GGGCCAACTACGCA-1,two -GGGCCAACTCCAAG-1,three -GGGCCATGATGGTC-1,unassigned -GGGCCATGTTGACG-1,four -GGGTAACTCAGCTA-1,four -GGGTAACTCTAGTG-1,three -GGGTAACTCTGGAT-1,four -GGGTTAACGTGCAT-1,five -GGTAAAGAGCTAAC-1,five -GGTACAACTGCAAC-1,four -GGTACATGAAAGCA-1,three -GGTACATGAGCTCA-1,four -GGTACATGCGGTAT-1,four -GGTACATGGTTACG-1,four -GGTACATGTGGGAG-1,four -GGTACTGAACTCTT-1,two -GGTAGTACACCACA-1,five -GGTAGTACACTAGC-1,two -GGTAGTACCCTGTC-1,four -GGTAGTACGCCATA-1,two -GGTAGTACTGTCTT-1,unassigned -GGTATCGAGACAAA-1,unassigned -GGTATCGATGAACC-1,three -GGTCAAACCAAAGA-1,four -GGTCTAGAGAAACA-1,two -GGTCTAGATAGCGT-1,two -GGTGATACCGACTA-1,three -GGTGATACGACTAC-1,two -GGTGATACTGTTTC-1,four -GGTGGAGAAACGGG-1,five -GGTGGAGAAGTAGA-1,four -GGTGGAGACAGATC-1,five -GGTGGAGATCGATG-1,four -GGTGGAGATCTCTA-1,two -GGTGGAGATTACTC-1,five -GGTTTACTACGCAT-1,five -GTAACGTGACCTCC-1,two -GTAACGTGATCGGT-1,three -GTAACGTGCAGCTA-1,three -GTAACGTGGTTGAC-1,three -GTAAGCACAACGGG-1,four -GTAAGCACTCATTC-1,three -GTAAGCTGGTACCA-1,two -GTAATAACCTTCTA-1,two -GTAATAACGTTGTG-1,four -GTACCCTGACAGTC-1,one -GTACCCTGGAGCTT-1,four -GTACCCTGTCCTTA-1,five -GTACCCTGTGAACC-1,four -GTACGTGAACGTTG-1,five -GTACTTTGTCGACA-1,five -GTAGACTGAGATGA-1,two -GTAGACTGTATTCC-1,four -GTAGCAACAGTCGT-1,two -GTAGCAACCATTTC-1,three -GTAGCAACGGTAGG-1,two -GTAGCATGCACTCC-1,three -GTAGCATGTAAGCC-1,two -GTAGCCCTGACGTT-1,four -GTAGCTGAAGCTAC-1,one -GTAGCTGAATTCGG-1,four -GTAGGTACACGGGA-1,two -GTAGTGACCTCATT-1,four -GTAGTGTGAGCGGA-1,five -GTAGTGTGAGGCGA-1,two -GTAGTGTGTGGTTG-1,four -GTATCACTGGTAGG-1,two -GTATCTACAGAAGT-1,five -GTATCTACGACGAG-1,five -GTATCTACGTTACG-1,four -GTATTAGAAACAGA-1,four -GTATTAGAGGTCTA-1,four -GTATTCACACAGCT-1,four -GTATTCACGGGTGA-1,five -GTCAACGACACTGA-1,four -GTCAACGAGTGTAC-1,two -GTCAATCTACACCA-1,five -GTCAATCTGTAGCT-1,five -GTCAATCTTGTGGT-1,four -GTCACCTGCCTCCA-1,four -GTCACCTGTCCCGT-1,four -GTCATACTAATCGC-1,three -GTCATACTGCGATT-1,five -GTCATACTTCGCCT-1,six -GTCATACTTTACCT-1,five -GTCATACTTTGACG-1,four -GTCCAAGAAAAACG-1,four -GTCCACTGACCTCC-1,four -GTCCACTGGGTACT-1,one -GTCCAGCTACGGGA-1,four -GTCCCATGTGGTGT-1,two -GTCGAATGAAGGCG-1,two -GTCGACCTGAATGA-1,five -GTCGACCTGTTCAG-1,four -GTCGCACTTGAGAA-1,three -GTCTAACTGGTCTA-1,two -GTCTAGGAGCTTCC-1,two -GTGAACACACTCTT-1,four -GTGAACACTCAGGT-1,four -GTGACCCTTAAGCC-1,unassigned -GTGATGACAAGTGA-1,four -GTGATGACCTGAGT-1,three -GTGATGACGGTTTG-1,five -GTGATTCTCATTTC-1,four -GTGATTCTCTCTCG-1,two -GTGATTCTGGTTCA-1,five -GTGATTCTGTCGAT-1,four -GTGATTCTTAGCGT-1,three -GTGCCACTCAGGAG-1,four -GTGGATTGCACTAG-1,one -GTGGATTGCGGAGA-1,four -GTGGATTGTAACGC-1,four -GTGTACGATCAGTG-1,four -GTGTAGTGGGTACT-1,four -GTGTATCTAGCCTA-1,three -GTGTATCTAGTAGA-1,five -GTGTATCTGTTACG-1,three -GTGTCAGAAGCGTT-1,five -GTTAAAACCGAGAG-1,five -GTTAAATGCTCGAA-1,four -GTTAAATGTCGACA-1,three -GTTAACCTAGCTAC-1,four -GTTAACCTTGCTTT-1,unassigned -GTTAGGTGCACTCC-1,four -GTTAGGTGCCAGTA-1,two -GTTAGGTGCCCAAA-1,one -GTTAGGTGGAACTC-1,three -GTTAGTCTAAGAAC-1,unassigned -GTTATAGAGGACAG-1,four -GTTATGCTTTCATC-1,four -GTTCAACTGGGACA-1,five -GTTCAACTTATGCG-1,four -GTTGACGAGCCCTT-1,five -GTTGACGATATCGG-1,five -GTTGAGTGGTCTTT-1,two -GTTGAGTGTGCTTT-1,four -GTTGATCTGGGACA-1,four -GTTGATCTTTTCAC-1,five -GTTGGATGTTTACC-1,one -GTTGTACTATTCCT-1,two -GTTGTACTTTTGGG-1,four -GTTTAAGACCATGA-1,two -GTTTAAGACTGTCC-1,five -TAAACAACCAACCA-1,four -TAAACAACGAATCC-1,three -TAAAGACTCAGGAG-1,unassigned -TAAATCGATGAGGG-1,four -TAACAATGTGCCCT-1,three -TAACACCTTCGCTC-1,two -TAACACCTTCGTAG-1,two -TAACACCTTGTTTC-1,six -TAACATGACACTAG-1,three -TAACCGGACTTACT-1,four -TAACGTCTCAACCA-1,two -TAACGTCTCATTGG-1,four -TAACTAGAATTTCC-1,four -TAACTAGACTTAGG-1,four -TAACTAGATCTGGA-1,four -TAACTCACGAGGAC-1,two -TAACTCACGTACAC-1,three -TAACTCACGTATCG-1,two -TAACTCACTCTACT-1,five -TAAGAACTGTGTCA-1,two -TAAGAGGACTAAGC-1,three -TAAGAGGACTTGTT-1,five -TAAGATACGGTTCA-1,two -TAAGATTGCGTAGT-1,four -TAAGATTGTTGCTT-1,four -TAAGCGTGAGGTTC-1,two -TAAGCGTGGACAAA-1,two -TAAGCGTGGGAAAT-1,four -TAAGCGTGTGCTCC-1,one -TAAGGCTGCCATGA-1,unassigned -TAAGGCTGCTGCTC-1,four -TAAGGCTGTCTCGC-1,two -TAAGGGCTGCTGTA-1,four -TAAGGGCTTTACTC-1,four -TAAGTAACCGAGAG-1,three -TAAGTAACCTCCAC-1,three -TAAGTAACCTGTAG-1,four -TAAGTAACTTGTCT-1,four -TAATGATGAGCGGA-1,four -TAATGCCTCATGAC-1,four -TAATGCCTCGTCTC-1,five -TAATGTGAAGATGA-1,four -TAATGTGACTGCAA-1,two -TAATGTGATTACTC-1,four -TACAAATGGGTACT-1,four -TACAATGAAAACAG-1,two -TACAATGACTTAGG-1,four -TACAATGATGCTAG-1,five -TACACACTCACACA-1,four -TACACACTCTTACT-1,four -TACATAGAACGCAT-1,five -TACATCACACGGGA-1,four -TACATCACCTGTTT-1,one -TACATCACGCTAAC-1,three -TACATCACTGAACC-1,one -TACCATTGAGGTTC-1,four -TACCATTGCGGGAA-1,two -TACCATTGGGGATG-1,two -TACCATTGTGAGGG-1,two -TACCGGCTGTTGGT-1,four -TACGAGTGATCTCT-1,four -TACGAGTGATGCTG-1,two -TACGAGTGCGGAGA-1,four -TACGAGTGGTTGGT-1,four -TACGATCTAGTGTC-1,four -TACGATCTCACTGA-1,two -TACGATCTTACGAC-1,four -TACGCAGAGAATCC-1,five -TACGCCACATTCCT-1,four -TACGCCACTCCCAC-1,one -TACGCCACTCCGAA-1,three -TACGGAACGCGTTA-1,three -TACGGCCTGGGACA-1,five -TACGTACTACGGAG-1,unassigned -TACGTACTCAGTTG-1,four -TACGTACTCCCGTT-1,three -TACGTTACAGAAGT-1,four -TACGTTACCAAGCT-1,two -TACTAAGAAAGGTA-1,three -TACTAAGAATCACG-1,four -TACTAAGATGATGC-1,two -TACTAAGATTGCGA-1,four -TACTACACGAGAGC-1,four -TACTACACTTACCT-1,four -TACTACTGAACCTG-1,two -TACTACTGATGTCG-1,five -TACTACTGATTCTC-1,four -TACTACTGTATGGC-1,four -TACTCAACGGTCTA-1,two -TACTCAACTGCTAG-1,three -TACTCCCTCAGTTG-1,four -TACTCTGAATCGAC-1,five -TACTCTGACGAGTT-1,four -TACTCTGATTGACG-1,three -TACTGGGATCGATG-1,four -TACTGTTGAAAGCA-1,four -TACTGTTGAGGCGA-1,five -TACTGTTGCTGAAC-1,three -TACTTGACTCCTCG-1,five -TACTTGACTGGTGT-1,three -TACTTTCTTTTGGG-1,four -TAGAAACTAATCGC-1,four -TAGAAACTGCTTCC-1,two -TAGAAACTGGGATG-1,five -TAGAATTGCGACAT-1,four -TAGAATTGTATCGG-1,four -TAGACGTGCTTGAG-1,four -TAGACGTGTCGCTC-1,four -TAGAGCACCTTACT-1,three -TAGATTGACTTGTT-1,three -TAGATTGAGGCATT-1,five -TAGCATCTCAGCTA-1,five -TAGCATCTCCCTCA-1,four -TAGCATCTGCTGTA-1,one -TAGCATCTGGGACA-1,four -TAGCATCTTGTCGA-1,four -TAGCCCACAAAAGC-1,four -TAGCCCACAGCCAT-1,five -TAGCCCACAGCTAC-1,five -TAGCCCACCCACAA-1,four -TAGCCCTGCGGAGA-1,five -TAGCCGCTTACGAC-1,four -TAGCCGCTTACTTC-1,five -TAGCCGCTTTCCAT-1,two -TAGCTACTGAATAG-1,three -TAGCTACTGTAGCT-1,four -TAGCTACTTTTGCT-1,five -TAGGACTGTGCTGA-1,four -TAGGAGCTAAGGCG-1,three -TAGGAGCTGAGGGT-1,four -TAGGAGCTTGCATG-1,three -TAGGCAACCGTCTC-1,three -TAGGCATGCTCTCG-1,unassigned -TAGGCATGGCGAGA-1,five -TAGGCTGATGCCTC-1,two -TAGGGACTGAACTC-1,five -TAGGTCGACACTGA-1,four -TAGGTCGAGGATCT-1,three -TAGGTGACACACTG-1,four -TAGGTGACACGTTG-1,three -TAGGTGTGTTCTGT-1,four -TAGGTTCTGAAGGC-1,four -TAGGTTCTTCTTAC-1,one -TAGGTTCTTGCTGA-1,two -TAGTAAACCTCGCT-1,four -TAGTAAACGTCACA-1,four -TAGTAATGAGATCC-1,four -TAGTACCTAAGAAC-1,two -TAGTATGATCTTAC-1,three -TAGTATGATTCTCA-1,four -TAGTCTTGGCTGTA-1,four -TAGTCTTGGGACTT-1,four -TAGTCTTGTGGAAA-1,five -TAGTGGTGAAGTGA-1,five -TAGTTAGAACCACA-1,five -TAGTTAGATGAACC-1,four -TATAAGACAACAGA-1,four -TATAAGACAGCTCA-1,one -TATAAGTGACACCA-1,four -TATAAGTGTATCGG-1,two -TATAAGTGTGGTGT-1,one -TATACAGAACCCTC-1,five -TATACAGAAGAACA-1,four -TATACAGATCCAGA-1,four -TATACCACCTGATG-1,three -TATACGCTACCAAC-1,four -TATAGATGGACGGA-1,four -TATAGATGTTCCGC-1,one -TATCCAACCAGCTA-1,two -TATCCAACTCTCTA-1,unassigned -TATCGACTACTAGC-1,five -TATCGACTCGATAC-1,two -TATCGTACAGATGA-1,unassigned -TATCGTACATTCCT-1,two -TATCTCGAGAGATA-1,four -TATCTGACAGGTTC-1,five -TATCTGACTGTTTC-1,five -TATCTTCTAAACAG-1,four -TATGAATGGAGGAC-1,five -TATGAATGTTTGCT-1,one -TATGCGGATAACCG-1,four -TATGGGTGCATCAG-1,five -TATGGGTGCTAGCA-1,three -TATGGTCTCTACCC-1,four -TATGTCACGGAACG-1,three -TATGTCACTAACCG-1,unassigned -TATGTCACTTCTCA-1,three -TATGTGCTCCGATA-1,two -TATGTGCTGGATTC-1,four -TATTGCTGAAGAAC-1,two -TATTGCTGCCGTTC-1,four -TATTGCTGTCTGGA-1,four -TATTGCTGTGCACA-1,five -TATTTCCTATTGGC-1,two -TATTTCCTGGAGGT-1,five -TATTTCCTGGTGTT-1,four -TCAACACTGTTTGG-1,five -TCAAGGACAGCGTT-1,four -TCAAGGACATTCTC-1,five -TCAAGGACGGTGTT-1,two -TCAATCACACTCTT-1,five -TCAATCACAGTCGT-1,one -TCACAACTATGTGC-1,four -TCACAACTTTGCTT-1,two -TCACATACACTTTC-1,four -TCACATACAGGGTG-1,four -TCACCCGAGACGGA-1,two -TCACCGTGCTCGCT-1,one -TCACCTCTACGACT-1,five -TCACCTCTTCCAAG-1,one -TCACGAGAGGAGGT-1,three -TCACTATGGGGCAA-1,five -TCACTATGGTTGTG-1,three -TCAGACGACGCTAA-1,four -TCAGACGACGTTAG-1,five -TCAGAGACTCCAGA-1,four -TCAGCAGACTCCAC-1,four -TCAGCGCTCTAGTG-1,five -TCAGCGCTGGATCT-1,three -TCAGCGCTGGTATC-1,five -TCAGGATGAAGTAG-1,four -TCAGGATGCCTTTA-1,one -TCAGTGGAAGATCC-1,five -TCAGTTACCTACGA-1,two -TCAGTTACTAGAAG-1,four -TCATCAACCCGATA-1,four -TCATCAACTGTTCT-1,two -TCATCATGCAGTTG-1,four -TCATCCCTTACTGG-1,unassigned -TCATTCGATACAGC-1,one -TCCACGTGGAAACA-1,unassigned -TCCACTCTACACTG-1,four -TCCACTCTGAGCTT-1,two -TCCACTCTTACTTC-1,three -TCCATAACAAAGTG-1,four -TCCATAACCGTAGT-1,three -TCCATAACGATGAA-1,four -TCCATAACTACGCA-1,four -TCCATCCTCCCTAC-1,five -TCCCACGATCATTC-1,four -TCCCATCTCAAAGA-1,two -TCCCGAACACAGTC-1,five -TCCCGAACTTCGCC-1,one -TCCCGATGAGATCC-1,four -TCCCGATGCCTGAA-1,two -TCCCTACTCAACTG-1,three -TCCGAAGACAATCG-1,two -TCCGAAGACGTTAG-1,four -TCCGGACTGAGGTG-1,four -TCCGGACTGTACGT-1,five -TCCTAAACATCGAC-1,four -TCCTAAACCGAGAG-1,four -TCCTAAACCGCATA-1,five -TCCTAATGGTTTGG-1,five -TCCTACCTGTCGTA-1,four -TCCTATGAAAAGCA-1,five -TCGAATCTCTGGTA-1,five -TCGACCTGCCGATA-1,one -TCGACGCTTCTATC-1,two -TCGACGCTTTGACG-1,four -TCGAGAACGACAGG-1,four -TCGAGAACGTTAGC-1,four -TCGAGCCTATCAGC-1,three -TCGAGCCTGCGAGA-1,five -TCGAGCCTTGTGAC-1,four -TCGATACTATTCCT-1,unassigned -TCGATACTTGCACA-1,four -TCGATTTGATGCCA-1,two -TCGATTTGCACTCC-1,four -TCGATTTGCAGCTA-1,five -TCGATTTGCCTACC-1,two -TCGATTTGTCGTGA-1,three -TCGCAGCTAGATCC-1,five -TCGCCATGAGACTC-1,four -TCGCCATGTGGTCA-1,three -TCGGACCTAACAGA-1,four -TCGGACCTATAAGG-1,three -TCGGACCTGTACAC-1,four -TCGGTAGAGTAGGG-1,four -TCGGTAGATCCCAC-1,three -TCGTAGGATCGACA-1,four -TCGTTATGGACAAA-1,four -TCTAACACCAGTTG-1,five -TCTAACACGAGCAG-1,unassigned -TCTAACTGAACCAC-1,four -TCTAAGCTAATGCC-1,four -TCTAAGCTTAGTCG-1,five -TCTAAGCTTCTAGG-1,one -TCTAAGCTTGTTCT-1,two -TCTAAGCTTTCGCC-1,three -TCTACAACGACTAC-1,two -TCTAGACTTAGAAG-1,two -TCTAGTTGCACCAA-1,two -TCTATGTGAAGAGT-1,two -TCTATGTGAGTCTG-1,five -TCTCAAACCTAAGC-1,three -TCTCTAGAATTTCC-1,four -TCTGATACACGTGT-1,four -TCTGATACTCGCCT-1,four -TCTTACGAACCTGA-1,two -TCTTCAGAGCTACA-1,two -TCTTGATGCGGAGA-1,five -TGAAATTGGTGAGG-1,two -TGAACCGAAAACGA-1,four -TGAACCGACTACTT-1,one -TGAACCGATTCGGA-1,one -TGAAGCACTCACGA-1,five -TGAAGCTGAACGAA-1,four -TGAAGCTGCATGGT-1,three -TGAAGCTGCGTAAC-1,four -TGAATAACCACTTT-1,four -TGAATAACTCCCAC-1,five -TGACACGACCTTAT-1,three -TGACCAGACAACCA-1,four -TGACCAGAGGATTC-1,four -TGACCGCTAAAAGC-1,four -TGACCGCTCTGCAA-1,four -TGACGATGCAAAGA-1,two -TGACGCCTGTACCA-1,unassigned -TGACGCCTTTACTC-1,four -TGACTGGAAGAGAT-1,two -TGACTGGACCGTAA-1,four -TGACTGGACGCAAT-1,four -TGACTGGAGGACAG-1,three -TGACTGGATTCTCA-1,four -TGACTTACACACCA-1,four -TGACTTACAGTCTG-1,two -TGACTTTGCGCATA-1,four -TGACTTTGTTTGTC-1,four -TGAGACACAAGGTA-1,unassigned -TGAGACACTCAAGC-1,four -TGAGCTGAATGCTG-1,one -TGAGCTGACTGGAT-1,two -TGAGCTGATGCTAG-1,unassigned -TGAGGACTCTCATT-1,two -TGAGGACTTCATTC-1,four -TGAGGTACGAACCT-1,one -TGAGTCGAGTTACG-1,three -TGAGTGACTGAGCT-1,four -TGATAAACGAATCC-1,four -TGATAAACTCCGTC-1,five -TGATAAACTTTCAC-1,four -TGATACCTCACTAG-1,two -TGATACCTGTTGGT-1,four -TGATACCTTATGCG-1,four -TGATACCTTGAAGA-1,four -TGATATGAACCTTT-1,four -TGATCACTAGCATC-1,five -TGATCACTCTCGCT-1,four -TGATCACTTCTACT-1,three -TGATCGGACTGACA-1,one -TGATCGGAGGAGCA-1,three -TGATCGGATATGCG-1,one -TGATTAGACATTGG-1,four -TGATTAGATGACTG-1,three -TGATTAGATGCTAG-1,four -TGATTCACTATGCG-1,four -TGATTCACTGTCAG-1,three -TGATTCTGCCGAAT-1,four -TGATTCTGCTCTTA-1,four -TGCAAGTGAGAACA-1,four -TGCAAGTGGGTAGG-1,two -TGCAATCTTCAGGT-1,three -TGCACAGACGACAT-1,five -TGCCAAGAGCAGTT-1,one -TGCCAAGATCTCTA-1,four -TGCCACTGAACGTC-1,four -TGCCACTGCGATAC-1,five -TGCCAGCTTGGCAT-1,four -TGCCCAACAGCAAA-1,four -TGCCCAACCGCATA-1,one -TGCCGACTCTCCCA-1,three -TGCGAAACAGTCAC-1,three -TGCGAAACGTTGCA-1,three -TGCGATGAACGGTT-1,four -TGCGATGACCTCGT-1,four -TGCGATGACTAGTG-1,three -TGCGATGACTGCTC-1,three -TGCGATGACTTGCC-1,three -TGCGATGAGTGCTA-1,two -TGCGCACTCTTGAG-1,two -TGCGTAGAATAAGG-1,two -TGCGTAGACGGGAA-1,three -TGCGTAGATGGTCA-1,one -TGCTAGGAAACCGT-1,five -TGCTAGGATAGTCG-1,four -TGCTATACGGTTCA-1,two -TGCTATACTGCTGA-1,five -TGCTGAGAGAGCAG-1,five -TGCTGAGATTATCC-1,four -TGGAAAGACTCTCG-1,three -TGGAAAGAGCGATT-1,four -TGGAAAGAGGTCAT-1,one -TGGAAAGATATGGC-1,four -TGGAACACAAACAG-1,five -TGGAACACGCTAAC-1,four -TGGAAGCTCAGATC-1,four -TGGACCCTACACTG-1,two -TGGACCCTCATGGT-1,five -TGGACCCTGGTACT-1,two -TGGACTGAGTATGC-1,four -TGGAGACTATCAGC-1,two -TGGAGACTTCAAGC-1,four -TGGAGACTTGACCA-1,five -TGGAGGGACGGAGA-1,two -TGGAGGGAGCTATG-1,four -TGGATCGATAAAGG-1,four -TGGATGTGACCTAG-1,three -TGGATGTGTGAAGA-1,three -TGGATTCTCATACG-1,five -TGGCAATGCTTGTT-1,three -TGGCACCTTCACGA-1,four -TGGCACCTTCAGTG-1,two -TGGGTATGAAGAGT-1,four -TGGGTATGCACAAC-1,four -TGGGTATGGTACGT-1,three -TGGGTATGTTTGGG-1,two -TGGTAGACATGCCA-1,four -TGGTAGACCCTCAC-1,five -TGGTAGACCTGATG-1,four -TGGTAGTGCACTGA-1,unassigned -TGGTATCTAAACAG-1,four -TGGTATCTCTTCCG-1,four -TGGTCAGACCCAAA-1,four -TGGTTACTGACGTT-1,two -TGGTTACTGTTCTT-1,four -TGTAACCTAGAGGC-1,four -TGTAACCTTGCCTC-1,two -TGTAATGACACAAC-1,five -TGTAATGAGGTAAA-1,five -TGTACTTGCTCTAT-1,one -TGTAGGTGCGAGAG-1,three -TGTAGGTGCTATGG-1,four -TGTAGGTGCTCTAT-1,unassigned -TGTAGGTGTGCTGA-1,four -TGTAGTCTTCCAGA-1,four -TGTAGTCTTGCACA-1,five -TGTATCTGTTAGGC-1,four -TGTATGCTCATGGT-1,three -TGTATGCTGTAGGG-1,four -TGTATGCTTTCATC-1,four -TGTCAGGAATACCG-1,four -TGTCAGGAGATGAA-1,one -TGTCTAACCCCTTG-1,four -TGTGACGATTCTCA-1,five -TGTGAGACTGTCAG-1,one -TGTGAGACTTGAGC-1,four -TGTGAGTGACCACA-1,four -TGTGAGTGAGTGCT-1,unassigned -TGTGAGTGGAGATA-1,five -TGTGATCTCTCTAT-1,three -TGTGATCTGACACT-1,four -TGTGGATGGCCAAT-1,three -TGTTAAGACAAAGA-1,two -TGTTAAGATAAGGA-1,two -TGTTACACCGCATA-1,unassigned -TGTTACACGACTAC-1,one -TGTTACTGGCTACA-1,five -TGTTACTGTAGTCG-1,five -TTAACCACCGTAAC-1,four -TTAACCACTAAGGA-1,five -TTAACCACTCAGAC-1,five -TTACACACGTGTTG-1,four -TTACACACTCCTAT-1,four -TTACCATGAATCGC-1,two -TTACCATGGTTGAC-1,four -TTACCATGTGTCTT-1,four -TTACCATGTTGTGG-1,three -TTACGACTGAGAGC-1,four -TTACGACTTGACAC-1,two -TTACGTACGTTCAG-1,six -TTACTCGAAGAATG-1,two -TTACTCGACGCAAT-1,unassigned -TTACTCGAGGGTGA-1,four -TTACTCGATCTACT-1,five -TTAGAATGTGGTGT-1,four -TTAGAATGTGTAGC-1,four -TTAGACCTCCTACC-1,four -TTAGACCTCCTTTA-1,two -TTAGCTACAACCGT-1,four -TTAGCTACTGTCCC-1,unassigned -TTAGCTACTTTCGT-1,four -TTAGGGACGCGAAG-1,five -TTAGGGTGCTGGAT-1,three -TTAGGGTGTCCTGC-1,two -TTAGGTCTACTTTC-1,two -TTAGTCACCAGTTG-1,four -TTAGTCTGAAAGCA-1,three -TTAGTCTGCCAACA-1,five -TTAGTCTGTGCACA-1,four -TTATCCGACTAGTG-1,three -TTATCCGAGAAAGT-1,one -TTATGAGAGATAAG-1,four -TTATGCACGTCACA-1,three -TTATGGCTTATGGC-1,unassigned -TTATTCCTATGCTG-1,two -TTATTCCTGGACAG-1,three -TTATTCCTGGTACT-1,three -TTATTCCTTCGTGA-1,four -TTCAAAGATAAAGG-1,five -TTCAACACAACAGA-1,four -TTCAACACCCCAAA-1,two -TTCAACACGGACGA-1,one -TTCAAGCTAAGAAC-1,two -TTCAAGCTAGATGA-1,four -TTCAAGCTGTTGAC-1,unassigned -TTCAAGCTTGATGC-1,four -TTCAAGCTTTCGCC-1,four -TTCACAACCCGTTC-1,two -TTCACAACGTCTGA-1,one -TTCAGACTACCCAA-1,four -TTCAGACTCTCGAA-1,four -TTCAGTACCGACTA-1,four -TTCAGTACTCAAGC-1,four -TTCAGTACTCCTAT-1,two -TTCAGTTGCCAAGT-1,four -TTCAGTTGTCCTTA-1,unassigned -TTCAGTTGTCTAGG-1,four -TTCAGTTGTCTCGC-1,three -TTCATCGAGGTGGA-1,two -TTCATGTGTGGTGT-1,four -TTCATTCTATGTCG-1,two -TTCATTCTTCTCTA-1,four -TTCCAAACCTATGG-1,two -TTCCAAACCTCCCA-1,three -TTCCAAACTCCCAC-1,five -TTCCAAACTTGACG-1,five -TTCCATGACGAGAG-1,two -TTCCATGACTGTCC-1,four -TTCCCACTTGAGGG-1,five -TTCCCACTTGTCTT-1,two -TTCCTAGAAAGTGA-1,four -TTCCTAGACTAGTG-1,one -TTCGAGGACTCTAT-1,four -TTCGAGGAGGGCAA-1,four -TTCGAGGATAGAAG-1,one -TTCGATTGAGCATC-1,four -TTCGGAGAATGCCA-1,two -TTCGGAGATGTGCA-1,four -TTCGTATGAAAAGC-1,five -TTCGTATGGATAGA-1,five -TTCGTATGGTCTGA-1,four -TTCGTATGTCCTTA-1,two -TTCTACGAACGTAC-1,four -TTCTACGAGTTGGT-1,four -TTCTAGTGACACGT-1,four -TTCTAGTGCATGAC-1,two -TTCTAGTGGAGAGC-1,five -TTCTAGTGGTCACA-1,unassigned -TTCTCAGAAGAGAT-1,four -TTCTCAGAAGCATC-1,three -TTCTCAGATGGAGG-1,four -TTCTGATGGAGACG-1,five -TTCTTACTCTGGAT-1,one -TTGAACCTCCTTGC-1,three -TTGAATGAACTACG-1,one -TTGAATGACTTACT-1,four -TTGAATGATCTCAT-1,three -TTGACACTCTGTAG-1,four -TTGACACTGATAAG-1,three -TTGAGGACAGAACA-1,two -TTGAGGACTACGCA-1,unassigned -TTGAGGTGGACGGA-1,four -TTGCATTGAGCTAC-1,five -TTGCATTGCTAAGC-1,two -TTGCATTGTGACTG-1,four -TTGCTAACACCAAC-1,five -TTGCTAACACGCTA-1,one -TTGCTAACCACTCC-1,four -TTGCTATGGTACGT-1,two -TTGCTATGGTAGGG-1,one -TTGGAGACCAATCG-1,unassigned -TTGGAGACGCTATG-1,two -TTGGAGACTATGGC-1,three -TTGGGAACTGAACC-1,four -TTGGTACTACTGGT-1,one -TTGGTACTCTTAGG-1,four -TTGGTACTGAATCC-1,three -TTGGTACTGGATTC-1,three -TTGTACACGTTGTG-1,three -TTGTACACTTGCAG-1,four -TTGTAGCTAGCTCA-1,four -TTGTAGCTCTCTTA-1,three -TTGTCATGGACGGA-1,five -TTTAGAGATCCTCG-1,three -TTTAGCTGATACCG-1,four -TTTAGCTGGATACC-1,two -TTTAGCTGTACTCT-1,unassigned -TTTAGGCTCCTTTA-1,two -TTTATCCTGTTGTG-1,two -TTTCACGAGGTTCA-1,four -TTTCAGTGGAAGGC-1,five -TTTCAGTGTCACGA-1,three -TTTCAGTGTCTATC-1,two -TTTCAGTGTGCAGT-1,three -TTTCCAGAGGTGAG-1,four -TTTCGAACACCTGA-1,unassigned -TTTCGAACTCTCAT-1,two -TTTCTACTGAGGCA-1,three -TTTCTACTTCCTCG-1,three -TTTGCATGAGAGGC-1,three -TTTGCATGCCTCAC-1,four diff --git a/server/test/fixtures/schema.json b/server/test/fixtures/schema.json deleted file mode 100644 index eb3cc981..00000000 --- a/server/test/fixtures/schema.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "dataframe": { - "nObs": 2638, - "nVar": 1838, - "type": "float32" - }, - "annotations": { - "obs": { - "index": "name_0", - "columns": [ - { - "name": "name_0", - "type": "string", - "writable": false - }, - { - "name": "n_genes", - "type": "int32", - "writable": false - }, - { - "name": "percent_mito", - "type": "float32", - "writable": false - }, - { - "name": "n_counts", - "type": "float32", - "writable": false - }, - { - "name": "louvain", - "type": "categorical", - "categories": [ - "CD4 T cells", - "CD14+ Monocytes", - "B cells", - "CD8 T cells", - "NK cells", - "FCGR3A+ Monocytes", - "Dendritic cells", - "Megakaryocytes" - ], - "writable": false - } - ] - }, - "var": { - "index": "name_0", - "columns": [ - { - "name": "name_0", - "type": "string", - "writable": false - }, - { - "name": "n_cells", - "type": "int32", - "writable": false - } - ] - } - }, - "layout": { - "obs": [ - { - "name": "umap", - "type": "float32", - "dims": ["umap_0", "umap_1"] - }, - { - "name": "tsne", - "type": "float32", - "dims": ["tsne_0", "tsne_1"] - }, - { - "name": "pca", - "type": "float32", - "dims": ["pca_0", "pca_1"] - } - ] - } -} diff --git a/server/test/fixtures/test_bad_config.yaml b/server/test/fixtures/test_bad_config.yaml deleted file mode 100644 index feea9106..00000000 --- a/server/test/fixtures/test_bad_config.yaml +++ /dev/null @@ -1,34 +0,0 @@ -fixup_gene_symbols: - X: log1p -obs: - cell_type_ontology_term_id: - louvain: - CD4 T cells: CL:00001 - B cells: CL:00002 - CD14+ Monocytes: CL:00003 - NK cells: CL:00004 - CD8 T cells: CL:00005 - FCGR3A+ Monocytes: CL:00006 - Dendritic cells: CL:00007 - Megakaryocytes: CL:00008 - tissue_ontology_term_id: UBERON:12345 - assay_ontology_term_id: EFO:12345 - disease_ontology_term_id: MONDO:12345 - ethnicity_ontology_term_id: MANCESTRO:12345 - development_stage_ontology_term_id: HsapDv:12345 - sex: other -uns: - version: - corpora_schema_version: 1.0.0 - corpora_encoding_version: 0.1.0 - organism_ontology_term_id: NCBITaxon:9606 - title: Test dataset - contributors: - - name: Marcus - institution: CZI - layer_descriptions: - X: raw - project_links: - - link_url: https://chanzuckerberg.com/ - link_name: CZI - link_type: SUMMARY diff --git a/server/test/fixtures/test_config.yaml b/server/test/fixtures/test_config.yaml deleted file mode 100644 index e9f7365f..00000000 --- a/server/test/fixtures/test_config.yaml +++ /dev/null @@ -1,34 +0,0 @@ -fixup_gene_symbols: - X: log1p -obs: - cell_type_ontology_term_id: - louvain: - CD4 T cells: CL:00001 - B cells: CL:00002 - CD14+ Monocytes: CL:00003 - NK cells: CL:00004 - CD8 T cells: CL:00005 - FCGR3A+ Monocytes: CL:00006 - Dendritic cells: CL:00007 - Megakaryocytes: CL:00008 - tissue_ontology_term_id: UBERON:12345 - assay_ontology_term_id: EFO:12345 - disease_ontology_term_id: MONDO:12345 - ethnicity_ontology_term_id: HANCESTRO:12345 - development_stage_ontology_term_id: HsapDv:12345 - sex: other -uns: - version: - corpora_schema_version: 1.0.0 - corpora_encoding_version: 0.1.0 - organism_ontology_term_id: NCBITaxon:9606 - title: Test dataset - contributors: - - name: Marcus - institution: CZI - layer_descriptions: - X: raw - project_links: - - link_url: https://chanzuckerberg.com/ - link_name: CZI - link_type: SUMMARY diff --git a/setup.cfg b/setup.cfg index 3b07f60b..5841d387 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,4 +1,4 @@ [flake8] max-line-length = 120 ignore = E203, W503 -exclude = server/data_common/fbs/NetEncoding/,.git,__pycache__,venv,server/venv,old,build,dist,server/eb/artifact.dir/,local_server/data_common/fbs/NetEncoding +exclude = backend/common/fbs/NetEncoding/,.git,__pycache__,venv,backend/czi_hosted/venv,old,build,dist,backend/czi_hosted/eb/artifact.dir/ diff --git a/setup.py b/setup.py index 2efc7d24..27a98a98 100644 --- a/setup.py +++ b/setup.py @@ -3,10 +3,10 @@ from setuptools import setup, find_packages with open("README.md", "rb") as fh: long_description = fh.read().decode() -with open("local_server/requirements.txt") as fh: +with open("backend/server/requirements.txt") as fh: requirements = fh.read().splitlines() -with open("local_server/requirements-prepare.txt") as fh: +with open("backend/server/requirements-prepare.txt") as fh: requirements_prepare = fh.read().splitlines() setup( @@ -38,6 +38,6 @@ setup( "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Bio-Informatics", ], - entry_points={"console_scripts": ["cellxgene = local_server.cli.cli:cli"]}, + entry_points={"console_scripts": ["cellxgene = backend.server.cli.cli:cli"]}, extras_require=dict(prepare=requirements_prepare), ) diff --git a/setup_hosted.py b/setup_hosted.py index 56a2bd28..d09b5eb5 100644 --- a/setup_hosted.py +++ b/setup_hosted.py @@ -3,10 +3,10 @@ from setuptools import setup, find_packages with open("README.md", "rb") as fh: long_description = fh.read().decode() -with open("server/requirements.txt") as fh: +with open("backend/czi_hosted/requirements.txt") as fh: requirements = fh.read().splitlines() -with open("server/requirements-prepare.txt") as fh: +with open("backend/czi_hosted/requirements-prepare.txt") as fh: requirements_prepare = fh.read().splitlines() setup( @@ -38,6 +38,6 @@ setup( "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Bio-Informatics", ], - entry_points={"console_scripts": ["cellxgene = server.cli.cli:cli"]}, + entry_points={"console_scripts": ["cellxgene = backend.czi_hosted.cli.cli:cli"]}, extras_require=dict(prepare=requirements_prepare), )