agent-browser
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test w…
Maintainer FreedomIntelligence · Last updated April 1, 2026
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.
Original source
https://github.com/FreedomIntelligence/OpenClaw-Medical-Skills/tree/main/skills/bio-ribo-seq-ribosome-periodicity
Skill Snapshot
Source Doc
Goal: Verify that Ribo-seq reads exhibit the expected 3-nucleotide translocation pattern characteristic of active translation.
Approach: Load P-site mapped reads and compute metagene profiles around start codons to check for triplet periodicity.
Ribosomes move 3 nucleotides per codon. Good Ribo-seq data shows strong periodicity:
from plastid import BAMGenomeArray, FivePrimeMapFactory, GenomicSegment
import numpy as np
import matplotlib.pyplot as plt
## Calculate P-site Offset
**Goal:** Determine the optimal P-site offset from the 5' end of ribosome footprints for accurate codon-level positioning.
**Approach:** Run metagene analysis around annotated start codons and identify the offset that aligns the signal peak with the AUG position.
```python
from plastid import metagene_analysis
## Typically 12-15 nt from 5' end for 28-30 nt reads
def determine_psite_offset(bam_path, annotation_file):
'''Determine optimal P-site offset from metagene analysis'''
from plastid import GTF2_TranscriptAssembler, BAMGenomeArray
# Load annotations
transcripts = list(GTF2_TranscriptAssembler(annotation_file))
# Load reads
alignments = BAMGenomeArray(bam_path, mapping=FivePrimeMapFactory())
# Metagene around start codons
# Peak should align with start codon position
metagene_data = metagene_analysis(
transcripts,
alignments,
upstream=50,
downstream=100
)
return metagene_data
Related skills
Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test w…
Access 20+ years of global financial data: equities, options, forex, crypto, commodities, economic indicators, and 50+ technical indicators.
Filter alignments by flag, quality, region, or paired status.
Index BAM/CRAM files with samtools index for random access.