Skip to content

MaayanLab/gsfm-predictions

Repository files navigation

GSFM Predictions

A website for the gene set foundation model.

For the GSFM model code, see this repo.

Development

This app uses Next.js, a framework for jointly developing the server side and client side of a web application using react and server side rendering.

Additionally, we use Kysely, a type-safe API for making SQL database queries. It's not quite an ORM, it focuses on enabling you to write SQL and get type-safe results for improved developer experience.

Finally, we use tRPC, a mechanism for building type-safe APIs. You write the server-side routes and can query them client-side, preserving type safety.

Getting Started

cp .env.example .env
# configure POSTGRES_PASSWORD/DATABASE_URL in .env

# create db
docker compose up -d postgres
npx kysely migrate:latest

# start app in development
npm i
npm run codegen
npm run dev

Prepare models for augment feature

# export models from huggingface to onnx for inference from NodeJS
python scripts/prepare_model.py

Ingest

# todo explain how to assemble deepdive descriptions
#  (you can download what we've prepared from https://gsfm.maayanlab.cloud/downloads)
# see the gsfm repo for how to generate the site-predictions directory
python scripts/ingest.py genes --preds ../gsfm/data/site-predictions/
python scripts/ingest.py predictions --preds ../gsfm/data/site-predictions/