Bench harness + obs_mobility unit fix#65
Open
jspaezp wants to merge 41 commits into
Open
Conversation
…ypes, test tightening)
Adds resolve_dbs() that turns a list of --db spec strings into one concatenated FASTA on disk (local, S3, UniProt proteome/accession). Individual accession specs are coalesced into a single batched HTTP call. Adds bench/_s3.py wrapping aws s3 cp for download/upload/upload-dir.
ruff reformatted 6 bench/ files (magic trailing comma, line-length normalisation).
…s, --force to override)
…ent metadata Replace fasta/entrapment_fasta with target_peptides/entrapment_peptides plus entrapment_ratio, entrapment_mode (foreign|shuffled), and pairing fields. Adds cross-field consistency validation and has_pairing() helper on Fixture.
… update gt20peps fixture
obs_mobility was computed by adding the percent-of-ref mobility error back to ref_mobility, giving values biased ~50% high. avg_delta_mobs now converts pct -> absolute via ref_mobility/100 before feeding the collector, so obs_mob = ref + abs_delta is dimensionally correct. delta_ms1_ms2_mobility likewise switched to absolute 1/k0 units. Side cleanups in offsets.rs: - weighted_ms1 NaN gate was checking mz_error_ppm only, poisoning the mobility accumulator (or dropping valid mobility) on mismatched NaNs. Now gates each dimension independently. - magic .take(3) on FRAGMENT_TOP_N=7 named as FRAGMENT_OBS_MOB_TOP_N. - renamed shadow mz/mob in with_sorted_offsets to ms1_mob/ms2_mob. supersimpleprediction refit on hela_iccoff_gt20peps (34k IDs, holdout MAPE 1.36% vs prior 1.83% claim) using scripts/refit_mobility.py.
stage_fixture emitted relative paths (bench_out/cache/...) into the staged TOML, which then failed the schema validator that requires s3:// or absolute local paths. Now resolves to absolute via dst.resolve() on both _stage_one_file and _stage_one_dir. Also guards target_peptides for the gt20peps fixture (target_peptides is optional since e6339f4 but stage still unconditionally tried to download it). wandb_bench grew a _materialize_uri helper used in the entrapment block so target_peptides / entrapment_peptides / pairing pass through when already local instead of erroring out of s3_download_file. scripts/stage_gt20.sh: one-shot wrapper for the gt20peps fixture.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan