forked from DataBiosphere/data-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: configure file manifest summary (#888)
- Loading branch information
Fran McDade
authored and
Fran McDade
committed
Aug 2, 2023
1 parent
535cf15
commit c8655ac
Showing
19 changed files
with
859 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
explorer/app/viewModelBuilders/azul/hca-dcp/common/summaryMapper/constants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { HCA_DCP_CATEGORY_LABEL } from "../../../../../../site-config/hca-dcp/category"; | ||
import { FileSummary, SUMMARY } from "./entities"; | ||
|
||
export const DEFAULT_SUMMARY: FileSummary = { | ||
donorCount: 0, | ||
fileCount: 0, | ||
fileTypeSummaries: [], | ||
organTypes: [], | ||
projectCount: 0, | ||
specimenCount: 0, | ||
totalCellCount: 0, | ||
totalFileSize: 0, | ||
}; | ||
|
||
/** | ||
* Display text for summaries. | ||
*/ | ||
export const SUMMARY_DISPLAY_TEXT = { | ||
[SUMMARY.DONOR_COUNT]: "Donors", | ||
[SUMMARY.DONOR_DISEASE]: "Disease Status (Donor)", | ||
[SUMMARY.FILE_COUNT]: "Files", | ||
[SUMMARY.GENUS_SPECIES]: "Species", | ||
[SUMMARY.LIBRARY_CONSTRUCTION_APPROACH]: | ||
HCA_DCP_CATEGORY_LABEL.LIBRARY_CONSTRUCTION_METHOD, | ||
[SUMMARY.ORGAN]: HCA_DCP_CATEGORY_LABEL.ANATOMICAL_ENTITY, // anatomical entity | ||
[SUMMARY.ORGAN_PART]: HCA_DCP_CATEGORY_LABEL.ORGAN_PART, | ||
[SUMMARY.PAIRED_END]: HCA_DCP_CATEGORY_LABEL.PAIRED_END, | ||
[SUMMARY.PROJECT_COUNT]: "Projects", | ||
[SUMMARY.SPECIMEN_COUNT]: "Specimens", | ||
[SUMMARY.SPECIMEN_DISEASE]: "Disease Status (Specimen)", | ||
[SUMMARY.TOTAL_CELL_COUNT]: "Estimated Cells", | ||
[SUMMARY.TOTAL_FILE_SIZE]: HCA_DCP_CATEGORY_LABEL.FILE_SIZE, | ||
}; |
42 changes: 42 additions & 0 deletions
42
explorer/app/viewModelBuilders/azul/hca-dcp/common/summaryMapper/entities.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* Model of file summary. | ||
*/ | ||
export interface FileSummary { | ||
donorCount: number; | ||
fileCount: number; | ||
fileTypeSummaries: FileTypeSummary[]; | ||
organTypes: string[]; | ||
projectCount: number; | ||
specimenCount: number; | ||
totalCellCount: number; | ||
totalFileSize: number; | ||
} | ||
|
||
/** | ||
* Model of file type summary. | ||
*/ | ||
export interface FileTypeSummary { | ||
count: number; | ||
fileType: string; | ||
matrixCellCount: number; | ||
totalSize: number; | ||
} | ||
|
||
/** | ||
* Possible set of summaries. | ||
*/ | ||
export const enum SUMMARY { | ||
DONOR_COUNT = "DONOR_COUNT", | ||
DONOR_DISEASE = "DONOR_DISEASE", | ||
FILE_COUNT = "FILE_COUNT", | ||
GENUS_SPECIES = "GENUS_SPECIES", | ||
LIBRARY_CONSTRUCTION_APPROACH = "LIBRARY_CONSTRUCTION_APPROACH", | ||
ORGAN = "ORGAN", | ||
ORGAN_PART = "ORGAN_PART", | ||
PAIRED_END = "PAIRED_END", | ||
PROJECT_COUNT = "PROJECT_COUNT", | ||
SPECIMEN_COUNT = "SPECIMEN_COUNT", | ||
SPECIMEN_DISEASE = "SPECIMEN_DISEASE", | ||
TOTAL_CELL_COUNT = "TOTAL_CELL_COUNT", | ||
TOTAL_FILE_SIZE = "TOTAL_FILE_SIZE", | ||
} |
Oops, something went wrong.