Publish per-record links (bugphyzz_records.csv.gz)

Aperta
#116 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
22/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
data

Direzione di ricerca

This is a proposal awaiting feedback (bugsigdb-app#2 and #113) rather than a task to start. Read sources/sheets/ and the existing export scripts to see how attribute_sources.tsv and the CC BY-SA header are produced, then build a script that emits bugphyzz_records.csv.gz keyed on NCBI_ID, Attribute and Attribute_source, one row per link. Expect to verify each source parser against the audit table in the issue, and check the output size before committing since the CSVs are in LFS.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Waiting on feedback on seandavi/bugsigdb-app#2 before starting. #113 (the sheet snapshot) is done.

waldronlab/bugphyzz#305 moves the curation sheets into this repo as sources/sheets/<physiology>.csv, so the export doesn't need to snapshot them: for sheet rows, Record_url links to the line in that file at the release tag.

The export names the source of each curated value but not the record behind it. I audited every source in the current export for a per-row identifier we can turn into a link:

Source Export rows Identifier Link Verdict
NCBI_RefSeq 223,865 GCF accession at the start of Note (100%) https://www.ncbi.nlm.nih.gov/datasets/genome/{GCF}/ record link
BacDive 47,447 BacDive_ID in bacdive.csv.gz; BacDive-ID n in Note for gc, length, width (100%) https://bacdive.dsmz.de/strain/{id} record link
Madin_2020 41,164 none (only gold, genbank etc. and "n of m records") citation only
Wikipedia_2026 24,592 oldid URL in Note (about 98% match a strict pattern; parse the prefix) as given record link
Bergeys_2026 14,569 chapter DOI at the start of Note, sometimes followed by "; optimum" https://doi.org/{doi} record link
The Microbe Directory 12,596 none citation only
ProTraits 7,142 none (Genome_ID, Accession_ID, Note empty) citation only
Kegg 5,976 none in the sheet, but 98% match a KEGG genome by NCBI taxid (80 rows match more than one) https://www.kegg.jp/entry/{T number} lookup table from rest.kegg.jp
BacMap 5,841 RefSeq accession in Accession_ID (95%), often several per row (plasmids) https://www.ncbi.nlm.nih.gov/nuccore/{acc} record link via NCBI; BacMap's own pages need a lookup table and its certificate is expired
MiDAS 792 FL-ASV ID in Note no verified per-record page citation only for now
Browne_2021 706 Genome_ID (GCA/GCF, 66%) or ERR runs in Accession_ID (34%, ";"-separated) NCBI Datasets genome page, ENA run page record link, can be several
Microbial Fatty Acid Compositions 370 none citation only
PATRIC 131 PATRIC_ID in the antimicrobial resistance sheet, sources/sheets/antimicrobial_resistance.csv after #113 (100%) https://www.bv-brc.org/view/Genome/{id} record link
Asnicar_2021, Gibson_2018, Barcenilla_2000, OlsenI_2001, HeaverS_2018, Hilt_2014 167 none per row; the paper itself is the record DOI or PMID from attribute_sources.tsv citation only (paper link)

Rows with Attribute_source NA (95,735; evidence asr or tax) are inferred and have no record. Counts are from the devel export of 2026-11-22; percentages are from the source and sheet files, not a join to the export.

Example, Akkermansia:

Proposal: a script here writes bugphyzz_records.csv.gz with NCBI_ID, Attribute, Attribute_source, Record_url, one row per link, with the same CC BY-SA header as the other exports. It reads sources/ only, so it doesn't need the ASR run.

  • Key: NCBI_ID, the physiology the file belongs to (the export's Attribute), and the source. No value matching needed. Watch case (Genome size vs genome size).
  • Several links per key are expected (BacMap plasmids, Browne runs, KEGG genomes, and BacDive strains: 784 of 13,935 gc content taxa have more than one, and we can't tell which strain's value the export kept). The app should present them as "records for this taxon from this source", not "the record behind this value".
  • Drop placeholder IDs (Unknown, unknown, NA), which are common in the sheets.
  • Where a row has no external ID, fall back to the line in the release, e.g. https://github.com/waldronlab/bugphyzzExports/blob/v1.2.0/sources/sheets/arrangement.csv?plain=1#L123. Use the release tag rather than a commit hash, since the records file can't contain the hash of its own commit.
  • Some links point to a genome, not to the record the trait came from: RefSeq (one reference assembly per species), KEGG (chosen by taxid), Browne (genome or sequencing run). Label them as genomes in the app.
  • KEGG needs a small lookup table from https://rest.kegg.jp, saved with its date. BacMap pages need a similar table, but only after BacMap renews its certificate; until then use NCBI.

Check the size before committing; the main CSVs are already 6, 16 and 37 MB in LFS.

🤖 Drafted with Claude Code

Lingua principale
R
Stelle
1
Fork
1
Merge medio
2h
PR unite (30g)
34

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di waldronlab/bugphyzzExports

Tutte le issue di waldronlab/bugphyzzExports

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.