Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: staging deploy; 06/12/24 #975

Merged
merged 3 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions client/src/common/types/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* Complete list of standard cellxgene column names.
* https://github.com/chanzuckerberg/single-cell-curation/blob/main/schema/3.0.0/schema.md#obs-cell-metadata
* https://github.com/chanzuckerberg/single-cell-curation/blob/main/schema/5.1.0/schema.md#obs-cell-metadata
*/
export const STANDARD_CATEGORY_NAMES = [
"assay",
Expand All @@ -13,17 +13,18 @@ export const STANDARD_CATEGORY_NAMES = [
"development_stage_ontology_term_id",
"disease",
"disease_ontology_term_id",
"self_reported_ethnicity",
"self_reported_ethnicity_ontology_term_id",
"donor_id",
"in_tissue",
"is_primary_data",
"organism",
"organism_ontology_term_id",
"sex_ontology_term_id",
"self_reported_ethnicity",
"self_reported_ethnicity_ontology_term_id",
"sex",
"tissue_ontology_term_id",
"tissue",
"sex_ontology_term_id",
"suspension_type",
"donor_id",
"tissue",
"tissue_ontology_term_id",
];

export const EXCLUDED_CATEGORY_NAMES = ["observation_joinid"];
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/categorical/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ class Categories extends React.Component<{}, State> {
/**
* Determine if category name is an ontology key.
* @param catName - Name of category.
* @returns True if category name includes ontology key.
* @returns True if category exists in ontology term id list.
*/
isCategoryNameOntologyKey = (catName: string): boolean =>
catName.includes(globals.ONTOLOGY_KEY);
globals.ONTOLOGY_TERM_ID_KEYS.some((key: string) => catName.includes(key));

/**
* Categories are included for display if category has more than one category value or categories are not defined
Expand Down
8 changes: 3 additions & 5 deletions client/src/components/graph/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,10 @@ function getSpatialUrl(s3URI: string) {
if (hostname.includes("staging")) {
return `https://cellxgene.staging.single-cell.czi.technology/spatial-deep-zoom/${datasetVersionId}/`;
}

if (hostname.includes("prod")) {
return `https://cellxgene.cziscience.com/spatial-deep-zoom/${datasetVersionId}/`;
if (hostname.includes("dev") || hostname.includes("localhost")) {
return `https://cellxgene.dev.single-cell.czi.technology/spatial-deep-zoom/${datasetVersionId}/`;
}

return `https://cellxgene.dev.single-cell.czi.technology/spatial-deep-zoom/${datasetVersionId}/`;
return `https://cellxgene.cziscience.com/spatial-deep-zoom/${datasetVersionId}/`;
}

function getDatasetVersionId(s3URI: string) {
Expand Down
6 changes: 5 additions & 1 deletion client/src/components/infoDrawer/infoFormat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,11 @@ const buildDatasetMetadataViews = (
): MetadataView[] =>
Array.from(singleValueCategories.entries())
.filter(([key, value]) => {
if (key.indexOf(globals.ONTOLOGY_KEY) >= 0) {
if (
globals.ONTOLOGY_TERM_ID_KEYS.some((ontologyKey) =>
key.includes(ontologyKey)
)
) {
// skip ontology terms
return false;
}
Expand Down
13 changes: 11 additions & 2 deletions client/src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@ export const unassignedCategoryLabel = "unassigned";
/** Maximum number of cells a dataset can have in order to be included for display. */
export const DATASET_MAX_CELL_COUNT = 2_000_000;

/* Category name suffix used to determine if category name is ontology term id. */
export const ONTOLOGY_KEY = "ontology_term_id";
/* Explicit ontology term ids. */
export const ONTOLOGY_TERM_ID_KEYS = [
"assay_ontology_term_id",
"cell_type_ontology_term_id",
"development_stage_ontology_term_id",
"disease_ontology_term_id",
"organism_ontology_term_id",
"self_reported_ethnicity_ontology_term_id",
"sex_ontology_term_id",
"tissue_ontology_term_id",
];

/* Unified navigation bar header height. */
export const HEADER_HEIGHT_PX = 56;
Expand Down
2 changes: 1 addition & 1 deletion server/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def normalize_embedding(embedding, ename, spatial=None):
Embedding is an ndarray, shape (n_obs, n)., where n is normally 2
"""

if spatial is not None and ename in "spatial":
if spatial and ename in "spatial":

library_id = list(spatial.keys())[0]
image_properties = spatial[library_id]["image_properties"]
Expand Down
Loading