Skip to content

Commit

Permalink
chore: use genre to categorize resource catalogs
Browse files Browse the repository at this point in the history
  • Loading branch information
candicecz committed May 31, 2024
1 parent 093aa0c commit 7917a62
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 20 deletions.
32 changes: 16 additions & 16 deletions configs/repositories.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{
"id": "AccessClinicalData@NIAID",
"label": "AccessClinicalData@NIAID",
"genre": ["clinical"],

"icon": "/assets/NIH-logo.png",
"imageURL": "/assets/resources/access-clinical.png",
"isNIAID": true,
Expand Down Expand Up @@ -43,7 +43,7 @@
{
"id": "ClinEpiDB",
"label": "ClinEpiDB",
"genre": ["clinical", "epidemiology"],

"icon": "/assets/resources/clinepi.jpeg",
"imageURL": "/assets/resources/clinepi.jpeg",
"isNIAID": true,
Expand Down Expand Up @@ -109,23 +109,23 @@
{
"id": "HuBMAP",
"label": "HuBMAP",
"genre": ["physiology", "imaging", "omics", "spectrometry"],

"icon": "/assets/resources/hubmap-icon.jpg",
"imageURL": "/assets/resources/hubmap.png",
"type": "generalist"
},
{
"id": "Human Cell Atlas",
"label": "Human Cell Atlas",
"genre": ["physiology", "omics"],

"icon": "/assets/resources/hca-icon.png",
"imageURL": "/assets/resources/hca.png",
"type": "generalist"
},
{
"id": "ImmPort",
"label": "ImmPort",
"genre": ["omics", "clinical", "imaging", "immunology", "molecular"],

"icon": "/assets/resources/immport-icon.jpg",
"imageURL": "/assets/resources/immport.png",
"isNIAID": true,
Expand All @@ -134,7 +134,7 @@
{
"id": "LINCS",
"label": "BD2K-LINCS DCIC",
"genre": ["imaging", "omics", "molecular"],

"icon": "/assets/resources/lincs-icon.jpg",
"imageURL": "/assets/resources/lincs.png",
"type": "generalist"
Expand All @@ -143,7 +143,7 @@
"id": "MalariaGEN",
"label": "MalariaGEN",
"imageURL": "/assets/resources/malariagen.svg",
"type": "generalist"
"type": "iid"
},
{
"id": "Mendeley",
Expand All @@ -155,7 +155,7 @@
{
"id": "MicrobiomeDB",
"label": "MicrobiomeDB",
"genre": ["omics"],

"icon": "/assets/resources/microbiome.png",
"imageURL": "/assets/resources/microbiome.png",
"isNIAID": true,
Expand All @@ -164,7 +164,7 @@
{
"id": "NCBI GEO",
"label": "NCBI GEO",
"genre": ["omics"],

"icon": "/assets/resources/geo.gif",
"imageURL": "/assets/resources/geo.gif",
"type": "generalist"
Expand All @@ -179,7 +179,7 @@
{
"id": "NCBI SRA",
"label": "NCBI Sequence Read Archive",
"genre": ["omics"],

"icon": "/assets/resources/ncbi-sra.png",
"imageURL": "/assets/resources/ncbi-sra.png",
"type": "generalist"
Expand Down Expand Up @@ -210,7 +210,7 @@
{
"id": "Omics Discovery Index (OmicsDI)",
"label": "Omics Discovery Index (OmicsDI)",
"genre": ["omics"],

"icon": "/assets/resources/omics.png",
"imageURL": "/assets/resources/omics.png",
"type": "generalist"
Expand All @@ -226,7 +226,7 @@
{
"id": "Qiita",
"label": "Qiita",
"genre": ["omics"],

"icon": "/assets/resources/qiita.png",
"imageURL": "/assets/resources/qiita.png",
"type": "iid"
Expand All @@ -235,15 +235,15 @@
{
"id": "ReframeDB",
"label": "ReframeDB",
"genre": ["molecular"],

"icon": "/assets/resources/reframedb.png",
"imageURL": "/assets/resources/reframedb.png",
"type": "iid"
},
{
"id": "VDJServer",
"label": "VDJServer",
"genre": ["omics"],

"icon": "/assets/resources/vdjserver.png",
"imageURL": "/assets/resources/vdjserver.png",
"isNIAID": true,
Expand All @@ -252,7 +252,7 @@
{
"id": "VEuPathDB",
"label": "VEuPathDB",
"genre": ["omics"],

"icon": "/assets/resources/veupathdb-icon.jpg",
"imageURL": "/assets/resources/VEuPathDB.png",
"isNIAID": true,
Expand All @@ -261,7 +261,7 @@
{
"id": "Vivli",
"label": "Vivli",
"genre": ["clinical"],

"icon": "/assets/resources/vivli-icon.jpeg",
"imageURL": "/assets/resources/vivli.png",
"type": "generalist"
Expand Down
8 changes: 7 additions & 1 deletion src/hooks/api/useRepoData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ export interface Repository {
type: 'Repository';
icon?: string;
name: string;
domain: 'generalist' | 'iid';
domain:
| 'generalist'
| 'iid'
| 'basic science'
| 'biomedical'
| 'other'
| 'metadata';
url?: string | null;
}

Expand Down
11 changes: 9 additions & 2 deletions src/hooks/api/useResourceCatalogs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ export interface ResourceCatalog {
conditionsOfAccess?: FormattedResource['conditionsOfAccess'];
type: 'ResourceCatalog';
name: FormattedResource['name'];
domain: 'generalist' | 'iid';
domain:
| 'generalist'
| 'iid'
| 'basic science'
| 'biomedical'
| 'other'
| 'metadata';
url?: FormattedResource['url'];
}

Expand All @@ -27,6 +33,7 @@ export function useResourceCatalogs({
'abstract',
'collectionType',
'conditionsOfAccess',
'genre',
'name',
'url',
],
Expand Down Expand Up @@ -62,7 +69,7 @@ export function useResourceCatalogs({
conditionsOfAccess: catalog.conditionsOfAccess,
type: catalog['@type'],
name: catalog.name,
domain: 'iid',
domain: catalog.genre.toLowerCase() as ResourceCatalog['domain'],
url: catalog.url,
}));
},
Expand Down
2 changes: 1 addition & 1 deletion src/views/home/components/TableWithSearch/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const formatDomainName = (type: TableData['domain']) => {
} else if (type === 'generalist') {
return 'Generalist';
} else {
return type;
return type.charAt(0).toUpperCase() + type.slice(1);
}
};

Expand Down

0 comments on commit 7917a62

Please sign in to comment.