Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ examples/output
# Sample data files
examples/example_data/*.ipc
examples/example_data/*.csv
examples/example_data/*.mgf
examples/example_data/*.parquet

build/
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,21 +129,22 @@ set-gcp-credentials:
## Run winnow train with sample data
train-sample:
uv run winnow train \
dataset.spectrum_path_or_directory=examples/example_data/spectra.ipc \
dataset.spectrum_path_or_directory=examples/example_data/spectra.mgf \
dataset.predictions_path=examples/example_data/predictions.csv \
model_output_dir=models/new_model \
dataset_output_path=results/metadata.csv \
dataset_output_path=results/calibrated_dataset.csv \
calibrator.features.retention_time_feature.train_fraction=0.3 \
calibrator.features.retention_time_feature.min_train_points=2 \
calibrator.hidden_layer_sizes="[32, 16]" \
calibrator.early_stopping=false \
calibrator.max_iter=100 \
calibrator.max_iter=100

## Run winnow predict with sample data (uses locally trained model from models/new_model)
predict-sample:
uv run winnow predict \
calibrator.pretrained_model_name_or_path=models/new_model \
fdr_control.fdr_threshold=1.0 \
dataset.spectrum_path_or_directory=examples/example_data/spectra.ipc \
dataset.spectrum_path_or_directory=examples/example_data/spectra.mgf \
dataset.predictions_path=examples/example_data/predictions.csv

## Clean output directories (does not delete sample data)
Expand Down
6 changes: 3 additions & 3 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ uv pip install winnow-fdr

## Quick Start

Use the example HeLa single-shot subset in `examples/example_data/` (`spectra.ipc`, `predictions.csv`) which represents real instrument data and InstaNovo predictions.
Use the example HeLa single-shot subset in `examples/example_data/` (`spectra.mgf`, `predictions.csv`) which represents real instrument data and InstaNovo predictions.

```bash
# Train a calibrator on the example subset
Expand Down Expand Up @@ -105,7 +105,7 @@ Compute calibration features and write one enriched metadata CSV. Uses the same
winnow compute-features

# Paths and output file
winnow compute-features dataset.spectrum_path_or_directory=data/spectra.ipc dataset.predictions_path=data/preds.csv dataset_output_path=results/features.csv
winnow compute-features dataset.spectrum_path_or_directory=data/spectra.parquet dataset.predictions_path=data/preds.csv dataset_output_path=results/features.csv

# De novo spectra (no ground truth): labelled=false; remove retention_time_feature if present
winnow compute-features labelled=false '~calibrator.features.retention_time_feature'
Expand Down Expand Up @@ -170,7 +170,7 @@ Setting `label_column` while `label_source=sequence` (or omitting `label_column`
```bash
# Sequence-derived labels (full match of sequence vs prediction)
winnow diagnose-calibration diagnostics.label_source=sequence \
dataset.spectrum_path_or_directory=holdout/spectra.ipc \
dataset.spectrum_path_or_directory=holdout/spectra.mgf \
dataset.predictions_path=holdout/preds.csv

# Pre-computed labels (e.g. proteome mapping done offline)
Expand Down
8 changes: 4 additions & 4 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ defaults:

dataset:
# Path to the spectrum data file or to folder containing saved internal Winnow dataset
spectrum_path_or_directory: data/spectra.ipc
spectrum_path_or_directory: data/spectra.mgf
# Path to the beam predictions file
# Leave as null if data source is winnow, or loading will fail
predictions_path: data/predictions.csv
Expand Down Expand Up @@ -149,7 +149,7 @@ defaults:
- data_loader: instanovo

dataset:
spectrum_path_or_directory: data/spectra.ipc
spectrum_path_or_directory: data/spectra.mgf
predictions_path: data/predictions.csv

dataset_output_path: results/metadata.csv
Expand Down Expand Up @@ -361,7 +361,7 @@ defaults:

dataset:
# Path to the spectrum data file or to folder containing saved internal Winnow dataset
spectrum_path_or_directory: data/spectra.ipc
spectrum_path_or_directory: data/spectra.mgf
# Path to the beam predictions file
# Leave as null if data source is winnow, or loading will fail
predictions_path: data/predictions.csv
Expand Down Expand Up @@ -438,7 +438,7 @@ defaults:
- data_loader: instanovo

dataset:
spectrum_path_or_directory: examples/example_data/spectra.ipc
spectrum_path_or_directory: examples/example_data/spectra.mgf
predictions_path: examples/example_data/predictions.csv

calibrator:
Expand Down
2 changes: 1 addition & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Quick start with example data

Try `winnow` in minutes using the bundled example subset under `examples/example_data/`: spectra (`spectra.ipc`) and de novo predictions (`predictions.csv`) from a real HeLa single-shot run, reduced for repository size.
Try `winnow` in minutes using the bundled example subset under `examples/example_data/`: spectra (`spectra.mgf`) and de novo predictions (`predictions.csv`) from a real HeLa single-shot run, reduced for repository size.

```bash
# Train a calibrator
Expand Down
202 changes: 101 additions & 101 deletions examples/example_data/predictions.csv

Large diffs are not rendered by default.

Binary file removed examples/example_data/spectra.ipc
Binary file not shown.
Loading
Loading