fasta_lake.metaproteomics#
fasta_lake.metaproteomics
#
Experimental metaproteomics transforms for declared measured-signal profiles.
These helpers do not infer taxa, resolve shared-protein origin or turn intensity into biomass/flux. They accept explicit annotations and experimental design.
Array/table backends: https://github.com/numpy/numpy and https://github.com/pandas-dev/pandas. Bray-Curtis uses SciPy pdist (https://github.com/scipy/scipy). Optional JIT uses Numba (https://github.com/numba/numba); profile accounting and permutation design are FastaLake code, not copied AlphaPeptTools implementations.
aggregate_terms
#
Split observed group signal equally across distinct declared functional terms.
matrix has reporting groups in rows and acquisitions in columns. annotations maps group IDs to term iterables at ONE level (e.g. KO). Missing/empty term lists retain signal in unannotated; unknown group keys fail. This is an explicit attribution convention, not evidence for equal enzyme contribution. Missing group cells contribute no observed signal; entirely empty acquisitions remain NaN. Return the term matrix and an acquisition-level coverage table.
Source code in fasta_lake/metaproteomics.py
relative_signal
#
Close observed signal to one per nonempty acquisition; preserve empty columns.
Unannotated signal remains in the denominator when supplied in the profile. These fractions describe measured signal, not absolute abundance or biomass.
Source code in fasta_lake/metaproteomics.py
diversity_summary
#
Return observed richness, Shannon entropy and effective Shannon diversity.
The unit is the supplied feature (KO, EC, reporting group, or explicit taxon), not automatically species. An empty acquisition has undefined diversity.
Source code in fasta_lake/metaproteomics.py
bray_curtis
#
Return a labelled Bray–Curtis distance matrix and explicitly excluded samples.
Default normalization compares composition; normalize=False compares observed signal magnitudes as well. Unmeasured feature cells contribute zero observed signal. Entirely empty acquisitions are excluded rather than assigned distances.
Source code in fasta_lake/metaproteomics.py
clr_complete
#
Return sample × feature natural-log CLR on the complete positive core.
No pseudocount or imputation is applied. All acquisitions must have some observed signal. Return transformed data and the excluded feature roster; this core can be much narrower than the full metaproteome.
Source code in fasta_lake/metaproteomics.py
permanova
#
One-way experimental PERMANOVA with optional within-block label permutations.
distances is a square DataFrame; labels and optional blocks are Series indexed by its exact acquisition roster. Unblocked permutations require independent, exchangeable units. Within-donor blocks test within-donor effects only: donor- constant conditions cannot be tested by shuffling within donors. Groups need at least two observations. This is an association test, not causality; assess dispersion differences separately. Numba accelerates only the numeric sum, with fastmath disabled and the same Python-generated seeded permutations.
Source code in fasta_lake/metaproteomics.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 | |