Skip to content

Commit

Permalink
Merge branch 'use-genre' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
candicecz committed May 31, 2024
2 parents c20ba7b + e72478b commit 0540205
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 19 deletions.
30 changes: 15 additions & 15 deletions configs/repositories.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,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 @@ -39,7 +39,7 @@
{
"id": "ClinEpiDB",
"label": "ClinEpiDB",
"genre": ["clinical", "epidemiology"],

"icon": "/assets/resources/clinepi.jpeg",
"imageURL": "/assets/resources/clinepi.jpeg",
"isNIAID": true,
Expand Down Expand Up @@ -105,23 +105,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 @@ -130,7 +130,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 @@ -151,7 +151,7 @@
{
"id": "MicrobiomeDB",
"label": "MicrobiomeDB",
"genre": ["omics"],

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

"icon": "/assets/resources/geo.gif",
"imageURL": "/assets/resources/geo.gif",
"type": "generalist"
Expand All @@ -175,7 +175,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 All @@ -191,7 +191,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 @@ -207,7 +207,7 @@
{
"id": "Qiita",
"label": "Qiita",
"genre": ["omics"],

"icon": "/assets/resources/qiita.png",
"imageURL": "/assets/resources/qiita.png",
"type": "iid"
Expand All @@ -216,15 +216,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 @@ -233,7 +233,7 @@
{
"id": "VEuPathDB",
"label": "VEuPathDB",
"genre": ["omics"],

"icon": "/assets/resources/veupathdb-icon.jpg",
"imageURL": "/assets/resources/VEuPathDB.png",
"isNIAID": true,
Expand All @@ -242,7 +242,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 0540205

Please sign in to comment.