bio-epitranscriptomics-modification-visualization
$
npx mdskill add GPTomics/bioSkills/bio-epitranscriptomics-modification-visualizationVisualize RNA modification patterns relative to genomic landmarks.
- Generate metagene plots and browser tracks for m6A distribution data.
- Depends on R Guitar package and deepTools computeMatrix and plotHeatmap.
- Introspects installed package versions to adapt code to actual APIs.
- Outputs PDF files and genome browser tracks for distribution visualization.
SKILL.md
.github/skills/bio-epitranscriptomics-modification-visualizationView on GitHub ↗
---
name: bio-epitranscriptomics-modification-visualization
description: Create metagene plots and browser tracks for RNA modification data. Use when visualizing m6A distribution patterns around genomic features like stop codons.
tool_type: r
primary_tool: Guitar
---
## Version Compatibility
Reference examples tested with: deepTools 3.5+
Before using code patterns, verify installed versions match. If versions differ:
- R: `packageVersion('<pkg>')` then `?function_name` to verify parameters
- CLI: `<tool> --version` then `<tool> --help` to confirm flags
If code throws ImportError, AttributeError, or TypeError, introspect the installed
package and adapt the example to match the actual API rather than retrying.
# Modification Visualization
**"Visualize m6A distribution around stop codons"** → Create metagene plots and genome browser tracks showing RNA modification patterns relative to transcript landmarks (5'UTR, CDS, 3'UTR, stop codon).
- R: `Guitar::GuitarPlot()` for metagene distribution plots
- CLI: `deeptools computeMatrix` → `plotHeatmap` for modification heatmaps
## Metagene Plots with Guitar
```r
library(Guitar)
library(TxDb.Hsapiens.UCSC.hg38.knownGene)
# Load m6A peaks
peaks <- import('m6a_peaks.bed')
# Create metagene plot
# Shows distribution relative to transcript features
GuitarPlot(
peaks,
txdb = TxDb.Hsapiens.UCSC.hg38.knownGene,
saveToPDFprefix = 'm6a_metagene'
)
```
## Custom Metagene with deepTools
**Goal:** Create a metagene profile showing m6A enrichment distribution relative to gene body landmarks (TSS, TES).
**Approach:** Compute the log2 IP/input ratio as a bigWig track with bamCompare, then build a signal matrix over scaled gene regions with computeMatrix and render as a profile plot.
```bash
# Create bigWig from IP/Input ratio
bamCompare -b1 IP.bam -b2 Input.bam \
--scaleFactors 1:1 \
--ratio log2 \
-o IP_over_Input.bw
# Metagene around stop codons
computeMatrix scale-regions \
-S IP_over_Input.bw \
-R genes.bed \
--regionBodyLength 2000 \
-a 500 -b 500 \
-o matrix.gz
plotProfile -m matrix.gz -o metagene.pdf
```
## Browser Tracks
```bash
# Create normalized bigWig for genome browser
bamCoverage -b IP.bam \
--normalizeUsing CPM \
-o IP_normalized.bw
# Peak BED to bigBed
bedToBigBed m6a_peaks.bed chrom.sizes m6a_peaks.bb
```
## Heatmaps
```r
library(ComplexHeatmap)
# m6A signal around peaks
Heatmap(
signal_matrix,
name = 'm6A signal',
cluster_rows = TRUE,
show_row_names = FALSE
)
```
## Related Skills
- epitranscriptomics/m6a-peak-calling - Generate peaks for visualization
- data-visualization/genome-tracks - IGV, UCSC integration
- chip-seq/chipseq-visualization - Similar techniques
More from GPTomics/bioSkills
- bio-admet-predictionPredicts ADMET properties using ADMETlab 3.0 API or DeepChem models. Estimates bioavailability, CYP inhibition, hERG liability, and 119 toxicity endpoints with uncertainty quantification. Filters for PAINS and other structural alerts. Use when filtering compounds for drug-likeness or prioritizing leads by predicted safety.
- bio-alignment-amplicon-clippingTrim PCR primers from aligned reads in amplicon-panel BAMs using samtools ampliconclip. Use when processing SARS-CoV-2 ARTIC, hereditary cancer panels, ctDNA hot-spot panels, or any amplicon assay where primer-derived bases would falsely confirm reference at primer footprints.
- bio-alignment-filteringFilter alignments by flags, mapping quality, and regions using samtools view and pysam. Use when extracting specific reads, removing low-quality alignments, or subsetting to target regions.
- bio-alignment-indexingCreate and use BAI/CSI indices for BAM/CRAM files using samtools and pysam. Use when enabling random access to alignment files or fetching specific genomic regions.
- bio-alignment-ioRead, write, and convert multiple sequence alignment files using Biopython Bio.AlignIO. Supports Clustal, PHYLIP, Stockholm, FASTA, Nexus, and other alignment formats for phylogenetics and conservation analysis. Use when reading, writing, or converting alignment file formats.
- bio-alignment-msa-parsingParse and analyze multiple sequence alignments using Biopython. Extract sequences, identify conserved regions, analyze gaps, work with annotations, and manipulate alignment data for downstream analysis. Use when parsing or manipulating multiple sequence alignments.
- bio-alignment-msa-statisticsCalculate alignment statistics including sequence identity, conservation scores, substitution matrices, and similarity metrics. Use when comparing alignment quality, measuring sequence divergence, and analyzing evolutionary patterns.
- bio-alignment-multiplePerform multiple sequence alignment using MAFFT, MUSCLE5, ClustalOmega, or T-Coffee. Guides tool and algorithm selection based on dataset size, sequence divergence, and downstream application. Use when aligning three or more homologous sequences for phylogenetics, conservation analysis, or evolutionary studies.
- bio-alignment-pairwisePerform pairwise sequence alignment using Biopython Bio.Align.PairwiseAligner. Use when comparing two sequences, finding optimal alignments, scoring similarity, and identifying local or global matches between DNA, RNA, or protein sequences.
- bio-alignment-sortingSort alignment files by coordinate or read name using samtools and pysam. Use when preparing BAM files for indexing, variant calling, or paired-end analysis.