CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

What this is

The B2SLab (Bioinformatics and Biomedical Signals Laboratory, UPC Barcelona) website. It is a Quarto website rendered to static HTML and deployed to b2slab.upc.edu. All content is written in Quarto Markdown (.qmd) with embedded R code for dynamic content.

Commands

# Build the site locally
quarto render

# Preview with live reload
quarto preview

# Build and deploy to production server (requires SSH access to b2slab.upc.edu)
bash deploy.sh

# Deploy and send Mattermost notification
bash deploy.sh --notify

Build output goes to _site/ (gitignored). The .quarto/ directory holds freeze cache.

Architecture

Content structure

  • index.qmd — homepage
  • team/index.qmd — current team listing (calls team/functions.R → fetches from Google Sheets)
  • team/<member-name>/index.qmd — individual member pages with embedded R that fetches publications from futur.upc.edu as a RIS file
  • publications/index.qmd — group-wide publication list (calls R/getpapers.R)
  • blog/posts/<YYYYMMDD_slug>/index.qmd — blog posts
  • software/, projects/ — static pages describing tools and research projects

R machinery for publications

R/getpapers.R provides two rendering functions used in .qmd files: - paperstohtmlnodiv(ris_url) — compact list for personal pages - paperstohtmlnodivlong(ris_url) — collapsible-by-year list for the group publications page

Both functions download a RIS file from futur.upc.edu, parse it with revtools, look up missing DOIs via CrossRef API, and emit raw HTML via cat(). Results are cached in doi_cache.json (gitignored).

team/functions.R provides CreateTeamSet(status) — fetches team member data and profile photos from a private Google Spreadsheet via googlesheets4/googledrive, requiring interactive Google auth (drive_auth()).

Adding a team member page

Create team/<kebab-case-name>/index.qmd following the pattern in team/alexandre-perera-lluna/index.qmd. The publications section sources ../../R/getpapers.R and calls paperstohtmlnodiv(ris_url) with a futur.upc.edu RIS export URL.

Site configuration

_quarto.yml controls the full site: navbar, sidebars, footer, theme (light: pulse / dark: slate), and Google Analytics. The _extensions/ directory holds the shinylive and base64 Quarto extensions.

RIS files

publications.ris files (in publications/, team/*/) are gitignored — they are downloaded at render time from futur.upc.edu. The tracked RIS files in team/*/publications.ris that appear in git status are exceptions managed manually.