Skip to content

Added fixtures - #1419

Merged
gaow merged 4 commits into
StatFunGen:mainfrom
jaempawi:rss-ld-sketch-mirror-pair-gat
Sep 1, 2026
Merged

Added fixtures#1419
gaow merged 4 commits into
StatFunGen:mainfrom
jaempawi:rss-ld-sketch-mirror-pair-gat

Conversation

@jaempawi

@jaempawi jaempawi commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

Updates fixture metadata and documentation across four commits and six files.

Workflow builder fixtures

  • Corrects mnm_regression, whose outputs were mistakenly listed as inputs.
  • Fills missing inputs or outputs for seven modules: colocboost, RNA_calling, apa_calling, ld_prune_reference, mash_posterior, rss_ld_sketch, and snRNAseq_preprocessing.
  • Updates FXWF so workflow-filtered panels render correctly.
  • Verifies every declared fixture path exists.

All 41 non-WIP modules now declare inputs and outputs. METAL, qr_and_twas, and watershed remain empty because they have no fixtures and are marked under development.

Fixture layouts remain inconsistent and should be standardized separately.

Multicontext mnm_regression fixture

Adds a generated joint-fit fixture and regeneration notes:

tests/fixtures/mnm_regression/expected/
  protocol_example.ENSG00000283047.multicontext_bvsr.rds
  README.md

The README records three corrections to the documented command:

  • Use --prior, not --mixture-prior.
  • Pass --transpose-covariates True.
  • Run qtl_dataset_construct+mnm; mnm cannot run alone.

The fixture uses mixture_prior.EE.prior.rds. Because no test currently drives mnm, it documents the expected shape rather than serving as an asserted comparison.

Documentation

  • Adds a README table summarizing analysis stages and methods.
  • Adds “Using your own data” guidance covering common parameters and matching sample identifiers across genotype, phenotype, and covariate files.

Reviewer note

Most changed lines come from long embedded notebook data maps; the substantive notebook changes are to FIXTURES and FXWF. The branch name predates and does not describe this work.

Anak Empawi added 4 commits August 24, 2026 13:37
Two gaps a new reader hits:

- the home page said what the protocol is for and how it is built, but never
  which methods it implements. A reader had to click through the sidebar to
  discover TensorQTL, MASH, SuSiE, ColocBoost, cTWAS or S-LDSC. Adds a table of
  the seven analysis stages, with the workflow builder offered as the way to
  narrow them down.

- Environment Setup took a reader from nothing to a working run on the committed
  fixtures, then stopped at the point they need most: swapping those paths for
  their own study. Adds a section covering the parameters most modules expect
  (--genoFile, --phenoFile, --covFile, --region-list, --cwd), the requirement
  that sample identifiers match across all three input files, and how to find a
  known-good parameter set from a module test.

Parameter names verified against the notebooks rather than assumed: --phenoFile
appears 171 times, --genoFile 141, --covFile 66, --region-list 60.
The FIXTURES entry for mnm_regression listed univariate_bvsr.rds and
univariate_twas_weights.rds as inputs, with outputs empty. Both are what
susie_twas produces -- they live under expected/ -- so the page told readers that
fine-mapping consumes a fine-mapping result.

Inputs are now the upstream products the test actually passes:

  protocol_example.genotype.chr22.bed          from genotype_formatting
  protocol_example.pheno_manifest_context.tsv  from phenotype_formatting
  example_covariates.tsv                       from covariate_preprocessing
  association_windows.bed                      from generalized_TADB

and the two .rds files move to outputs.

Note the covariate fixture is example_covariates.tsv, not
protocol_example.covariates.tsv -- the convention would suggest the latter but it
does not exist; taken from the covFile argument in test_mnm_regression.py.

FXWF needed the same four keys, otherwise the Input section renders empty: it
filters files by workflow, and these entries carry no data-wf because the
workflow comes from the method chooser. Set to * so they show for every method.

All six paths verified present on disk before writing, and the rendered bubble
checked.
One module had no inputs listed and six had no outputs, so their I/O panels were
half empty even though the fixtures were committed. Every path added is verified
to exist on disk, and each was taken from what the module test actually passes or
compares against.

  colocboost              inputs from qtl_mini; expected/ colocboost.rds
  mash_posterior          input from tests/fixtures/mash; three expected .rds
  ld_prune_reference      genotype .bed and .ld_genotype.list; LD_pruned_variants
  rss_ld_sketch           chr22 vcf and ld_blocks.bed; afreq and event_id tsv
  snRNAseq_preprocessing  id_mapping.csv and seurat_ref_SE.rds
  RNA_calling             fastq list and adapters; six expected outputs
  apa_calling             3UTR bed and gtf; four expected_* files

FXWF gained the same keys, otherwise the sections render empty: it filters files
by workflow, and these entries take their workflow from the method chooser rather
than a data-wf attribute.

Fixture layout is inconsistent across modules, which is why several of these were
missed at first: some use an expected/ subdirectory, apa_calling uses an
expected_* prefix in the module directory, and mash_posterior has no marker at
all. Worth standardising.

The two multivariate mnm_regression entries still show no expected output. No
multicontext fixture is committed and none exists in output/ to subset; the step
has no test either. Left empty rather than showing univariate results under a
multivariate heading.
The two multivariate builder entries showed no expected output: no multicontext
fixture was committed and none existed in output/ to subset. Generated by running
the step on the committed toy data.

  tests/fixtures/mnm_regression/expected/
    protocol_example.ENSG00000283047.multicontext_bvsr.rds   334 KB

A genuine joint fit, not a reshaped univariate result: method is mvsusie and it
carries a jointContexts column the per-context object lacks.

Three errors in the documented command surfaced while getting it to run, all
recorded in the new expected/README.md with the working invocation:
  - the parameter is --prior, not --mixture-prior
  - --transpose-covariates True is required; without it the run fails with
    No shared samples between phenotype and covariate file
  - mnm cannot run alone; it needs qtl_dataset_construct+mnm

Caveats also in the README: the mixture prior was a choice between
mixture_prior.EE.prior.rds and prior.cov_ed.EE.rds, and no test drives the mnm
step, so this documents the expected shape rather than an asserted comparison.
@gaow
gaow merged commit ba4119e into StatFunGen:main Sep 1, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants