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.
Install
mkdir -p .claude/skills/bio-ribo-seq-translation-efficiency && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6210" && unzip -o skill.zip -d .claude/skills/bio-ribo-seq-translation-efficiency && rm skill.zipInstalls to .claude/skills/bio-ribo-seq-translation-efficiency
About this skill
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>thenhelp(module.function)to check signatures - R:
packageVersion('<pkg>')then?function_nameto 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:
riborexfor 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
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
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.
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
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 ORFs
More by GPTomics
View all skills by GPTomics →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversA2A Bridge enables agent discovery and task management by bridging Google's protocol with MCP, supporting shortest path
Streamline billing with Paddle API tools. Manage products, prices, and subscriptions efficiently—an alternative to Strip
Connect your project with Weblate for seamless translation management, project tracking, and multilingual workflow optim
Universal Image Generator is an AI image generator that supports multi-provider photo creation, advanced editing, and au
Boost your AI code assistant with Context7: inject real-time API documentation from OpenAPI specification sources into y
Extend your developer tools with GitHub MCP Server for advanced automation, supporting GitHub Student and student packag
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.