← Về thư mục
📄 / / profiles / r-and-d / raw_evidence / OpenAI4S / skills / bioskills / bio-temporal-genomics-temporal-clustering / references / usage-guide.md

Temporal Gene Clustering - Usage Guide

Overview

Groups PRE-SELECTED temporally variable genes by expression-profile SHAPE into candidate co-expression programs. Clustering is descriptive and unsupervised - it has no null and always returns clusters - so it is strictly downstream of gene selection (differential-expression/timeseries-de or a variance filter), NOT a test of which genes are dynamic. Supports soft (fuzzy) clustering with Mfuzz, hard/soft clustering with TCseq, automatic-k hierarchical clustering with DEGreport, and DTW/soft-DTW clustering with tslearn for phase-shifted patterns.

Prerequisites

R

BiocManager::install(c('Mfuzz', 'TCseq', 'DEGreport'))

Python

pip install tslearn scikit-learn numpy matplotlib

Data Requirements

Quick Start

Tell the AI agent what to cluster: - "Cluster my time-course genes by expression profile shape using Mfuzz" - "Group my differentially expressed genes into temporal response patterns" - "Find genes with similar trajectories using DTW clustering" - "Run degPatterns on my RNA-seq time-course data"

Example Prompts

Soft Clustering

"I have 2000 temporally variable genes across 8 timepoints. Cluster them with Mfuzz soft clustering and filter for core members."

"Run fuzzy c-means clustering on my time-series expression data and show me the cluster centroids."

Automatic Clustering

"Use DEGreport degPatterns to automatically determine the number of temporal clusters in my RNA-seq data."

"Cluster my time-course genes and automatically pick the best number of clusters."

DTW-Based Clustering

"Some of my genes have phase-shifted responses. Cluster them using DTW distance in Python."

"Run time-series k-means with dynamic time warping on my expression profiles."

Post-Clustering Analysis

"After clustering, run GO enrichment on each temporal cluster to identify pathway themes."

"Show me which transcription factors are enriched in each temporal expression cluster."

What the Agent Will Do

  1. Confirm the input is pre-selected temporally variable genes; if it is the full matrix, prefilter (DE hits or top-variance) before clustering
  2. Standardize expression profiles (z-score per gene across timepoints)
  3. Choose a distance metric (Euclidean-on-zscore / correlation / constrained DTW) appropriate to whether phase shifts are expected
  4. Estimate and VALIDATE the fuzzifier (Mfuzz) and triangulate k across indices, biology, and bootstrap stability (not a single index)
  5. Run clustering (Mfuzz, TCseq, DEGreport, or tslearn) and filter genes by membership
  6. Interpret centroids as candidate programs; generate profile plots
  7. Run per-cluster enrichment using the INPUT gene set as background, avoiding the double-dipping trap
  8. Export cluster assignments for downstream analysis

Tips