Skip to content

Commit d630df6

Browse files
authored
feat: replace species count with biosamples count (#3657) (#3659)
1 parent 7d304c7 commit d630df6

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

explorer/app/components/Index/common/constants.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,22 @@ const {
3131
STUDY_DESIGN,
3232
WORKSPACE_NAME,
3333
} = METADATA_KEY;
34-
const { DONORS, ESTIMATED_CELLS, FILE_FORMATS, FILES, SPECIES, SPECIMENS } =
35-
SUMMARY;
34+
const {
35+
BIOSAMPLES,
36+
DONORS,
37+
ESTIMATED_CELLS,
38+
FILE_FORMATS,
39+
FILES,
40+
SPECIES,
41+
SPECIMENS,
42+
} = SUMMARY;
3643

3744
/**
3845
* Functions binding summary response API to summary count.
3946
*/
4047
export const BIND_SUMMARY_RESPONSE = {
48+
[BIOSAMPLES]: (r: AzulSummaryResponse): number =>
49+
getSummaryCount(r, SUMMARY_KEY.BIOSAMPLES),
4150
[DONORS]: (r: AzulSummaryResponse): number =>
4251
getSummaryCount(r, SUMMARY_KEY.DONORS),
4352
[ESTIMATED_CELLS]: calculateSummaryTotalCellCount,
@@ -83,6 +92,7 @@ export const PLURALIZED_METADATA_LABEL = {
8392
* Set of possible summary keys.
8493
*/
8594
export const SUMMARY_KEY = {
95+
[BIOSAMPLES]: "biosampleCount",
8696
[DONORS]: "donorCount",
8797
[FILES]: "fileCount",
8898
[FILE_FORMATS]: "fileFormats",
@@ -94,6 +104,7 @@ export const SUMMARY_KEY = {
94104
* Set of possible summary labels.
95105
*/
96106
export const SUMMARY_LABEL = {
107+
[BIOSAMPLES]: "BioSamples",
97108
[DONORS]: "Donors",
98109
[ESTIMATED_CELLS]: "Estimated Cells",
99110
[FILES]: "Files",

explorer/app/components/Index/common/entities.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ export enum METADATA_KEY {
3131
* Set of possible summary counts and other summary values as part of summary response.
3232
*/
3333
export enum SUMMARY {
34+
BIOSAMPLES = "BIOSAMPLES",
3435
DONORS = "DONORS",
3536
ESTIMATED_CELLS = "ESTIMATED_CELLS",
3637
FILE_FORMATS = "FILE_FORMATS",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { SUMMARY } from "app/components/Index/common/entities";
22

33
// Template constants
4-
const { DONORS, FILE_FORMATS, SPECIES } = SUMMARY;
4+
const { BIOSAMPLES, DONORS, FILE_FORMATS } = SUMMARY;
55

66
/**
77
* Summary display order.
88
*/
9-
export const SUMMARIES = [SPECIES, DONORS, FILE_FORMATS];
9+
export const SUMMARIES = [BIOSAMPLES, DONORS, FILE_FORMATS];

0 commit comments

Comments
 (0)