bio-epitranscriptomics-merip-preprocessing
$
npx mdskill add GPTomics/bioSkills/bio-epitranscriptomics-merip-preprocessingAlign and QC MeRIP-seq samples for m6A peak calling.
- Prepares IP and input data for downstream m6A analysis.
- Depends on STAR, samtools, and deepTools.
- Executes splice-aware alignment and quality checks.
- Outputs coordinate-sorted BAM files for peak calling.
SKILL.md
.github/skills/bio-epitranscriptomics-merip-preprocessingView on GitHub ↗
---
name: bio-epitranscriptomics-merip-preprocessing
description: Align and QC MeRIP-seq IP and input samples for m6A analysis. Use when preparing MeRIP-seq data for peak calling or differential methylation analysis.
tool_type: cli
primary_tool: STAR
---
## Version Compatibility
Reference examples tested with: STAR 2.7.11+, deepTools 3.5+, samtools 1.19+
Before using code patterns, verify installed versions match. If versions differ:
- Python: `pip show <package>` then `help(module.function)` to check signatures
- 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.
# MeRIP-seq Preprocessing
**"Preprocess my MeRIP-seq IP and input samples"** → Align and QC methylated RNA immunoprecipitation sequencing data, comparing IP enrichment to input for downstream m6A peak calling.
- CLI: `STAR` for splice-aware alignment, `samtools` for post-processing, `deepTools` for QC
## Alignment with STAR
**Goal:** Align MeRIP-seq IP and input samples to the genome with splice-aware mapping for downstream peak calling.
**Approach:** Build a STAR genome index with gene annotations, then loop through all IP and input samples to produce coordinate-sorted BAM files.
```bash
# Build index (once)
STAR --runMode genomeGenerate \
--genomeDir star_index \
--genomeFastaFiles genome.fa \
--sjdbGTFfile genes.gtf
# Align IP and input samples
for sample in IP_rep1 IP_rep2 Input_rep1 Input_rep2; do
STAR --genomeDir star_index \
--readFilesIn ${sample}_R1.fastq.gz ${sample}_R2.fastq.gz \
--readFilesCommand zcat \
--outSAMtype BAM SortedByCoordinate \
--outFileNamePrefix ${sample}_
done
```
## QC Metrics
```bash
# Index BAMs
for bam in *Aligned.sortedByCoord.out.bam; do
samtools index $bam
done
# Check IP enrichment
# Good MeRIP: IP should have peaks, input should be uniform
samtools flagstat IP_rep1_Aligned.sortedByCoord.out.bam
```
## IP/Input Correlation
```python
import deeptools.plotCorrelation as pc
# Check replicate correlation
multiBamSummary bins \
-b IP_rep1.bam IP_rep2.bam Input_rep1.bam Input_rep2.bam \
-o results.npz
plotCorrelation -in results.npz \
--corMethod spearman \
-o correlation.png
```
## Related Skills
- read-qc/quality-reports - Raw read quality assessment
- read-alignment/star-alignment - General alignment concepts
- m6a-peak-calling - Next step after preprocessing
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.