How anishl135/twintrondetect works
Twintron Detector is a command-line RNA-seq analysis tool that finds candidate splice junctions nested inside annotated U12 introns, compares their usage between two conditions, and emits tables, reports, and genome-browser tracks. The main workflow validates inputs, discovers nested junctions using junction BED and BAM evidence, then classifies candidates, annotates known-junction status, scores evidence, calculates differential usage, and writes results. README capabilities guide the map; sampled excerpts confirm key detection, classification, annotation, validation, scoring, and reporting details, but not every orchestration call.
Main entry points: cli.py CLI orchestration · nested_junctions.py Nested discovery · references.py Reference access · html.py HTML report
Components 30
Inputs and access
- CLI orchestration
src/twintron/cli.py - BAM access
src/twintron/io/bam.py - Junction indexing
src/twintron/io/junctions.py - Reference access
src/twintron/io/references.py
Candidate detection
- Outer introns
src/twintron/detection/outer_introns.py - Nested discovery
src/twintron/detection/nested_junctions.py - Candidate handling
src/twintron/detection/candidate.py - Junction clustering
src/twintron/detection/clustering.py - BAM support
src/twintron/validation/bam_support.py - Junction validation
src/twintron/validation/junction_validation.py - Replicate support
src/twintron/validation/replicate_support.py - Mappability scoring
src/twintron/validation/mappability.py
Candidate interpretation
- Structural classes
src/twintron/classification/structural.py - Known status
src/twintron/annotation/gencode.py - Evidence score
src/twintron/scoring/evidence.py - Splice motifs
src/twintron/scoring/motif.py - Confidence tier
src/twintron/scoring/confidence.py - Usage comparison
src/twintron/statistics/differential.py
Results and reporting
- CSV and BED12
src/twintron/io/writers.py - Report tables
src/twintron/reporting/tables.py - Report figures
src/twintron/reporting/figures.py - HTML report
src/twintron/reporting/html.py
Other components
- Researcher
- RNA-seq BAMs
- Junction BEDs
- U12 reference
- Genome FASTA
- Known junctions
- Mappability track
- Candidate outputs
Connections 37
- Researcher → CLI orchestration: runs detection
- CLI orchestration → BAM access: opens alignments
- RNA-seq BAMs → BAM access: read by
- CLI orchestration → Junction indexing: loads junctions
- Junction BEDs → Junction indexing: indexed from
- CLI orchestration → Reference access: loads references
- U12 reference → Reference access: read by
- Genome FASTA → Reference access: read by
- Mappability track → Reference access: optional input
- CLI orchestration → Outer introns: starts scan
- Outer introns → Nested discovery: supplies loci
- Nested discovery → Junction validation: checks calls
- Junction validation → Junction indexing: queries index
- Nested discovery → BAM support: checks reads
- BAM support → BAM access: counts alignments
- Nested discovery → Junction clustering: clusters junctions
- Nested discovery → Replicate support: checks recurrence
- Nested discovery → Candidate handling: forms candidates
- CLI orchestration → Structural classes: classifies candidates
- CLI orchestration → Known status: labels status
- Known status → Junction indexing: parses coordinates
- Known junctions → Known status: compared against
- CLI orchestration → Evidence score: scores support
- Evidence score → Splice motifs: uses motif strength
- Splice motifs → Reference access: reads sequence
- CLI orchestration → Mappability scoring: assesses uniqueness
- Mappability scoring → Reference access: uses reference data
- CLI orchestration → Confidence tier: assigns tier
- CLI orchestration → Usage comparison: compares usage
- CLI orchestration → CSV and BED12: writes candidate data
- CLI orchestration → Report tables: prepares summaries
- CLI orchestration → Report figures: prepares figures
- CLI orchestration → HTML report: generates report
- CSV and BED12 → Candidate outputs: emits CSV and BED12
- HTML report → Candidate outputs: emits HTML
- Report tables → HTML report: supplies summaries
- Report figures → HTML report: supplies figures