bio-ribo-seq-translation-efficiency
Calculate translation efficiency (TE) as the ratio of ribosome occupancy to mRNA abundance. Use when comparing translational regulation between conditions or identifying genes with altered translation independent of transcription.
Best use case
bio-ribo-seq-translation-efficiency is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Calculate translation efficiency (TE) as the ratio of ribosome occupancy to mRNA abundance. Use when comparing translational regulation between conditions or identifying genes with altered translation independent of transcription.
Teams using bio-ribo-seq-translation-efficiency should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/bio-ribo-seq-translation-efficiency/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How bio-ribo-seq-translation-efficiency Compares
| Feature / Agent | bio-ribo-seq-translation-efficiency | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Calculate translation efficiency (TE) as the ratio of ribosome occupancy to mRNA abundance. Use when comparing translational regulation between conditions or identifying genes with altered translation independent of transcription.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
## Version Compatibility
Reference examples tested with: DESeq2 1.42+, numpy 1.26+, pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
- Python: `pip show <package>` then `help(module.function)` to check signatures
- R: `packageVersion('<pkg>')` then `?function_name` to verify parameters
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
# Translation Efficiency
**"Calculate translation efficiency from my Ribo-seq and RNA-seq"** → Compute the ratio of ribosome occupancy to mRNA abundance per gene to identify translational regulation independent of transcription changes.
- R: `riborex` for differential TE with DESeq2 backend
- Python: Ribo-seq/RNA-seq count ratio with statistical testing
## Concept
Translation Efficiency (TE) = Ribo-seq reads / RNA-seq reads
- TE > 1: Efficiently translated (more ribosomes per mRNA)
- TE < 1: Poorly translated
- Changes in TE indicate translational regulation
## Calculate TE with Plastid
```python
from plastid import BAMGenomeArray, GTF2_TranscriptAssembler
import pandas as pd
import numpy as np
def calculate_te(riboseq_bam, rnaseq_bam, gtf_path):
'''Calculate translation efficiency per gene'''
# Load transcripts
transcripts = list(GTF2_TranscriptAssembler(gtf_path))
# Load alignments
ribo = BAMGenomeArray(riboseq_bam)
rna = BAMGenomeArray(rnaseq_bam)
results = []
for tx in transcripts:
if tx.cds_start is None:
continue
# Get CDS region
cds = tx.get_cds()
# Count reads
ribo_counts = ribo.count_in_region(cds)
rna_counts = rna.count_in_region(tx) # Full transcript for RNA-seq
# Normalize by length
cds_length = sum(len(seg) for seg in cds)
tx_length = tx.length
ribo_rpk = ribo_counts / (cds_length / 1000)
rna_rpk = rna_counts / (tx_length / 1000)
if rna_rpk > 0:
te = ribo_rpk / rna_rpk
else:
te = np.nan
results.append({
'gene': tx.get_gene(),
'transcript': tx.get_name(),
'ribo_counts': ribo_counts,
'rna_counts': rna_counts,
'te': te
})
return pd.DataFrame(results)
```
## Differential TE with riborex
```r
library(riborex)
# Load count matrices
# Rows = genes, columns = samples
ribo_counts <- read.csv('ribo_counts.csv', row.names = 1)
rna_counts <- read.csv('rna_counts.csv', row.names = 1)
# Sample information
sample_info <- data.frame(
sample = colnames(ribo_counts),
condition = factor(c('control', 'control', 'treated', 'treated'))
)
# Run riborex
results <- riborex(
rnaCntTable = rna_counts,
riboCntTable = ribo_counts,
rnaCond = sample_info$condition,
riboCond = sample_info$condition
)
# Significant differential TE
sig_te <- results[results$padj < 0.05, ]
```
## Using DESeq2 Interaction Model
**Goal:** Test for differential translation efficiency between conditions using a formal statistical framework that separates transcriptional from translational regulation.
**Approach:** Combine Ribo-seq and RNA-seq counts into one matrix, fit a DESeq2 model with a condition-by-assay interaction term, and extract the interaction coefficient which represents differential TE.
```r
library(DESeq2)
# Combine Ribo-seq and RNA-seq counts
counts <- cbind(ribo_counts, rna_counts)
# Design matrix with interaction term
coldata <- data.frame(
condition = factor(rep(c('ctrl', 'ctrl', 'treat', 'treat'), 2)),
assay = factor(rep(c('ribo', 'rna'), each = 4)),
row.names = colnames(counts)
)
dds <- DESeqDataSetFromMatrix(
countData = counts,
colData = coldata,
design = ~ condition + assay + condition:assay
)
dds <- DESeq(dds)
# The interaction term tests for differential TE
res_te <- results(dds, name = 'conditiontreat.assayribo')
```
## Normalize Counts
```python
def normalize_counts(counts_df, method='tpm'):
'''Normalize count matrix'''
if method == 'tpm':
# TPM normalization
rpk = counts_df.div(counts_df['length'] / 1000, axis=0)
scale = rpk.sum(axis=0) / 1e6
tpm = rpk.div(scale, axis=1)
return tpm
elif method == 'rpkm':
# RPKM normalization
total = counts_df.sum(axis=0)
rpm = counts_df / total * 1e6
rpkm = rpm.div(counts_df['length'] / 1000, axis=0)
return rpkm
def calculate_te_matrix(ribo_tpm, rna_tpm):
'''Calculate TE from normalized matrices'''
# Add pseudocount to avoid division by zero
te = (ribo_tpm + 0.1) / (rna_tpm + 0.1)
return np.log2(te) # Log2 TE
```
## Interpretation
| Log2 TE Change | Interpretation |
|----------------|----------------|
| > 1 | Strong translational activation |
| 0.5 - 1 | Moderate activation |
| -0.5 - 0.5 | No significant change |
| -1 - -0.5 | Moderate repression |
| < -1 | Strong translational repression |
## Related Skills
- rna-quantification - Get RNA-seq counts
- differential-expression - Compare expression
- orf-detection - Identify translated ORFsRelated Skills
bio-ribo-seq-ribosome-stalling
Detect ribosome pausing and stalling sites from Ribo-seq data at codon resolution. Use when studying translational regulation, identifying pause sites, or analyzing codon-specific translation dynamics.
bio-ribo-seq-ribosome-periodicity
Validate Ribo-seq data quality by checking 3-nucleotide periodicity and calculating P-site offsets. Use when assessing library quality or determining read offsets for downstream analysis.
bio-ribo-seq-riboseq-preprocessing
Preprocess ribosome profiling data including adapter trimming, size selection, rRNA removal, and alignment. Use when preparing Ribo-seq reads for downstream analysis of translation.
bio-ribo-seq-orf-detection
Detect and quantify translated ORFs from Ribo-seq data including uORFs and novel ORFs using RiboCode and ORFquant. Use when identifying translated regions beyond annotated coding sequences or quantifying ORF-level translation.
zinc-database
Access ZINC (230M+ purchasable compounds). Search by ZINC ID/SMILES, similarity searches, 3D-ready structures for docking, analog discovery, for virtual screening and drug discovery.
zarr-python
Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.
xlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.
writing-skills
Use when creating new skills, editing existing skills, or verifying skills work before deployment
writing-plans
Use when you have a spec or requirements for a multi-step task, before touching code
wikipedia-search
Search and fetch structured content from Wikipedia using the MediaWiki API for reliable, encyclopedic information
wellally-tech
Integrate digital health data sources (Apple Health, Fitbit, Oura Ring) and connect to WellAlly.tech knowledge base. Import external health device data, standardize to local format, and recommend relevant WellAlly.tech knowledge base articles based on health data. Support generic CSV/JSON import, provide intelligent article recommendations, and help users better manage personal health data.
weightloss-analyzer
分析减肥数据、计算代谢率、追踪能量缺口、管理减肥阶段