[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EG5TR8F89WYKCSH3S67M5P":3,"skill-same:01M7EG5TR8F89WYKCSH3S67M5P":68},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":14,"repositoryHtmlUrl":33,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":35,"install":36,"resources":49},"01M7EG5TR8F89WYKCSH3S67M5P","bio-temporal-genomics-trajectory-modeling",null,"Models continuous temporal trajectories from BULK or time-resolved omics where the x-axis is measured experimental time: penalized GAMs (mgcv) for smooth trends and changepoint detection (segmented, ruptures) for abrupt regime shifts. Use when deciding between a smooth GAM and a changepoint model; choosing the GAM distribution (nb() plus a library-size offset for raw counts vs Gaussian on vst\u002Flog-CPM); setting the basis-dimension ceiling k below the number of timepoints and letting REML pick wiggliness; handling residual autocorrelation across timepoints with corAR1\u002Fbam(rho=); testing whether two conditions' trajectories diverge with an ordered-factor difference smooth; and choosing a changepoint search\u002Fcost\u002Fpenalty (Pelt\u002FBinseg, l2\u002Frbf). Not for single-cell pseudotime (see single-cell\u002Ftrajectory-inference).","Mr-Nobody-Anonymous\u002FAll-skills","Mr-Nobody-Anonymous","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184253119?v=4","01M7AEXFJHKTYQW5R0ZCQQTWFV","anonymous","01M7C00M3GQR4QKP9GZA42GFAK",0,"MIT","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-temporal-genomics-trajectory-modeling\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: bio-temporal-genomics-trajectory-modeling\ndescription: >-\n  Models continuous temporal trajectories from BULK or time-resolved omics where the x-axis is measured experimental time: penalized GAMs (mgcv) for smooth trends and changepoint detection (segmented, ruptures) for abrupt regime shifts. Use when deciding between a smooth GAM and a changepoint model; choosing the GAM distribution (nb() plus a library-size offset for raw counts vs Gaussian on vst\u002Flog-CPM); setting the basis-dimension ceiling k below the number of timepoints and letting REML pick wiggliness; handling residual autocorrelation across timepoints with corAR1\u002Fbam(rho=); testing whether two conditions' trajectories diverge with an ordered-factor difference smooth; and choosing a changepoint search\u002Fcost\u002Fpenalty (Pelt\u002FBinseg, l2\u002Frbf). Not for single-cell pseudotime (see single-cell\u002Ftrajectory-inference).\ntool_type: mixed\nprimary_tool: mgcv\nsource: \"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills\"\nsource_repository: \"GPTomics\u002FbioSkills\"\nsource_path: \"temporal-genomics\u002Ftrajectory-modeling\u002FSKILL.md\"\nlicense: \"MIT\"\nimported_at: \"2026-09-20\"\n---\n## Version Compatibility\n\nReference examples tested with: mgcv 1.9+, tradeSeq 1.16+, segmented 2.0+, ruptures 1.1+, numpy 1.26+, pandas 2.2+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\nNote: the modeled quantity must be on a scale the family assumes. A Gaussian GAM is valid only on variance-stabilized\u002Flog-transformed expression (vst, rlog, log-CPM); raw RNA-seq counts require `family=nb()` with a `offset(log(library_size))`. Successive timepoints are correlated, so a plain `gam()` (which assumes independent residuals) inflates smooth-term significance unless the AR structure is modeled or the residual ACF is checked.\n\n# Temporal Trajectory Modeling\n\n**\"Fit smooth curves to my gene expression over real time, compare trajectories, and find abrupt shifts\"** -> model a continuous function of MEASURED time f(time), test whether it changes \u002F differs between conditions, and locate discrete regime changes.\n- R: `mgcv::gam()`\u002F`gamm()`\u002F`bam()` for penalized-spline GAMs; `segmented::segmented()` for slope breaks\n- Python: `ruptures` for level\u002Fdistribution changepoints\n\n## The governing principle: measured time is not pseudotime, and the model class must match the mechanism\n\nThis skill models trajectories where the x-axis is ACTUAL experimental time (hours, days, developmental stage) or a pseudobulk value aggregated over real time. Time is measured and shared across every sample at a timepoint, so replicates are exchangeable, timepoints are few and fixed, and residual autocorrelation across ordered timepoints is real. This is categorically different from single-cell pseudotime, which is a latent per-cell ordering estimated with error and belongs to single-cell\u002Ftrajectory-inference (and to tradeSeq's native use case). Conflating the two is the deepest error in the area.\n\nThree decisions dominate correctness before any p-value is read:\n1. Distribution. A Gaussian GAM on raw counts gives wrong SEs, wrong p-values, and can predict negatives. Model counts with `nb()` and a library-size offset, or fit Gaussian on a variance-stabilized scale.\n2. Autocorrelation. Positive residual correlation across timepoints shrinks the effective sample size, so a plain `gam()` under-estimates SEs and over-calls temporal trends. Name the assumption and model it (`corAR1`\u002F`bam(rho=)`) or at least inspect the residual ACF.\n3. Mechanism. A smooth GAM assumes a gradually curving process; a changepoint model assumes a genuinely abrupt regime shift. Imposing changepoints on smooth data invents regime shifts; smoothing a true step Gibbs-rings over it. Match the model to the biology.\n\n## Smooth GAM vs changepoint: choosing the model class\n\n| Question | Model | Use when | Do NOT use when |\n|----------|-------|----------|-----------------|\n| Does expression change \u002F curve over time? | GAM `s(time)` (mgcv) | process is gradual (induction\u002Fdecay kinetics, developmental ramps) | the process is a discrete switch -> a smooth smears the discontinuity |\n| Do two conditions' trajectories diverge? | ordered-factor difference smooth (mgcv) | testing whether treated shape departs from control | groups have no shared reference \u002F only a constant offset differs (use a parametric term) |\n| When does the regime shift (slope break)? | `segmented` (broken-line) | continuous piecewise-LINEAR change in slope | the shift is a level jump, not a slope change (use ruptures `l2`) |\n| When does the regime shift (level\u002Fdistribution)? | `ruptures` Pelt\u002FBinseg | step change in mean (`l2`) or distribution (`rbf`) | the curve is smooth -> any liberal penalty fabricates breaks |\n| Is a curve even warranted? | AIC\u002Fedf of `s(time)` vs linear | deciding non-linear vs linear is enough | over-interpreting edf near 1 as a real curve |\n\nMethodology evolves; before committing verify current defaults and recommendations against the latest mgcv\u002Fruptures\u002Fsegmented documentation.\n\n## mgcv GAM (R)\n\n**Goal:** Fit a smooth non-linear curve to expression over measured time and test whether it changes, on the correct distributional scale.\n\n**Approach:** Use a penalized regression spline `s(time)`; set the basis-dimension ceiling k generously but below the number of unique timepoints and let REML choose the realized wiggliness; use `nb()` + a library-size offset for raw counts, or Gaussian on a variance-stabilized scale.\n\n```r\nlibrary(mgcv)\n\n# k is a CEILING (max basis dimension), NOT the number of knots the curve will use.\n# The REML-chosen penalty picks the realized wiggliness; edf (below) reports it.\n# k must be \u003C number of unique timepoints; realistically k \u003C= (#timepoints - 1).\n# method='REML': better-behaved objective than GCV, resists under\u002Fover-smoothing (Wood 2011).\nfit \u003C- gam(expression ~ s(time, k = 6, bs = 'tp'), data = gene_df, method = 'REML')\n\nsummary(fit)\n# s.table columns: edf, Ref.df, F (Gaussian\u002Funknown scale), p-value.\n# edf ~ 1 => penalty shrank the smooth to linear; edf near k-1 => nearly full flexibility.\n# The smooth-term p-value is APPROXIMATE (conditional on estimated lambda; Wood 2013):\n# treat it as categorical significant\u002Fnot, do not compare tiny magnitudes.\n```\n\n### Raw counts: NB family with a library-size offset\n\n**Goal:** Model overdispersed RNA-seq counts on the count scale without violating the Gaussian assumption.\n\n**Approach:** Fit `family=nb()` (mgcv estimates theta by REML) with `offset(log(library_size))` so the smooth describes rate, not depth.\n\n```r\n# Counts are mean-variance coupled and overdispersed: Gaussian is wrong on raw counts.\n# nb() estimates theta jointly with the smoothing parameters under REML.\n# offset(log(libsize)) absorbs sequencing depth so s(time) models expression rate.\nfit_nb \u003C- gam(counts ~ s(time, k = 6) + offset(log(library_size)),\n              data = gene_df, family = nb(), method = 'REML')\n# With a known-scale family the test column becomes Chi.sq, not F.\nsummary(fit_nb)$s.table\n```\n\n### Residual autocorrelation across timepoints\n\n**Goal:** Prevent inflated smooth-term significance caused by correlation between successive timepoints.\n\n**Approach:** Model a lag-1 AR structure grouped by the replication unit with `gamm(correlation=corAR1())`, or fix `rho` in `bam()` for genome-wide fits after reading the lag-1 residual ACF.\n\n```r\n# Plain gam() assumes independent residuals; positive AR(1) shrinks effective n,\n# under-estimates SEs, and lets the smooth get too wiggly -> false temporal trends.\n# corAR1 models e_t = rho * e_{t-1} + noise; group by subject\u002Fanimal\u002Fplate.\nfit_ar \u003C- gamm(expression ~ s(time, k = 6),\n               correlation = corAR1(form = ~ time | subject),\n               data = gene_df, method = 'REML')\n# fit_ar$gam holds the smooth; fit_ar$lme holds the correlation estimate.\n\n# Genome-wide alternative: fit once without AR, read lag-1 residual ACF, set rho, refit.\n# AR.start flags the first observation of each independent series.\nfit_bam \u003C- bam(expression ~ s(time, k = 6), data = gene_df,\n               rho = 0.4, AR.start = series_start, method = 'fREML')\n```\n\nWith independent biological replicates AT EACH timepoint the correlation is often weak or unidentifiable and plain `gam()` is defensible; a single series sampled repeatedly over many timepoints is where AR bites hardest. Always inspect the residual ACF before trusting the smooth p-value.\n\n### Comparing conditions with an ordered-factor difference smooth\n\n**Goal:** Directly test whether the treated trajectory's shape diverges from control, with its own p-value.\n\n**Approach:** Make the grouping an ORDERED factor so `s(time, by=grp)` becomes a difference smooth (level minus reference); keep the reference global smooth AND the parametric main effect.\n\n```r\n# Unordered by= gives each group's curve vs zero -- NOT a divergence test.\n# Ordered factor: s(time, by=grp) is the difference smooth; its single p-value\n# directly tests whether the trajectories diverge. Extends cleanly to >2 groups.\ngene_df$condition \u003C- as.ordered(gene_df$condition)\nfit_diff \u003C- gam(expression ~ condition + s(time, k = 6) + s(time, k = 6, by = condition),\n                data = gene_df, method = 'REML')\n# The parametric 'condition' term is REQUIRED: centered smooths cannot carry the\n# group's overall level, so without it a constant offset is misattributed to the smooth.\nsummary(fit_diff)\n```\n\nA numeric 0\u002F1 `by=is_treated` indicator is a valid shortcut for a single 2-level contrast (the second smooth is the treatment deviation), but the ordered-factor form is the general, canonical idiom.\n\n### Diagnostics: gam.check, k-index, concurvity\n\n**Goal:** Decide whether the basis is adequate and whether smooth terms are mutually identifiable.\n\n**Approach:** Read `gam.check()`\u002F`k.check()`; respond to a low k-index by doubling k and refitting, not by reflexively cranking k; use `concurvity()` only for multi-smooth models.\n\n```r\ngam.check(fit)   # 4 residual plots + k.check(): reports k', edf, k-index, p-value\n\n# k-index \u003C 1 with a small p means residual pattern the basis is too rigid to capture.\n# CORRECT diagnostic = double k and refit: if edf rises substantially, k was too low;\n# if edf barely moves, k was fine and the low k-index reflects autocorrelation or\n# a distributional problem -- do not just raise k.\n\n# Concurvity = the smooth analog of collinearity; only meaningful for multi-term models.\n# Near 1 => partial attribution between smooths is unstable; > 0.8 is a worry, not a cutoff.\nconcurvity(fit_diff, full = TRUE)\n```\n\n### Prediction and pointwise intervals\n\n**Goal:** Visualize the fitted trajectory with an uncertainty band, within the sampled range only.\n\n**Approach:** Predict on a fine grid with `se.fit=TRUE`; band = fit +\u002F- 1.96*SE (pointwise, not simultaneous); never extrapolate.\n\n```r\ngrid \u003C- data.frame(time = seq(min(gene_df$time), max(gene_df$time), length.out = 200))\npred \u003C- predict(fit, newdata = grid, se.fit = TRUE)\ngrid$fitted \u003C- pred$fit\n# 1.96*SE is a POINTWISE 95% band; whole-curve (simultaneous) coverage is \u003C 95%,\n# so overlapping condition bands are NOT a formal test -- use the difference smooth p-value.\ngrid$lower \u003C- pred$fit - 1.96 * pred$se.fit\ngrid$upper \u003C- pred$fit + 1.96 * pred$se.fit\n# Beyond [min(time), max(time)] the spline and its SE diverge -- do not predict outside range.\n```\n\n### Genome-wide GAM fitting + FDR\n\n**Goal:** Rank genes by temporal significance across the transcriptome.\n\n**Approach:** Fit `s(time)` per gene, collect the smooth p-value, apply BH across genes (the per-gene p-values are approximate, so the FDR is approximate; permutation calibration is the gold standard for strong claims).\n\n```r\n# expr_mat here must be variance-stabilized (vst \u002F log-CPM); for raw counts use the family=nb() + offset\n# form above instead of this default-Gaussian fit, or the per-gene SEs and p-values are invalid.\nresults \u003C- data.frame()\nfor (gene in rownames(expr_mat)) {\n    df \u003C- data.frame(expression = as.numeric(expr_mat[gene, ]), time = timepoints)\n    fit \u003C- gam(expression ~ s(time, k = 6), data = df, method = 'REML')\n    s_tab \u003C- summary(fit)$s.table\n    results \u003C- rbind(results, data.frame(gene = gene, edf = s_tab[, 'edf'],\n                                         p_value = s_tab[, 'p-value']))\n}\nresults$q_value \u003C- p.adjust(results$p_value, method = 'BH')  # q\u003C0.05: standard FDR floor\ntemporal_genes \u003C- results[results$q_value \u003C 0.05, ]\n```\n\n## tradeSeq (R\u002FBioconductor) -- off-label for bulk\n\ntradeSeq is BUILT for single-cell pseudotime lineages, not bulk real-time. `fitGAM(counts, pseudotime, cellWeights, nknots)` expects a gene x cell count matrix, a cell x lineage pseudotime matrix, and cell x lineage soft-assignment weights, and fits an NB GAM per gene per lineage. Its tests (`associationTest`, `startVsEndTest`, `conditionTest`, `patternTest`) are keyed to pseudotime lineages.\n\n```r\n# Only reasonable when the design is genuinely a pseudobulk-over-a-lineage.\n# For a standard bulk time-course with replicates at fixed timepoints, use mgcv directly:\n# the same NB GAM, with full control over by= contrasts, offsets, and AR structure,\n# and without single-cell scaffolding. nknots plays the same ceiling role as k (choose it with evaluateK()).\nlibrary(tradeSeq)\nsce \u003C- fitGAM(counts = count_mat, pseudotime = pt_mat, cellWeights = cw_mat, nknots = 6)\nassoc_res \u003C- associationTest(sce)   # matrix of Wald stat + df + p-value, NOT an SCE\n```\n\n## segmented (R) -- broken-line slope break\n\n**Goal:** Locate a continuous change in SLOPE and test whether a break exists at all.\n\n**Approach:** Pre-test with `davies.test` before fitting a break; estimate the breakpoint with `segmented()` from a starting value; limit to one break unless the data are dense.\n\n```r\nlibrary(segmented)\nlm_fit \u003C- lm(expression ~ time, data = gene_df)\n\n# davies.test H0: difference-in-slopes = 0 (no breakpoint). It searches candidate\n# locations and corrects the minimum p for the search (slightly conservative).\n# Decide WHETHER a break exists before interpreting one. pscore.test() is more powerful\n# for a single break.\ndavies.test(lm_fit, seg.Z = ~time)\n\n# segmented models a CONTINUOUS slope change (not a level jump); psi = starting value(s),\n# NA auto-initializes. The estimator is a local search: sensitive to psi, fragile with\n# multiple breaks (closely spaced breaks are non-identifiable).\nseg_fit \u003C- segmented(lm_fit, seg.Z = ~time, psi = NA)\nsummary(seg_fit)$psi   # breakpoint estimate + SE (break CI is approximate\u002Foften too narrow)\n```\n\n## ruptures (Python) -- level\u002Fdistribution changepoints\n\n**Goal:** Detect discrete times where the mean (or whole distribution) shifts.\n\n**Approach:** Factorize as (search method) x (cost model) x (penalty); the penalty choice IS the number-of-changepoints choice; match the cost model to the shift type and estimate the noise variance, not the total variance.\n\n```python\nimport numpy as np\nimport ruptures as rpt\n\nsignal = np.asarray(expression_values)\n\n# model='l2' detects changes in MEAN (piecewise-constant level -- the natural choice for\n#   step-like expression regimes). 'rbf' detects changes in the whole distribution\n#   (mean AND variance) -- more general, hungrier for data, less interpretable.\n# min_size=2: minimum segment length. Pelt is exact (O(n) via pruning); it takes a penalty\n#   and RETURNS the number+location of breaks -- there is no separate 'how many' knob.\nn = len(signal)\n# Noise variance, NOT total variance: np.var(signal) includes between-regime variation, so\n# a BIC-style penalty log(n)*np.var(signal) is too large and UNDER-detects. Estimate noise\n# from lag-1 differences instead. BIC is derived for the l2\u002FGaussian-mean cost -- pairing it\n# with model='rbf' is theoretically mismatched; use l2 with BIC, or calibrate rbf empirically.\nsigma2 = np.var(np.diff(signal)) \u002F 2.0\npenalty = np.log(n) * sigma2\nbkps = rpt.Pelt(model='l2', min_size=2).fit(signal).predict(pen=penalty)\n# predict returns break indices INCLUDING the terminal index n:\nn_changepoints = len(bkps) - 1   # bkps[:-1] are the actual break locations\n\n# Binseg: greedy, approximate, fast; takes a KNOWN number of breaks (sanity check vs Pelt).\nbkps_binseg = rpt.Binseg(model='l2', min_size=2).fit(signal).predict(n_bkps=2)\n```\n\nGuard against fabricated breaks: a liberal penalty always \"finds\" changepoints in a smooth ramp. Require a pre-test (a break exists) or compare a piecewise fit against a smooth-GAM fit by AIC -- if the smooth wins, the \"changepoint\" is a sampling-noise artifact. With few timepoints, be extremely skeptical of more than one break.\n\n## Common Errors\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| p-values wrong \u002F fitted curve predicts negative expression | Gaussian GAM on raw overdispersed counts | `family=nb()` + `offset(log(library_size))`, or fit Gaussian on vst\u002Flog-CPM |\n| Many genes \"significantly change over time\" implausibly | residual autocorrelation inflates smooth-term significance | `gamm(..., correlation=corAR1(form=~time|subject))` or `bam(..., rho=, AR.start=)`; check residual ACF |\n| Treating k as \"the number of bends I want\" | k is the flexibility CEILING, not realized complexity | set k generously (\u003C #timepoints), let REML pick lambda; read `edf`, not k |\n| Cranking k whenever k-index \u003C 1 | low k-index can mean autocorrelation\u002Fheteroscedasticity, not low basis | double k and refit -- if edf jumps, raise k; if not, look at correlation\u002Fdistribution |\n| Reading p=1e-30 as thirty orders of certainty | smooth p-values are approximate (ignore full lambda uncertainty) | treat as categorical significant\u002Fnot; apply BH FDR across genes |\n| Unordered `by=` used \"to test if curves differ\" | it gives each group vs zero, not a divergence test | `as.ordered(condition)` -> the difference smooth's p-value IS the divergence test |\n| `by=` smooth without the parametric main effect | centered smooths cannot carry the group level | include `condition +` alongside `s(time, by=condition)` |\n| `tradeSeq::fitGAM` on a plain bulk time-course | tradeSeq is single-cell pseudotime machinery (needs cellWeights) | use `mgcv` directly for bulk real-time; reserve tradeSeq for pseudobulk lineages |\n| ruptures under-detects real changepoints | `pen=log(n)*np.var(signal)` uses TOTAL variance -> penalty too large | estimate noise from `np.var(np.diff(signal))\u002F2`; sweep the penalty |\n| `model='rbf'` with a BIC (`log n * var`) penalty | BIC penalty is derived for the l2\u002FGaussian-mean cost | use `model='l2'` with BIC, or calibrate the rbf penalty empirically |\n| Changepoints \"found\" in a clearly smooth ramp | a liberal penalty fabricates breaks in gradual data | pre-test with `davies.test`; compare piecewise vs smooth-GAM AIC; the smooth often wins |\n| Fitted curve behaves wildly past the last timepoint | extrapolating a penalized spline beyond the data | predict only within `[min(time), max(time)]` |\n| \"The condition bands overlap, so no difference\" | 1.96*SE bands are pointwise, not simultaneous | use the difference-smooth p-value or simultaneous (posterior-simulation) intervals |\n| `segmented` with several `psi` gives unstable breaks | multiple breakpoints are weakly identifiable with few noisy points | limit to 1 break unless data are dense; supply good `psi` starts; check convergence |\n\n## Related Skills\n\n- temporal-clustering - group genes by trajectory shape after fitting\n- circadian-rhythms - periodic (known-period) trajectory models rather than smooth trends\n- periodicity-detection - discover unknown-period oscillation instead of a smooth trend\n- differential-expression\u002Ftimeseries-de - linear\u002Fspline model alternatives for temporal DE\n- single-cell\u002Ftrajectory-inference - single-cell pseudotime (latent inferred ordering), the case tradeSeq is built for\n\n## References\n\n- Wood SN. 2011. Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. *J R Stat Soc B* 73(1):3-36. doi:10.1111\u002Fj.1467-9868.2010.00749.x. (REML smoothing-parameter selection, better-behaved than GCV.)\n- Wood SN. 2013. On p-values for smooth components of an extended generalized additive model. *Biometrika* 100(1):221-228. doi:10.1093\u002Fbiomet\u002Fass048. (Smooth-term p-values are approximate; pointwise interval coverage.)\n- Wood SN. 2017. *Generalized Additive Models: An Introduction with R*, 2nd ed. Chapman & Hall\u002FCRC. ISBN 9781498728331. (Basis-penalty framework, gam.check, concurvity.)\n- Pedersen EJ, Miller DL, Simpson GL, Ross N. 2019. Hierarchical generalized additive models in ecology: an introduction with mgcv. *PeerJ* 7:e6876. doi:10.7717\u002Fpeerj.6876. (Global-plus-difference-smooth and factor-smooth condition-comparison structure.)\n- Van den Berge K, Roux de Bezieux H, Street K, Saelens W, Cannoodt R, Saeys Y, Dudoit S, Clement L. 2020. Trajectory-based differential expression analysis for single-cell sequencing data. *Nat Commun* 11(1):1201. doi:10.1038\u002Fs41467-020-14766-3. (tradeSeq: NB-GAM DE along pseudotime lineages, hence off-label for bulk.)\n- Muggeo VMR. 2003. Estimating regression models with unknown break-points. *Stat Med* 22(19):3055-3071. doi:10.1002\u002Fsim.1545. (Broken-line estimator behind segmented and davies.test.)\n- Killick R, Fearnhead P, Eckley IA. 2012. Optimal detection of changepoints with a linear computational cost. *J Am Stat Assoc* 107(500):1590-1598. doi:10.1080\u002F01621459.2012.737745. (PELT exact O(n) penalized algorithm behind rpt.Pelt.)\n- Truong C, Oudre L, Vayatis N. 2020. Selective review of offline change point detection methods. *Signal Processing* 167:107299. doi:10.1016\u002Fj.sigpro.2019.107299. (The cost x search x constraint taxonomy; the ruptures reference paper.)\n","## Version Compatibility\n\nReference examples tested with: mgcv 1.9+, tradeSeq 1.16+, segmented 2.0+, ruptures 1.1+, numpy 1.26+, pandas 2.2+\n\nBefore using code patterns, verify installed versions match. If versions differ:\n- Python: `pip show \u003Cpackage>` then `help(module.function)` to check signatures\n- R: `packageVersion('\u003Cpkg>')` then `?function_name` to verify parameters\n\nIf code throws ImportError, AttributeError, or TypeError, introspect the installed\npackage and adapt the example to match the actual API rather than retrying.\n\nNote: the modeled quantity must be on a scale the family assumes. A Gaussian GAM is valid only on variance-stabilized\u002Flog-transformed expression (vst, rlog, log-CPM); raw RNA-seq counts require `family=nb()` with a `offset(log(library_size))`. Successive timepoints are correlated, so a plain `gam()` (which assumes independent residuals) inflates smooth-term significance unless the AR structure is modeled or the residual ACF is checked.\n\n# Temporal Trajectory Modeling\n\n**\"Fit smooth curves to my gene expression over real time, compare trajectories, and find abrupt shifts\"** -> model a continuous function of MEASURED time f(time), test whether it changes \u002F differs between conditions, and locate discrete regime changes.\n- R: `mgcv::gam()`\u002F`gamm()`\u002F`bam()` for penalized-spline GAMs; `segmented::segmented()` for slope breaks\n- Python: `ruptures` for level\u002Fdistribution changepoints\n\n## The governing principle: measured time is not pseudotime, and the model class must match the mechanism\n\nThis skill models trajectories where the x-axis is ACTUAL experimental time (hours, days, developmental stage) or a pseudobulk value aggregated over real time. Time is measured and shared across every sample at a timepoint, so replicates are exchangeable, timepoints are few and fixed, and residual autocorrelation across ordered timepoints is real. This is categorically different from single-cell pseudotime, which is a latent per-cell ordering estimated with error and belongs to single-cell\u002Ftrajectory-inference (and to tradeSeq's native use case). Conflating the two is the deepest error in the area.\n\nThree decisions dominate correctness before any p-value is read:\n1. Distribution. A Gaussian GAM on raw counts gives wrong SEs, wrong p-values, and can predict negatives. Model counts with `nb()` and a library-size offset, or fit Gaussian on a variance-stabilized scale.\n2. Autocorrelation. Positive residual correlation across timepoints shrinks the effective sample size, so a plain `gam()` under-estimates SEs and over-calls temporal trends. Name the assumption and model it (`corAR1`\u002F`bam(rho=)`) or at least inspect the residual ACF.\n3. Mechanism. A smooth GAM assumes a gradually curving process; a changepoint model assumes a genuinely abrupt regime shift. Imposing changepoints on smooth data invents regime shifts; smoothing a true step Gibbs-rings over it. Match the model to the biology.\n\n## Smooth GAM vs changepoint: choosing the model class\n\n| Question | Model | Use when | Do NOT use when |\n|----------|-------|----------|-----------------|\n| Does expression change \u002F curve over time? | GAM `s(time)` (mgcv) | process is gradual (induction\u002Fdecay kinetics, developmental ramps) | the process is a discrete switch -> a smooth smears the discontinuity |\n| Do two conditions' trajectories diverge? | ordered-factor difference smooth (mgcv) | testing whether treated shape departs from control | groups have no shared reference \u002F only a constant offset differs (use a parametric term) |\n| When does the regime shift (slope break)? | `segmented` (broken-line) | continuous piecewise-LINEAR change in slope | the shift is a level jump, not a slope change (use ruptures `l2`) |\n| When does the regime shift (level\u002Fdistribution)? | `ruptures` Pelt\u002FBinseg | step change in mean (`l2`) or distribution (`rbf`) | the curve is smooth -> any liberal penalty fabricates breaks |\n| Is a curve even warranted? | AIC\u002Fedf of `s(time)` vs linear | deciding non-linear vs linear is enough | over-interpreting edf near 1 as a real curve |\n\nMethodology evolves; before committing verify current defaults and recommendations against the latest mgcv\u002Fruptures\u002Fsegmented documentation.\n\n## mgcv GAM (R)\n\n**Goal:** Fit a smooth non-linear curve to expression over measured time and test whether it changes, on the correct distributional scale.\n\n**Approach:** Use a penalized regression spline `s(time)`; set the basis-dimension ceiling k generously but below the number of unique timepoints and let REML choose the realized wiggliness; use `nb()` + a library-size offset for raw counts, or Gaussian on a variance-stabilized scale.\n\n```r\nlibrary(mgcv)\n\n# k is a CEILING (max basis dimension), NOT the number of knots the curve will use.\n# The REML-chosen penalty picks the realized wiggliness; edf (below) reports it.\n# k must be \u003C number of unique timepoints; realistically k \u003C= (#timepoints - 1).\n# method='REML': better-behaved objective than GCV, resists under\u002Fover-smoothing (Wood 2011).\nfit \u003C- gam(expression ~ s(time, k = 6, bs = 'tp'), data = gene_df, method = 'REML')\n\nsummary(fit)\n# s.table columns: edf, Ref.df, F (Gaussian\u002Funknown scale), p-value.\n# edf ~ 1 => penalty shrank the smooth to linear; edf near k-1 => nearly full flexibility.\n# The smooth-term p-value is APPROXIMATE (conditional on estimated lambda; Wood 2013):\n# treat it as categorical significant\u002Fnot, do not compare tiny magnitudes.\n```\n\n### Raw counts: NB family with a library-size offset\n\n**Goal:** Model overdispersed RNA-seq counts on the count scale without violating the Gaussian assumption.\n\n**Approach:** Fit `family=nb()` (mgcv estimates theta by REML) with `offset(log(library_size))` so the smooth describes rate, not depth.\n\n```r\n# Counts are mean-variance coupled and overdispersed: Gaussian is wrong on raw counts.\n# nb() estimates theta jointly with the smoothing parameters under REML.\n# offset(log(libsize)) absorbs sequencing depth so s(time) models expression rate.\nfit_nb \u003C- gam(counts ~ s(time, k = 6) + offset(log(library_size)),\n              data = gene_df, family = nb(), method = 'REML')\n# With a known-scale family the test column becomes Chi.sq, not F.\nsummary(fit_nb)$s.table\n```\n\n### Residual autocorrelation across timepoints\n\n**Goal:** Prevent inflated smooth-term significance caused by correlation between successive timepoints.\n\n**Approach:** Model a lag-1 AR structure grouped by the replication unit with `gamm(correlation=corAR1())`, or fix `rho` in `bam()` for genome-wide fits after reading the lag-1 residual ACF.\n\n```r\n# Plain gam() assumes independent residuals; positive AR(1) shrinks effective n,\n# under-estimates SEs, and lets the smooth get too wiggly -> false temporal trends.\n# corAR1 models e_t = rho * e_{t-1} + noise; group by subject\u002Fanimal\u002Fplate.\nfit_ar \u003C- gamm(expression ~ s(time, k = 6),\n               correlation = corAR1(form = ~ time | subject),\n               data = gene_df, method = 'REML')\n# fit_ar$gam holds the smooth; fit_ar$lme holds the correlation estimate.\n\n# Genome-wide alternative: fit once without AR, read lag-1 residual ACF, set rho, refit.\n# AR.start flags the first observation of each independent series.\nfit_bam \u003C- bam(expression ~ s(time, k = 6), data = gene_df,\n               rho = 0.4, AR.start = series_start, method = 'fREML')\n```\n\nWith independent biological replicates AT EACH timepoint the correlation is often weak or unidentifiable and plain `gam()` is defensible; a single series sampled repeatedly over many timepoints is where AR bites hardest. Always inspect the residual ACF before trusting the smooth p-value.\n\n### Comparing conditions with an ordered-factor difference smooth\n\n**Goal:** Directly test whether the treated trajectory's shape diverges from control, with its own p-value.\n\n**Approach:** Make the grouping an ORDERED factor so `s(time, by=grp)` becomes a difference smooth (level minus reference); keep the reference global smooth AND the parametric main effect.\n\n```r\n# Unordered by= gives each group's curve vs zero -- NOT a divergence test.\n# Ordered factor: s(time, by=grp) is the difference smooth; its single p-value\n# directly tests whether the trajectories diverge. Extends cleanly to >2 groups.\ngene_df$condition \u003C- as.ordered(gene_df$condition)\nfit_diff \u003C- gam(expression ~ condition + s(time, k = 6) + s(time, k = 6, by = condition),\n                data = gene_df, method = 'REML')\n# The parametric 'condition' term is REQUIRED: centered smooths cannot carry the\n# group's overall level, so without it a constant offset is misattributed to the smooth.\nsummary(fit_diff)\n```\n\nA numeric 0\u002F1 `by=is_treated` indicator is a valid shortcut for a single 2-level contrast (the second smooth is the treatment deviation), but the ordered-factor form is the general, canonical idiom.\n\n### Diagnostics: gam.check, k-index, concurvity\n\n**Goal:** Decide whether the basis is adequate and whether smooth terms are mutually identifiable.\n\n**Approach:** Read `gam.check()`\u002F`k.check()`; respond to a low k-index by doubling k and refitting, not by reflexively cranking k; use `concurvity()` only for multi-smooth models.\n\n```r\ngam.check(fit)   # 4 residual plots + k.check(): reports k', edf, k-index, p-value\n\n# k-index \u003C 1 with a small p means residual pattern the basis is too rigid to capture.\n# CORRECT diagnostic = double k and refit: if edf rises substantially, k was too low;\n# if edf barely moves, k was fine and the low k-index reflects autocorrelation or\n# a distributional problem -- do not just raise k.\n\n# Concurvity = the smooth analog of collinearity; only meaningful for multi-term models.\n# Near 1 => partial attribution between smooths is unstable; > 0.8 is a worry, not a cutoff.\nconcurvity(fit_diff, full = TRUE)\n```\n\n### Prediction and pointwise intervals\n\n**Goal:** Visualize the fitted trajectory with an uncertainty band, within the sampled range only.\n\n**Approach:** Predict on a fine grid with `se.fit=TRUE`; band = fit +\u002F- 1.96*SE (pointwise, not simultaneous); never extrapolate.\n\n```r\ngrid \u003C- data.frame(time = seq(min(gene_df$time), max(gene_df$time), length.out = 200))\npred \u003C- predict(fit, newdata = grid, se.fit = TRUE)\ngrid$fitted \u003C- pred$fit\n# 1.96*SE is a POINTWISE 95% band; whole-curve (simultaneous) coverage is \u003C 95%,\n# so overlapping condition bands are NOT a formal test -- use the difference smooth p-value.\ngrid$lower \u003C- pred$fit - 1.96 * pred$se.fit\ngrid$upper \u003C- pred$fit + 1.96 * pred$se.fit\n# Beyond [min(time), max(time)] the spline and its SE diverge -- do not predict outside range.\n```\n\n### Genome-wide GAM fitting + FDR\n\n**Goal:** Rank genes by temporal significance across the transcriptome.\n\n**Approach:** Fit `s(time)` per gene, collect the smooth p-value, apply BH across genes (the per-gene p-values are approximate, so the FDR is approximate; permutation calibration is the gold standard for strong claims).\n\n```r\n# expr_mat here must be variance-stabilized (vst \u002F log-CPM); for raw counts use the family=nb() + offset\n# form above instead of this default-Gaussian fit, or the per-gene SEs and p-values are invalid.\nresults \u003C- data.frame()\nfor (gene in rownames(expr_mat)) {\n    df \u003C- data.frame(expression = as.numeric(expr_mat[gene, ]), time = timepoints)\n    fit \u003C- gam(expression ~ s(time, k = 6), data = df, method = 'REML')\n    s_tab \u003C- summary(fit)$s.table\n    results \u003C- rbind(results, data.frame(gene = gene, edf = s_tab[, 'edf'],\n                                         p_value = s_tab[, 'p-value']))\n}\nresults$q_value \u003C- p.adjust(results$p_value, method = 'BH')  # q\u003C0.05: standard FDR floor\ntemporal_genes \u003C- results[results$q_value \u003C 0.05, ]\n```\n\n## tradeSeq (R\u002FBioconductor) -- off-label for bulk\n\ntradeSeq is BUILT for single-cell pseudotime lineages, not bulk real-time. `fitGAM(counts, pseudotime, cellWeights, nknots)` expects a gene x cell count matrix, a cell x lineage pseudotime matrix, and cell x lineage soft-assignment weights, and fits an NB GAM per gene per lineage. Its tests (`associationTest`, `startVsEndTest`, `conditionTest`, `patternTest`) are keyed to pseudotime lineages.\n\n```r\n# Only reasonable when the design is genuinely a pseudobulk-over-a-lineage.\n# For a standard bulk time-course with replicates at fixed timepoints, use mgcv directly:\n# the same NB GAM, with full control over by= contrasts, offsets, and AR structure,\n# and without single-cell scaffolding. nknots plays the same ceiling role as k (choose it with evaluateK()).\nlibrary(tradeSeq)\nsce \u003C- fitGAM(counts = count_mat, pseudotime = pt_mat, cellWeights = cw_mat, nknots = 6)\nassoc_res \u003C- associationTest(sce)   # matrix of Wald stat + df + p-value, NOT an SCE\n```\n\n## segmented (R) -- broken-line slope break\n\n**Goal:** Locate a continuous change in SLOPE and test whether a break exists at all.\n\n**Approach:** Pre-test with `davies.test` before fitting a break; estimate the breakpoint with `segmented()` from a starting value; limit to one break unless the data are dense.\n\n```r\nlibrary(segmented)\nlm_fit \u003C- lm(expression ~ time, data = gene_df)\n\n# davies.test H0: difference-in-slopes = 0 (no breakpoint). It searches candidate\n# locations and corrects the minimum p for the search (slightly conservative).\n# Decide WHETHER a break exists before interpreting one. pscore.test() is more powerful\n# for a single break.\ndavies.test(lm_fit, seg.Z = ~time)\n\n# segmented models a CONTINUOUS slope change (not a level jump); psi = starting value(s),\n# NA auto-initializes. The estimator is a local search: sensitive to psi, fragile with\n# multiple breaks (closely spaced breaks are non-identifiable).\nseg_fit \u003C- segmented(lm_fit, seg.Z = ~time, psi = NA)\nsummary(seg_fit)$psi   # breakpoint estimate + SE (break CI is approximate\u002Foften too narrow)\n```\n\n## ruptures (Python) -- level\u002Fdistribution changepoints\n\n**Goal:** Detect discrete times where the mean (or whole distribution) shifts.\n\n**Approach:** Factorize as (search method) x (cost model) x (penalty); the penalty choice IS the number-of-changepoints choice; match the cost model to the shift type and estimate the noise variance, not the total variance.\n\n```python\nimport numpy as np\nimport ruptures as rpt\n\nsignal = np.asarray(expression_values)\n\n# model='l2' detects changes in MEAN (piecewise-constant level -- the natural choice for\n#   step-like expression regimes). 'rbf' detects changes in the whole distribution\n#   (mean AND variance) -- more general, hungrier for data, less interpretable.\n# min_size=2: minimum segment length. Pelt is exact (O(n) via pruning); it takes a penalty\n#   and RETURNS the number+location of breaks -- there is no separate 'how many' knob.\nn = len(signal)\n# Noise variance, NOT total variance: np.var(signal) includes between-regime variation, so\n# a BIC-style penalty log(n)*np.var(signal) is too large and UNDER-detects. Estimate noise\n# from lag-1 differences instead. BIC is derived for the l2\u002FGaussian-mean cost -- pairing it\n# with model='rbf' is theoretically mismatched; use l2 with BIC, or calibrate rbf empirically.\nsigma2 = np.var(np.diff(signal)) \u002F 2.0\npenalty = np.log(n) * sigma2\nbkps = rpt.Pelt(model='l2', min_size=2).fit(signal).predict(pen=penalty)\n# predict returns break indices INCLUDING the terminal index n:\nn_changepoints = len(bkps) - 1   # bkps[:-1] are the actual break locations\n\n# Binseg: greedy, approximate, fast; takes a KNOWN number of breaks (sanity check vs Pelt).\nbkps_binseg = rpt.Binseg(model='l2', min_size=2).fit(signal).predict(n_bkps=2)\n```\n\nGuard against fabricated breaks: a liberal penalty always \"finds\" changepoints in a smooth ramp. Require a pre-test (a break exists) or compare a piecewise fit against a smooth-GAM fit by AIC -- if the smooth wins, the \"changepoint\" is a sampling-noise artifact. With few timepoints, be extremely skeptical of more than one break.\n\n## Common Errors\n\n| Symptom | Cause | Fix |\n|---------|-------|-----|\n| p-values wrong \u002F fitted curve predicts negative expression | Gaussian GAM on raw overdispersed counts | `family=nb()` + `offset(log(library_size))`, or fit Gaussian on vst\u002Flog-CPM |\n| Many genes \"significantly change over time\" implausibly | residual autocorrelation inflates smooth-term significance | `gamm(..., correlation=corAR1(form=~time|subject))` or `bam(..., rho=, AR.start=)`; check residual ACF |\n| Treating k as \"the number of bends I want\" | k is the flexibility CEILING, not realized complexity | set k generously (\u003C #timepoints), let REML pick lambda; read `edf`, not k |\n| Cranking k whenever k-index \u003C 1 | low k-index can mean autocorrelation\u002Fheteroscedasticity, not low basis | double k and refit -- if edf jumps, raise k; if not, look at correlation\u002Fdistribution |\n| Reading p=1e-30 as thirty orders of certainty | smooth p-values are approximate (ignore full lambda uncertainty) | treat as categorical significant\u002Fnot; apply BH FDR across genes |\n| Unordered `by=` used \"to test if curves differ\" | it gives each group vs zero, not a divergence test | `as.ordered(condition)` -> the difference smooth's p-value IS the divergence test |\n| `by=` smooth without the parametric main effect | centered smooths cannot carry the group level | include `condition +` alongside `s(time, by=condition)` |\n| `tradeSeq::fitGAM` on a plain bulk time-course | tradeSeq is single-cell pseudotime machinery (needs cellWeights) | use `mgcv` directly for bulk real-time; reserve tradeSeq for pseudobulk lineages |\n| ruptures under-detects real changepoints | `pen=log(n)*np.var(signal)` uses TOTAL variance -> penalty too large | estimate noise from `np.var(np.diff(signal))\u002F2`; sweep the penalty |\n| `model='rbf'` with a BIC (`log n * var`) penalty | BIC penalty is derived for the l2\u002FGaussian-mean cost | use `model='l2'` with BIC, or calibrate the rbf penalty empirically |\n| Changepoints \"found\" in a clearly smooth ramp | a liberal penalty fabricates breaks in gradual data | pre-test with `davies.test`; compare piecewise vs smooth-GAM AIC; the smooth often wins |\n| Fitted curve behaves wildly past the last timepoint | extrapolating a penalized spline beyond the data | predict only within `[min(time), max(time)]` |\n| \"The condition bands overlap, so no difference\" | 1.96*SE bands are pointwise, not simultaneous | use the difference-smooth p-value or simultaneous (posterior-simulation) intervals |\n| `segmented` with several `psi` gives unstable breaks | multiple breakpoints are weakly identifiable with few noisy points | limit to 1 break unless data are dense; supply good `psi` starts; check convergence |\n\n## Related Skills\n\n- temporal-clustering - group genes by trajectory shape after fitting\n- circadian-rhythms - periodic (known-period) trajectory models rather than smooth trends\n- periodicity-detection - discover unknown-period oscillation instead of a smooth trend\n- differential-expression\u002Ftimeseries-de - linear\u002Fspline model alternatives for temporal DE\n- single-cell\u002Ftrajectory-inference - single-cell pseudotime (latent inferred ordering), the case tradeSeq is built for\n\n## References\n\n- Wood SN. 2011. Fast stable restricted maximum likelihood and marginal likelihood estimation of semiparametric generalized linear models. *J R Stat Soc B* 73(1):3-36. doi:10.1111\u002Fj.1467-9868.2010.00749.x. (REML smoothing-parameter selection, better-behaved than GCV.)\n- Wood SN. 2013. On p-values for smooth components of an extended generalized additive model. *Biometrika* 100(1):221-228. doi:10.1093\u002Fbiomet\u002Fass048. (Smooth-term p-values are approximate; pointwise interval coverage.)\n- Wood SN. 2017. *Generalized Additive Models: An Introduction with R*, 2nd ed. Chapman & Hall\u002FCRC. ISBN 9781498728331. (Basis-penalty framework, gam.check, concurvity.)\n- Pedersen EJ, Miller DL, Simpson GL, Ross N. 2019. Hierarchical generalized additive models in ecology: an introduction with mgcv. *PeerJ* 7:e6876. doi:10.7717\u002Fpeerj.6876. (Global-plus-difference-smooth and factor-smooth condition-comparison structure.)\n- Van den Berge K, Roux de Bezieux H, Street K, Saelens W, Cannoodt R, Saeys Y, Dudoit S, Clement L. 2020. Trajectory-based differential expression analysis for single-cell sequencing data. *Nat Commun* 11(1):1201. doi:10.1038\u002Fs41467-020-14766-3. (tradeSeq: NB-GAM DE along pseudotime lineages, hence off-label for bulk.)\n- Muggeo VMR. 2003. Estimating regression models with unknown break-points. *Stat Med* 22(19):3055-3071. doi:10.1002\u002Fsim.1545. (Broken-line estimator behind segmented and davies.test.)\n- Killick R, Fearnhead P, Eckley IA. 2012. Optimal detection of changepoints with a linear computational cost. *J Am Stat Assoc* 107(500):1590-1598. doi:10.1080\u002F01621459.2012.737745. (PELT exact O(n) penalized algorithm behind rpt.Pelt.)\n- Truong C, Oudre L, Vayatis N. 2020. Selective review of offline change point detection methods. *Signal Processing* 167:107299. doi:10.1016\u002Fj.sigpro.2019.107299. (The cost x search x constraint taxonomy; the ruptures reference paper.)\n",{"name":5,"source":24,"license":15,"tool_type":25,"description":7,"imported_at":26,"source_path":27,"primary_tool":28,"source_repository":29},"https:\u002F\u002Fgithub.com\u002FGPTomics\u002FbioSkills","mixed","2026-09-20","temporal-genomics\u002Ftrajectory-modeling\u002FSKILL.md","mgcv","GPTomics\u002FbioSkills","main","2d1750717747097b602acf30bd09a7cbd4b4c6ea","awesome_skills\u002Fbiology\u002Fbio-temporal-genomics-trajectory-modeling","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous","2026-11-09 11:45:36",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":48},[38,41,44],{"tool":39,"command":40},"npx","npx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-temporal-genomics-trajectory-modeling",{"tool":42,"command":43},"bunx","bunx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-temporal-genomics-trajectory-modeling",{"tool":45,"command":46},"pnpm","pnpm dlx skills add Mr-Nobody-Anonymous\u002FAll-skills --skill bio-temporal-genomics-trajectory-modeling","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-temporal-genomics-trajectory-modeling\u002FSKILL.md",true,[50,56,62],{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fchangepoint_detection.py","SCRIPT","脚本",5172,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-temporal-genomics-trajectory-modeling\u002Fexamples\u002Fchangepoint_detection.py",{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"examples\u002Fgam_temporal_modeling.R","OTHER","其他",6594,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-temporal-genomics-trajectory-modeling\u002Fexamples\u002Fgam_temporal_modeling.R",{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},"usage-guide.md","REFERENCE","参考文档",6473,"https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fbiology\u002Fbio-temporal-genomics-trajectory-modeling\u002Fusage-guide.md",[69,77,84,91,98,105],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":76},"01M7FFFZPC2025JQQHPHDX154J","dei-assessment","Assess diversity, equity, and inclusion with metrics. TRIGGERS - Use when user needs help with dei-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-assessment\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":76},"01M7FFFWN8H4WA7A6Y398QKB6J","dei-action-plan","Create DEI action plans with goals and initiatives. TRIGGERS - Use when user needs help with dei-action-plan related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fdei-action-plan\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":76},"01M7FFFSHTM0QZRVZ2NRJTJ0PY","culture-fit-assessment","Design culture add assessment processes. TRIGGERS - Use when user needs help with culture-fit-assessment related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fculture-fit-assessment\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":76},"01M7FFFMA12RKEQA38KHJSXXPS","cowork-to-code-bridge","Use an already-installed, independently verified cowork-to-code bridge to run narrowly approved actions on the user's own macOS, Linux, or WSL2 machine through a local file queue.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcowork-to-code-bridge\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":76},"01M7FFFH1F6M8YRGW5V487GH1K","counter-offer-response","Draft counter-offer responses for retention. TRIGGERS - Use when user needs help with counter-offer-response related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcounter-offer-response\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":76},"01M7FFFDGEHV8Y7J9N40HZXW52","continuous-feedback-system","Design continuous feedback systems. TRIGGERS - Use when user needs help with continuous-feedback-system related tasks.","https:\u002F\u002Fgithub.com\u002FMr-Nobody-Anonymous\u002FAll-skills\u002Fblob\u002Fmain\u002Fawesome_skills\u002Fhr-people\u002Fcontinuous-feedback-system\u002FSKILL.md",[],[]]