Skip to content

Commit 8ee0bef

Browse files
committed
funding now loaded dynamically from orchid api
1 parent 30fe2d5 commit 8ee0bef

File tree

6 files changed

+114
-171
lines changed

6 files changed

+114
-171
lines changed

src/content/config.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
import { defineCollection, z } from 'astro:content';
22
import { pmcLoader } from './loaders/pmc';
3+
import { fundingLoader } from './loaders/funding';
34

45
const publications_loaded = defineCollection({
56
loader: pmcLoader({
67
orcid: '0000-0002-8552-8976'
78
}),
89
});
910

11+
const funding_loaded = defineCollection({
12+
loader: fundingLoader({
13+
orcid: '0000-0002-8552-8976'
14+
}),
15+
});
16+
1017
export const collections = {
1118
publications_loaded,
19+
funding_loaded,
1220
};

src/content/loaders/funding.ts

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
import type { Loader, LoaderContext } from 'astro/loaders';
2+
import { z } from 'astro:content';
3+
4+
export function fundingLoader(options: { orcid: string }): Loader {
5+
return {
6+
name: 'funding-loader',
7+
schema: z.object({
8+
grants: z.array(z.object({
9+
duration: z.string(),
10+
name: z.string(),
11+
agency: z.string(),
12+
startYear: z.string(),
13+
url: z.string().optional(),
14+
}))
15+
}),
16+
load: async ({ store, logger }: LoaderContext) => {
17+
logger.info('Funding Loader starting');
18+
const ORCID_ID = options.orcid;
19+
const BASE_URL = `https://pub.orcid.org/v3.0/${ORCID_ID}/fundings`;
20+
21+
try {
22+
const response = await fetch(BASE_URL, {
23+
headers: {
24+
'Accept': 'application/vnd.orcid+json',
25+
'Content-Type': 'application/json'
26+
}
27+
});
28+
29+
if (!response.ok) {
30+
throw new Error(`HTTP error! status: ${response.status}`);
31+
}
32+
33+
const data = await response.json();
34+
logger.info(`Processing ${data['group'].length} funding entries`);
35+
36+
const grants = data['group'].map((group: any) => {
37+
const funding = group['funding-summary'][0];
38+
const startYear = funding?.['start-date']?.year?.value;
39+
const endYear = funding?.['end-date']?.year?.value;
40+
41+
if (!startYear) {
42+
logger.warn(`Skipping funding entry with missing start date`);
43+
return null;
44+
}
45+
46+
// Try to get URL from external-ids if main URL is not available
47+
const mainUrl = funding?.url?.value;
48+
const grantNumberUrl = funding?.['external-ids']?.['external-id']?.find(
49+
(id: any) => id['external-id-type'] === 'grant_number'
50+
)?.['external-id-url']?.value;
51+
52+
return {
53+
duration: endYear
54+
? `${startYear}-${endYear}`
55+
: `${startYear}-present`,
56+
name: funding?.title?.title?.value || 'Untitled Grant',
57+
agency: funding?.organization?.name || 'Unknown Agency',
58+
startYear: startYear,
59+
url: mainUrl || grantNumberUrl
60+
};
61+
}).filter(Boolean).sort((a: any, b: any) => b.startYear.localeCompare(a.startYear));
62+
63+
logger.info(`Successfully processed ${grants.length} grants`);
64+
65+
store.set({
66+
id: 'funding_loaded',
67+
data: {
68+
grants
69+
},
70+
body: '',
71+
});
72+
73+
logger.info('Finished loading funding data from ORCID');
74+
} catch (error) {
75+
logger.error(`Error fetching funding data: ${error}`);
76+
throw error;
77+
}
78+
},
79+
};
80+
}

src/content/loaders/pmc.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ export function pmcLoader(options: { orcid: string }): Loader {
108108
}
109109

110110
logger.info(`Processed ${data.resultList.result.length} publications`);
111-
logger.info(`All publications: ${JSON.stringify(allPublications, null, 2)}`);
112111
} catch (error) {
113112
logger.error(`Error fetching publications: ${error}`);
114113
break;

src/content/partners/partners.json

Lines changed: 0 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -88,172 +88,5 @@
8888
"name": "Oliver Stegle",
8989
"institution": "EMBL / DKFZ"
9090
}
91-
],
92-
"funding": [
93-
{
94-
"duration": "2024-2030",
95-
"name": "Functional cartography of intestinal host-microbiome interactions (CartoHostBug)",
96-
"agency": "European Research Council (Synergy Grant)"
97-
},
98-
{
99-
"duration": "2022-2026",
100-
"name": "CRC1550: Molecular Circuits of Heart Disease",
101-
"agency": "German Research Council (DFG)"
102-
},
103-
{
104-
"duration": "2022-2025",
105-
"name": "Dissecting fibrotic disease across major organs to identify common mechanisms for the development of therapeutics (CureFib)",
106-
"agency": "German Ministry of Education and Research (BMBF)"
107-
},
108-
{
109-
"duration": "2021-2026",
110-
"name": "DECIDER: Improved clinical decisions via integrating multiple data levels to overcome chemotherapy resistance in high-grade serous ovarian cancer",
111-
"agency": "European Union"
112-
},
113-
{
114-
"duration": "2021-2026",
115-
"name": "LiSyM-Krebs: Mechanism-based Multiscale Model to Dissect the Tipping Point from Liver Cirrhosis to Hepatocellular Carcinoma",
116-
"agency": "German Ministry of Education and Research (BMBF)"
117-
},
118-
{
119-
"duration": "2021-2025",
120-
"name": "Dissecting IgA nephropathy via integration of multi-omics data",
121-
"agency": "German Research Council (DFG)"
122-
},
123-
{
124-
"duration": "2021-2024",
125-
"name": "DeepSC2: Deep learning for single-cell genomics in cancer",
126-
"agency": "German Ministry of Education and Research (BMBF)"
127-
},
128-
{
129-
"duration": "2021-2023",
130-
"name": "Changes in the microbiome in PsA patients undergoing biologics therapy",
131-
"agency": "Centers for Personalized Medicine Baden-Württemberg"
132-
},
133-
{
134-
"duration": "2021",
135-
"name": "Analysis of essentiality in cancer using CRISPR-Cas9 screenings",
136-
"agency": "Sanofi"
137-
},
138-
{
139-
"duration": "2020-2026",
140-
"name": "MSCare-A Systems Medicine Approach to Stratification of Cancer Recurrence",
141-
"agency": "German Ministry of Education and Research (BMBF)"
142-
},
143-
{
144-
"duration": "2020-2024",
145-
"name": "Analysis of multi-omics and spatial transcriptomics data",
146-
"agency": "GSK"
147-
},
148-
{
149-
"duration": "2020-2021",
150-
"name": "BioDATEN : Bioinformatics DATa Environment",
151-
"agency": "Ministry of Science, Research and Art, Baden Wuerttemberg"
152-
},
153-
{
154-
"duration": "2020-2021",
155-
"name": "Single cell resolution of human chronic kidney disease for precision medicine in nephrology",
156-
"agency": "DFG German Research Council"
157-
},
158-
{
159-
"duration": "2020-2024",
160-
"name": "StrategyCKD: System omics to unravel the gut-kidney axis in Chronic Kidney Disease",
161-
"agency": "European Union H220-MSCA-ITN"
162-
},
163-
{
164-
"duration": "2020-2022",
165-
"name": "HPC Center of Excellence in Personalised Medicine – PerMedCoE",
166-
"agency": "European Union (H2020-EU.1.4.1.3)"
167-
},
168-
{
169-
"duration": "2019-2022",
170-
"name": "individualizedPaediatricCure: Cloud-based virtual-patient models for precision paediatric oncology",
171-
"agency": "European Union H2020 Health"
172-
},
173-
{
174-
"duration": "2019-2022",
175-
"name": "LaMarcK: Longitudinal Multiomics Characterization of disease using prior Knowledge",
176-
"agency": "German Ministry of Education and Research (BMBF)"
177-
},
178-
{
179-
"duration": "2019-2022",
180-
"name": "Validating microfluidics-based personalized cancer therapy in mouse models",
181-
"agency": "DFG German Research Council"
182-
},
183-
{
184-
"duration": "2018-2028",
185-
"name": "Informatics for Life",
186-
"agency": "Klaus-Tschira Stiftung"
187-
},
188-
{
189-
"duration": "2017-2021",
190-
"name": "TransQST: Translational quantitative systems toxicology to improve the understanding of the safety of medicines",
191-
"agency": "EU IMI Innovative Medicines Initiative"
192-
},
193-
{
194-
"duration": "2017-2018",
195-
"name": "Analysis of mass spectrometry proteomics and drug treatment",
196-
"agency": "OncoSignature/Acrivon"
197-
},
198-
{
199-
"duration": "2016-2020",
200-
"name": "LiSym: Liver systems medicine",
201-
"agency": "BMBF"
202-
},
203-
{
204-
"duration": "2016-2019",
205-
"name": "SYS4MS: Personalizing health care in Multiple Sclerosis using sytems medicine tools",
206-
"agency": "BMBF"
207-
},
208-
{
209-
"duration": "2016-2018",
210-
"name": "PrECISE: Personalized engine for Cancer integrative study and evaluation",
211-
"agency": "EU H2020 Health"
212-
},
213-
{
214-
"duration": "2016-2018",
215-
"name": "CPTAC DREAM Challenge",
216-
"agency": "National Cancer Institute (USA)"
217-
},
218-
{
219-
"duration": "2015-2019",
220-
"name": "Joint Research Center for Computational Biomedicine",
221-
"agency": "Bayer AG"
222-
},
223-
{
224-
"duration": "2015-2018",
225-
"name": "SyMBioSys : Systematic Models for Biological Systems Engineering Training Network",
226-
"agency": "EU H2020 Health MSCA-ITN"
227-
},
228-
{
229-
"duration": "2014-2016",
230-
"name": "Novel Target Identification Through Genome-Scale CRISPR-Cas9 Knockout Screening in Human Cancer Cell Lines",
231-
"agency": "Center for Therapeutic Target Validation"
232-
},
233-
{
234-
"duration": "2014-2016",
235-
"name": "Target identification and validation using pathway activities derived from functional genomics data",
236-
"agency": "Center for Therapeutic Target Validation"
237-
},
238-
{
239-
"duration": "2013-2014",
240-
"name": "CombiMS: a novel drug discovery method based on systems biology: combination therapy and biomarkers for Multiple Sclerosis",
241-
"agency": "EU H2020 Health"
242-
},
243-
{
244-
"duration": "2012-2015",
245-
"name": "BioPreDyn: New Bioinformatics Methods and Tools for Data-Driven Predictive Dynamic Modelling in Biotechnological Applications",
246-
"agency": "EU H2020 Health"
247-
},
248-
{
249-
"duration": "2012-2014",
250-
"name": "Understanding drug mode of action via statistical integration of functional genomic studies and literature-derived signalling networks",
251-
"agency": "Medical Research Council (UK)"
252-
},
253-
{
254-
"duration": "2011-2012",
255-
"name": "Analysis of mass spectrometry phosphoproteomics data in the context of insulin signal processing and functional alterations thereof",
256-
"agency": "Sanofi"
257-
}
25891
]
25992
}

src/content/team/team.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
},
217217
{
218218
"name": "Nicolàs Palacio",
219-
"role": "Bioinformatician",
219+
"role": "Staff Scientist",
220220
"description": "After obtaining my BSc in Biotechnology at the Universitat of Girona, I​​ acquired a MSc in Mathematical modeling for Science and Engineering at the Universitat Autònoma de Barcelona. During those years I closely worked with Prof. Dr. Garcia-Ojalv​​o in the mathematical modeling of complex biological systems.Then I moved to Germany, where I started my PhD in Computational Biomedicine at the​​ Ruprecht-Karls-Universität Heidelberg, led by Prof. Dr. Saez-Rodriguez, where I developed extensive data analysis skills. After graduating, I worked as a postdoctoral researcher at EMBL and DKFZ for Prof. Dr. Krijgsveld, where I analyzed complex mass spectrometry proteomic data sets. Currently I am working as a Bioinformatician at the Institute of Computational Biomedicine at the Universitätsklinikum Heidelberg.",
221221
"research_interests": "I am mainly interested in the description and understanding of complex biological systems from a physical/mathematical point of view. I am passionate about programming and the development of bioinformatic tools and resources that can be useful for the scientific community and the research and development of new biological and medical insights.",
222222
"professional_career": [

src/pages/partners.astro

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
import Layout from '../layouts/Layout.astro';
33
import partnersData from '../content/partners/partners.json';
4+
import { getCollection } from 'astro:content';
45
import { Separator } from '../components/ui/separator';
56
import {
67
Table,
@@ -11,6 +12,15 @@ import {
1112
TableHeader,
1213
TableRow,
1314
} from '../components/ui/table';
15+
16+
const fundingData = await getCollection('funding_loaded');
17+
const grants = (fundingData[0]?.data.grants || []) as Array<{
18+
duration: string;
19+
name: string;
20+
agency: string;
21+
startYear: string;
22+
url?: string;
23+
}>;
1424
---
1525

1626
<Layout title="Partners">
@@ -55,11 +65,24 @@ import {
5565
</TableRow>
5666
</TableHeader>
5767
<TableBody>
58-
{partnersData.funding.map((grant) => (
68+
{grants.map((grant) => (
5969
<TableRow>
6070
<TableCell>{grant.agency}</TableCell>
6171
<TableCell>{grant.duration}</TableCell>
62-
<TableCell>{grant.name}</TableCell>
72+
<TableCell>
73+
{grant.url ? (
74+
<a
75+
href={grant.url}
76+
target="_blank"
77+
rel="noopener noreferrer"
78+
class="text-primary hover:underline"
79+
>
80+
{grant.name}
81+
</a>
82+
) : (
83+
grant.name
84+
)}
85+
</TableCell>
6386
</TableRow>
6487
))}
6588
</TableBody>

0 commit comments

Comments
 (0)