Logo Bulk Rnaseq Limma Voom

Bulk Rnaseq Limma Voom

Cộng đồng
sagirimo
bulk-rnaseq-limma-voom

Bulk RNA-seq differential expression with limma-voom (and edgeR TMM) in plain Python/numpy/scipy, matching R limma; use for count matrices (including fractional RSEM expected counts) with covariates, moderated t statistics, empirical Bayes prior df/variance, voom weights or LOWESS mean-variance trends when R is unavailable.

Tổng quan

Nhà phát hànhsagirimo
Kho mãBioDSH
Tên kỹ năngbulk-rnaseq-limma-voom
Sao
65
Bản fork
2
Tệp đi kèm
6
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 6 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được sagirimo công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Bulk Rnaseq Limma Voom trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/bulk-rnaseq-limma-voom
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/sagirimo/BioDSH.git /tmp/BioDSH
mkdir -p .claude/skills
cp -r /tmp/BioDSH/biodsh-core/skills/bulk-rnaseq-limma-voom .claude/skills/bulk-rnaseq-limma-voom
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Bulk Rnaseq Limma Voom trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Bulk Rnaseq Limma Voom ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Bulk Rnaseq Limma Voom với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Bulk RNA-seq differential expression: limma-voom in Python

Use when a bulk RNA-seq count matrix must be analysed with limma-style linear models and you cannot (or must not) call R: voom precision weights, weighted per-gene least squares, empirical Bayes variance moderation (prior df, prior variance, moderated t), BH adjustment, optionally TMM effective library sizes. limma_py.py (next to this file) is a tested implementation that follows the R sources; copy the functions you need into your own script so it stays self-contained.

Steps

  1. Counts and samples. Rows = genes, columns = samples, aligned to the sample table by sample ID, never by position. Keep fractional counts (RSEM expected counts) as floats: do not round, do not treat as integers. Decide the gene set explicitly (all genes, or a filter the specification names) and apply it before voom; all-zero genes are excluded from the voom trend automatically but still get weights.
  2. Library sizes. Default: column sums of the counts used. With TMM: lib = colsums * tmm_factors(counts); compute factors on the same gene set edgeR would see (it drops all-zero rows itself). If the specification defines library size differently (e.g. totals over all genes before filtering), follow it.
  3. Design. Build the design matrix by name: intercept first, then the coefficient of interest, then covariates in the stated order; reference level coded 0. Drop samples with missing covariates only as the specification says, and record how many were dropped and why. Check full column rank (np.linalg.matrix_rank).
  4. voom. v = voom(counts, X, lib_size=lib) gives E (log2-CPM with +0.5 / +1 offsets) and weights. One voom per model when models use different samples or designs.
  5. Fit and moderate. fit = e_bayes(lm_fit(v['E'], X, v['weights'])). Read fit['df_prior'] (may be inf), fit['s2_prior'], fit['s2_post'], fit['t'], fit['df_total'] (capped at the pooled residual df, as limma does), fit['p_value']. Adjust per coefficient with p_adjust_bh, over the genes tested in that model.
  6. Report. Coefficient (log2 fold change), its moderated t and p, BH q, residual df, prior df and variance, number of genes tested and selected, sample counts per group (cases and comparison group), and any sensitivity model.

Pitfalls that change numbers

  • log-CPM is log2((count + 0.5) / (lib + 1) * 1e6); the voom trend x is Amean + mean(log2(lib + 1)) - log2(1e6), y is sqrt(sigma) from an unweighted fit; weights are 1 / trend(log2 fitted count)^4, with constant extrapolation beyond the ends.
  • Span: current limma (3.68) voom uses an adaptive span from the number of genes (span=None here, the default); limma releases before adaptive span used 0.5. If the specification names a span or a limma version, pass it; the choice moves every weight (7% on 4000 genes) and the prior df.
  • R lowess is not statsmodels lowess: it uses delta = 1% of the x range (interpolates between fitted points) and 3 robustness iterations. Use lowess_r; a different smoother changes every weight.
  • Prior df can be infinite (all genes share one variance); then s2_post = s2_prior and df_total equals the pooled residual df. Report it as infinite, not as a large number, if the output asks.
  • df_total is capped at the sum of residual df over genes; t uses the posterior variance, not the gene's own.
  • BH must be computed within each model/coefficient over exactly the tested genes; NaN p-values are left out.
  • contrast() gives exact per-gene SEs; limma's contrasts.fit approximates them for weighted, non-orthogonal designs.
  • Not implemented: eBayes(trend=TRUE), robust=TRUE, duplicateCorrelation, voomWithQualityWeights. Say so if the specification asks for them instead of silently using the plain versions.

Checks before reporting

  • Group sizes and dropped samples match the sample table; design columns are named and in order.
  • Weights are finite and positive; E has no NaN; the number of tested genes equals the gene set chosen in step 1.
  • Signs: the case coefficient is case minus reference.
  • Spot-check one gene by hand: weighted least squares with its weights reproduces its coefficient.

Validation

limma_py.py was compared with R 4.6 limma/edgeR (voom, lmFit, eBayes, calcNormFactors TMM, lowess, p.adjust) on synthetic fractional-count data with a group effect, a continuous covariate and all-zero genes: see VALIDATION.md.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Bulk Rnaseq Limma Voom làm được gì?

Bulk RNA-seq differential expression with limma-voom (and edgeR TMM) in plain Python/numpy/scipy, matching R limma; use for count matrices (including fractional RSEM expected counts) with covariates, moderated t statistics, empirical Bayes prior df/variance, voom weights or LOWESS mean-variance trends when R is unavailable.

Vì sao nên dùng Bulk Rnaseq Limma Voom trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Bulk Rnaseq Limma Voom là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Bulk Rnaseq Limma Voom trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/sagirimo/BioDSH/tree/main/biodsh-core/skills/bulk-rnaseq-limma-voom. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Bulk Rnaseq Limma Voom?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Bulk Rnaseq Limma Voom với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Bulk Rnaseq Limma Voom với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Bulk Rnaseq Limma Voom có miễn phí không?

Có. Kỹ năng này được sagirimo phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇