Skip to content
Back to skills

Bio Applied Isoform Analysis

ASecurity

Isoform analysis with long reads — Minimap2 splice alignment, bambu isoform discovery, DRIMSeq differential isoform usage.

  • 4 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 27, 2026
data-aipythongobashexpresstestinggit

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add Pavel-Kravchenko/Bioinformatics --skill bio-applied-isoform-analysis --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Bio Applied Isoform Analysis?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Bio Applied Isoform Analysis
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/pavel-kravchenko-bio-applied-isoform-analysis/badge)](https://www.skillsdirectory.com/skills/pavel-kravchenko-bio-applied-isoform-analysis)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bio-applied-isoform-analysis
description: Isoform analysis with long reads — Minimap2 splice alignment, bambu isoform discovery, DRIMSeq differential isoform usage.
tool_type: python
primary_tool: NumPy
---

# Isoform Analysis with Long Reads

- [FLAMES](https://github.com/LuyiTian/FLAMES)
- [IsoSeq3 (PacBio)](https://github.com/PacificBiosciences/IsoSeq)
- [bambu](https://github.com/GoekeLab/bambu)

## Technology Comparison

| Feature | Short-read (Illumina) | ONT cDNA/direct-RNA | PacBio IsoSeq (HiFi) |
|---|---|---|---|
| Read length | 75–300 bp | 1–20 kb | 1–30 kb (CCS) |
| Per-read error | ~0.1% | ~1–3% (R10.4.1) | ~0.1% (HiFi) |
| Isoform resolution | Inference required | Direct | Direct |
| Modification detection | No | Yes (direct-RNA only) | No |

## Pitfalls

- **Coordinate systems**: BED uses 0-based half-open; VCF/GFF use 1-based inclusive — mixing them causes off-by-one errors.
- **PCR-cDNA amplification bias**: PCR amplification distorts isoform frequency ratios — avoid when input is sufficient.
- **NDR threshold (bambu)**: Default NDR=1 accepts all novel isoforms. Use NDR=0.1 for strict filtering (90% confidence a transcript is genuine). Too lenient → many false positives.
- **Isoform quantification is compositional**: Counts per gene sum to a total. Use Dirichlet-multinomial models (DRIMSeq), not simple t-tests, for differential isoform usage.
- **Batch effects**: Always check for batch confounding before interpreting biological signal.
- **Multiple testing**: Apply FDR correction (Benjamini-Hochberg) when testing thousands of features simultaneously.

## Isoform Categories (bambu)

| Category | Meaning |
|---|---|
| `annotated` | Exact match to reference transcript |
| `novel_in_catalog` | New combination of known exons |
| `novel_splice_site` | New 5' or 3' splice donor/acceptor |
| `novel_exon` | Entirely new exon |
| `intergenic` | In unannotated region — usually filter out |

## Alignment

```bash
# ONT cDNA
minimap2 -ax splice --secondary=no -C5 --cs \
    hg38.fa cdna_reads.fastq.gz \
    | samtools sort -o cdna_aligned.bam -@ 8
samtools index cdna_aligned.bam

# PacBio HiFi / IsoSeq (splice:hq for high-accuracy reads)
minimap2 -ax splice:hq --secondary=no -C5 \
    hg38.fa isoseq_reads.fastq.gz \
    | samtools sort -o isoseq_aligned.bam -@ 8
samtools index isoseq_aligned.bam
```

**Key Minimap2 flags:**
- `-ax splice`: long-read spliced alignment preset
- `--secondary=no`: one alignment per read
- `-C5`: extra cost for non-canonical splice sites (GT-AG = 0, others penalized)
- `--cs`: output alignment difference string

## bambu Isoform Discovery (R)

```r
library(bambu)

annotations <- prepareAnnotations('gencode.v44.annotation.gtf')

se <- bambu(
  reads       = c('ctrl_rep1.bam', 'ctrl_rep2.bam', 'treat_rep1.bam', 'treat_rep2.bam'),
  annotations = annotations,
  genome      = 'hg38.fa',
  NDR         = 0.1   # novel discovery rate; lower = stricter
)

writeBambuOutput(se, path = 'bambu_output/')
# counts_transcript.txt: transcript-level counts (rows=transcripts, cols=samples)
# counts_gene.txt:       gene-level counts
# extended_annotations.gtf: all transcripts including novel ones
```

## Differential Isoform Usage — DRIMSeq (R)

DRIMSeq models isoform counts per gene as a **Dirichlet-multinomial distribution** (counts are compositional: they sum to the gene total).

```r
library(DRIMSeq)

counts_tx <- read.table('bambu_output/counts_transcript.txt', header=TRUE)
sample_info <- data.frame(
  sample_id = colnames(counts_tx)[-c(1,2)],
  condition = c('Control', 'Control', 'Treatment', 'Treatment')
)

d <- dmDSdata(counts = counts_tx, samples = sample_info)

# Filter: require ≥2 isoforms and adequate expression
d <- dmFilter(d,
  min_samps_gene_expr    = 2,
  min_samps_feature_expr = 2,
  min_gene_expr          = 10,
  min_feature_expr       = 5
)

d <- dmPrecision(d)
d <- dmFit(d)
d <- dmTest(d, coef = 'conditionTreatment')

res_gene <- results(d, level = 'gene')    # omnibus test
res_tx   <- results(d, level = 'feature') # per-transcript
sig      <- res_gene[res_gene$adj_pvalue < 0.05, ]
```

## QC Metrics to Check

- Mapping rate (expect >90% for good library)
- Multi-exon read fraction
- NFR (<150 bp) fragment proportion
- Isoform category breakdown (high `intergenic` fraction = quality concern)
- D50: top N clones covering 50% of reads (lower = more diversity in expression)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.