Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/bio-ribo-seq-translation-efficiency/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-22 | ✗→✓ | ▲ Improved | — | — |
| case-12 | ✗→✓ | ▲ Improved | — | — |
| case-16 | ✗→✓ | ▲ Improved | — | — |
| case-04 | ✗→✓ | ▲ Improved | — | — |
| case-21 | ✗→✓ | ▲ Improved | — | — |
Reference examples tested with: DESeq2 1.42+, numpy 1.26+, pandas 2.2+
Before using code patterns, verify installed versions match. If versions differ:
pip show <package> then help(module.function) to check signaturespackageVersion('<pkg>') then ?function_name to verify parametersIf code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
"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.
riborex for differential TE with DESeq2 backendTranslation Efficiency (TE) = Ribo-seq reads / RNA-seq reads
pythonfrom 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)
rlibrary(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, ]
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.
rlibrary(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')
pythondef 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
| 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 |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-14 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-15 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-01 | pass→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-07 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-03 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-22 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-12 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-10 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-16 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-20 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-17 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-13 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-18 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-02 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-05 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-11 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-09 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-19 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-08 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-06 | fail→fail | — | — | — | — | — | — | — | — | — | — | — | — |
case-04 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
case-21 | fail→pass | — | — | — | — | — | — | — | — | — | — | — | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +23 percentage points is the difference between those two pass rates over the 22 comparable cases.
The per-case answers from this run were removed by the retention sweep, so the case table below shows the verdicts without the text either arm produced. The counts above were recorded at the time and are unaffected. Answers are now kept for 180 days.
Other measured skills in the registry, with their headline benchmark lift.