diff --git a/package-lock.json b/package-lock.json index c9cc931..18ca058 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "hprc-data-explorer", "version": "0.8.0", "dependencies": { - "@databiosphere/findable-ui": "^51.0.1", + "@databiosphere/findable-ui": "^51.0.2", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", "@mdx-js/loader": "^3.0.1", @@ -1032,9 +1032,9 @@ } }, "node_modules/@databiosphere/findable-ui": { - "version": "51.0.1", - "resolved": "https://registry.npmjs.org/@databiosphere/findable-ui/-/findable-ui-51.0.1.tgz", - "integrity": "sha512-kHHf38QoQUJP+LQAPFKmGuOdZWWeb8Fjer+1CgIa8CryAnGI4HGNQT1KetrnMP0KuPRVOw3VmQOtzsynSdauKg==", + "version": "51.0.2", + "resolved": "https://registry.npmjs.org/@databiosphere/findable-ui/-/findable-ui-51.0.2.tgz", + "integrity": "sha512-JkAVpi4+FD5wwJ+w4XHnisvn7Ur3Dkk0vCfCs15UM17h4DN7UWP+ae1eQpBoP1JssSbkiNzS0/R0X51TQxAXzw==", "license": "Apache-2.0", "engines": { "node": "22.12.0" diff --git a/package.json b/package.json index ac0e760..4da66f7 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "gen-schema": "poetry run ./catalog/schema/scripts/gen-schema.sh" }, "dependencies": { - "@databiosphere/findable-ui": "^51.0.1", + "@databiosphere/findable-ui": "^51.0.2", "@emotion/react": "^11.14.0", "@emotion/styled": "^11.14.1", "@mdx-js/loader": "^3.0.1", diff --git a/site-config/hprc-data-explorer/category.ts b/site-config/hprc-data-explorer/category.ts index 488883b..d1d85e9 100644 --- a/site-config/hprc-data-explorer/category.ts +++ b/site-config/hprc-data-explorer/category.ts @@ -16,6 +16,7 @@ export const HPRC_DATA_EXPLORER_CATEGORY_KEY = { CCS_ALGORITHM: "ccsAlgorithm", COLLECTION: "collection", CONTRIBUTORS: "contributors", + COVERAGE: "coverage", DNA_BRNN_ANNOTATION_FILE: "dnaBrnnAnnotationFile", DOWNLOAD: "DOWNLOAD", FAMILY_ID: "familyId", @@ -65,7 +66,7 @@ export const HPRC_DATA_EXPLORER_CATEGORY_KEY = { }; export const HPRC_DATA_EXPLORER_CATEGORY_LABEL = { - ACCESSION: "Accession", + ACCESSION: "Run Accession", ALIGNMENT: "Alignment", ALIGNMENT_DOWNLOAD: "", ALTERNATIVE_ID: "Alternative ID", @@ -82,6 +83,7 @@ export const HPRC_DATA_EXPLORER_CATEGORY_LABEL = { CCS_ALGORITHM: "CCS Algorithm", COLLECTION: "Collection", CONTRIBUTORS: "Contributors", + COVERAGE: "Coverage", DNA_BRNN_ANNOTATION_FILE: "DNA BRNN", DOWNLOAD: "", FAMILY_ID: "Family ID", diff --git a/site-config/hprc-data-explorer/local/index/rawSequencingDataEntityConfig.ts b/site-config/hprc-data-explorer/local/index/rawSequencingDataEntityConfig.ts index 498c647..0830624 100644 --- a/site-config/hprc-data-explorer/local/index/rawSequencingDataEntityConfig.ts +++ b/site-config/hprc-data-explorer/local/index/rawSequencingDataEntityConfig.ts @@ -1,3 +1,4 @@ +import { VIEW_KIND } from "@databiosphere/findable-ui/lib/common/categories/views/types"; import { ComponentConfig, EntityConfig, @@ -24,29 +25,41 @@ export const rawSequencingDataEntityConfig: EntityConfig, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.FAMILY_ID, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.FAMILY_ID, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BIOSAMPLE_ACCESSION, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BIOSAMPLE_ACCESSION, width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildPopulationAbbreviation, + viewBuilder: V.buildBioprojectAccession, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.POPULATION_ABBREVIATION, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.POPULATION_ABBREVIATION, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BIOPROJECT_ACCESSION, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BIOPROJECT_ACCESSION, width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildPopulationDescriptor, + viewBuilder: V.buildStudy, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.POPULATION_DESCRIPTOR, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.POPULATION_DESCRIPTOR, - width: { max: "1fr", min: "160px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.STUDY, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.STUDY, + width: { max: "0.5fr", min: "120px" }, + }, + { + componentConfig: { + component: C.TypographyNoWrap, + viewBuilder: V.buildPath, + } as ComponentConfig< + typeof C.TypographyNoWrap, + HPRCDataExplorerRawSequencingData + >, + enableGrouping: false, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.PATH, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.PATH, + width: { max: "1fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildBiosampleAccession, + viewBuilder: V.buildPopulationDescriptor, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BIOSAMPLE_ACCESSION, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BIOSAMPLE_ACCESSION, - width: { max: "0.5fr", min: "112px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.POPULATION_DESCRIPTOR, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.POPULATION_DESCRIPTOR, + width: { max: "1fr", min: "160px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildProject, + viewBuilder: V.buildPopulationAbbreviation, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.PROJECT, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.PROJECT, - width: { max: "1fr", min: "160px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.POPULATION_ABBREVIATION, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.POPULATION_ABBREVIATION, + width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildContributors, + viewBuilder: V.buildFamilyId, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.CONTRIBUTORS, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.CONTRIBUTORS, - width: { max: "1fr", min: "160px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.FAMILY_ID, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.FAMILY_ID, + width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildPlatform, + viewBuilder: V.buildProject, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.PLATFORM, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.PLATFORM, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.PROJECT, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.PROJECT, width: { max: "1fr", min: "160px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildInstrumentModel, + viewBuilder: V.buildContributors, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.INSTRUMENT_MODEL, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.INSTRUMENT_MODEL, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.CONTRIBUTORS, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.CONTRIBUTORS, width: { max: "1fr", min: "160px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildBasecaller, + viewBuilder: V.buildGeneratorFacility, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BASECALLER, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BASECALLER, - width: { max: "0.5fr", min: "112px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.GENERATOR_FACILITY, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.GENERATOR_FACILITY, + width: { max: "1fr", min: "160px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildBasecallerModel, + viewBuilder: V.buildPlatform, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BASECALLER_MODEL, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BASECALLER_MODEL, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.PLATFORM, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.PLATFORM, width: { max: "1fr", min: "160px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildBasecallerVersion, + viewBuilder: V.buildInstrumentModel, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BASECALLER_VERSION, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BASECALLER_VERSION, - width: { max: "0.5fr", min: "112px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.INSTRUMENT_MODEL, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.INSTRUMENT_MODEL, + width: { max: "1fr", min: "160px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildBioprojectAccession, + viewBuilder: V.buildLibraryStrategy, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BIOPROJECT_ACCESSION, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BIOPROJECT_ACCESSION, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.LIBRARY_STRATEGY, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.LIBRARY_STRATEGY, width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildCcsAlgorithm, + viewBuilder: V.buildLibrarySource, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.CCS_ALGORITHM, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.CCS_ALGORITHM, - width: { max: "1fr", min: "160px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.LIBRARY_SOURCE, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.LIBRARY_SOURCE, + width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { @@ -333,54 +410,54 @@ export const rawSequencingDataEntityConfig: EntityConfig, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.GENERATOR_CONTACT, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.GENERATOR_CONTACT, - width: { max: "1fr", min: "160px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BASECALLER, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BASECALLER, + width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildGeneratorFacility, + viewBuilder: V.buildBasecallerModel, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.GENERATOR_FACILITY, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.GENERATOR_FACILITY, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BASECALLER_MODEL, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BASECALLER_MODEL, width: { max: "1fr", min: "160px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildLibrarySource, + viewBuilder: V.buildBasecallerVersion, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.LIBRARY_SOURCE, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.LIBRARY_SOURCE, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.BASECALLER_VERSION, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.BASECALLER_VERSION, width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildLibraryStrategy, + viewBuilder: V.buildCcsAlgorithm, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.LIBRARY_STRATEGY, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.LIBRARY_STRATEGY, - width: { max: "0.5fr", min: "112px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.CCS_ALGORITHM, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.CCS_ALGORITHM, + width: { max: "1fr", min: "160px" }, }, { componentConfig: { @@ -398,93 +475,99 @@ export const rawSequencingDataEntityConfig: EntityConfig, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.N50, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.N50, + filterFn: "inNumberRange", + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.COVERAGE, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.COVERAGE, width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildOneHundredkbPlus, + viewBuilder: V.buildTotalGbp, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.ONE_HUNDRED_KB_PLUS, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.ONE_HUNDRED_KB_PLUS, - width: { max: "0.5fr", min: "112px" }, + filterFn: "inNumberRange", + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.TOTAL_GBP, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.TOTAL_GBP, + width: { max: "0.5fr", min: "144px" }, }, { componentConfig: { - component: C.TypographyNoWrap, - viewBuilder: V.buildPath, + component: C.BasicCell, + viewBuilder: V.buildN50, } as ComponentConfig< - typeof C.TypographyNoWrap, + typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, - enableGrouping: false, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.PATH, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.PATH, - width: { max: "1fr", min: "112px" }, + enableGrouping: true, + filterFn: "inNumberRange", + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.N50, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.N50, + width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildStudy, + viewBuilder: V.buildTotalReads, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.STUDY, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.STUDY, - width: { max: "0.5fr", min: "120px" }, + filterFn: "inNumberRange", + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.TOTAL_READS, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.TOTAL_READS, + width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildTotalGbp, + viewBuilder: V.buildOneHundredkbPlus, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.TOTAL_GBP, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.TOTAL_GBP, - width: { max: "0.5fr", min: "144px" }, + filterFn: "inNumberRange", + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.ONE_HUNDRED_KB_PLUS, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.ONE_HUNDRED_KB_PLUS, + width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildTotalReads, + viewBuilder: V.buildWhales, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.TOTAL_READS, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.TOTAL_READS, + filterFn: "inNumberRange", + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.WHALES, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.WHALES, width: { max: "0.5fr", min: "112px" }, }, { componentConfig: { component: C.BasicCell, - viewBuilder: V.buildWhales, + viewBuilder: V.buildGeneratorContact, } as ComponentConfig< typeof C.BasicCell, HPRCDataExplorerRawSequencingData >, enableGrouping: true, - header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.WHALES, - id: HPRC_DATA_EXPLORER_CATEGORY_KEY.WHALES, - width: { max: "0.5fr", min: "112px" }, + header: HPRC_DATA_EXPLORER_CATEGORY_LABEL.GENERATOR_CONTACT, + id: HPRC_DATA_EXPLORER_CATEGORY_KEY.GENERATOR_CONTACT, + width: { max: "1fr", min: "160px" }, }, ], tableOptions: { @@ -502,19 +585,16 @@ export const rawSequencingDataEntityConfig: EntityConfig