Repository navigation
v0.4.1
Added
mm.pp.calculate_missingness. Records, per feature, the number and ratio of samples
without a value (var["n_missing"],var["missing_ratio"]) and, withgroup_obs, a
missing_ratio_<level>per group, counting absent and stored-NaN cells of a sparse.Xalike.
Decoys receive0/0.0, so a "missing at most" filter keeps them and the q-value counts stay
intact. This replaces the hand-writtento_df().isna().sum()anddropna(how="all")steps, which
provenance could not record; the processing tutorial now drops empty features through it.mm.dt.save_layerandmm.dt.load_layer.save_layercopies a modality's.Xinto a
named layer andload_layercopies a layer back into.X. Both are recorded in provenance,
keep dense and sparse matrices as they are, and leave the source and destination independent.
An existing layer is not overwritten unlessoverwrite=True, and a backedMuDatais rejected
with a clear error. The PTM tutorial takes its unadjusted snapshot withsave_layer.mm.dt.dropdeletes table columns and mapping entries. Besidesunsentries,dropnow
removesobs/varcolumns, DataFrame columns insideobsm/varm, and entries of global or
modalityobsm/varmmappings, recording only the target and key for replay._logand the
global modality masks are protected; removing samples or features remains the job of
pp.apply_filter, which keeps the aligned axes consistent.mm.dtedits the decoy table.dt.assignacceptson="decoy", and the table path
<modality>.decoyaddressesuns["decoy"]indt.map,dt.replaceanddt.drop, so the
columns a variable filter needs on both targets and decoys are recorded in provenance instead
of being written by hand.pp.add_filternow refuses a variable filter whose column is missing
from the decoy table with a message that names these calls, instead of a bareKeyError. The
processing tutorial carries the cell annotation onto the PSMvarand decoy table withdt.map.
Changed
import msmutakes about a third of the time.umap-learnandinmooseare imported when
tl.umap,pp.correct_batch_effect(method="combat")or the limma engine run, not when the package
is imported; on a laptopimport msmudrops from about 5.7 s to 1.7 s.polars, a required
dependency, is imported at module level in the readers instead of inside each function, and SDRF
validation no longer describessdrf-pipelinesas an optional package -- it is a required
dependency, so theImportErrorbranch is gone.- Median polish returns
NaNwhere samples cannot be compared. Breaking for values:
to_protein(agg_method="median_polish")andto_ptm(its default rollup) now leave a sample
NaNwhen none of the group's features observed in that sample is observed in at least one
other sample and, when the observed samples split into groups that share no feature, keep the
largest group and leave the othersNaN(every sample when groups tie for largest). Any two
non-NaNvalues of a feature are therefore on one common scale, and their differences are
those ofmedpolishon the features observed in more than one sample; previously such samples
were placed on the group's overall level, which reads as "unchanged". Groups whose every
feature is observed in at least two samples are unaffected. to_proteinuses every unique peptide by default. Breaking for callers that relied on
the implicittop_n=3: passtop_n=3to keep the cut. The docstring already statedNone;
the default now matches it. A top-N cut ranks on aNaN-skipping median and so favours
peptides observed in few samples, which are the ones median polish cannot compare.
Fixed
- Median polish no longer flattens the difference between samples when most peptides are
observed in one sample. A peptide observed in a single sample has a zero residual by
construction and used to vote "no difference" in that sample's column median; with such
peptides in the majority (e.g. 1 vs 1 LFQ without match-between-runs) both samples collapsed
onto the overall level and the protein reported a log2 fold change of exactly 0. Those
peptides now set the protein level only; the between-sample difference comes from the peptides
observed in more than one sample.
Merged pull requests
What's Changed
- BID-321 Extend dt.drop to tables and axis mappings by @jlthepi in #47
- BID-329 Add recorded layer save and load operations by @jlthepi in #48
- BID-330 Leave samples that share no peptide NaN in median polish and use every peptide by default by @hyungwookc07 in #49
- BID-331 Import umap and inmoose on use and settle the lazy-import rule by @hyungwookc07 in #50
- BID-332 Keep the largest comparable group in median polish and fit single-sample peptides after the sweeps by @hyungwookc07 in #51
- BID-333 Release MSMU 0.4.1 by @hyungwookc07 in #52
- BID-335 Record decoy-table column edits through dt and explain missing decoy columns in add_filter by @hyungwookc07 in #54
- BID-336 Add pp.calculate_missingness to record per-feature missing counts in var and on the decoys by @hyungwookc07 in #55
- BID-333 Release MSMU 0.4.1 by @hyungwookc07 in #56
Full Changelog: v0.4.0...v0.4.1