SKILL.md
Version Compatibility
Reference examples tested with: Salmon 1.10+
Before using code patterns, verify installed versions match. If versions differ:
- R:
packageVersion('<pkg>')then?function_nameto verify parameters
If code throws ImportError, AttributeError, or TypeError, introspect the installed package and adapt the example to match the actual API rather than retrying.
Isoform Switching Analysis
Identify isoform switches and predict their functional consequences on protein structure and function.
IsoformSwitchAnalyzeR Workflow
Goal: Identify genes where the dominant isoform switches between conditions.
Approach: Import Salmon quantification, filter low-expression isoforms, and test for isoform usage changes with DEXSeq-based statistics.
"Analyze isoform switching" -> Import transcript quantification, test for dominant isoform changes, and assess functional consequences.
- R:
IsoformSwitchAnalyzeR(importRdata + isoformSwitchTestDEXSeq)
library(IsoformSwitchAnalyzeR)
# Import transcript quantification from Salmon
salmonQuant <- importIsoformExpression(
parentDir = 'salmon_quant/',
addIsofomIdAsColumn = TRUE
)
# Create switch analysis object
switchAnalyzeRlist <- importRdata(
isoformCountMatrix = salmonQuant$counts,
isoformRepExpression = salmonQuant$abundance,
designMatrix = data.frame(
sampleID = colnames(salmonQuant$counts),
condition = c('control', 'control', 'control', 'treatment', 'treatment', 'treatment')
),
isoformExonAnnoation = 'annotation.gtf',
isoformNtFasta = 'transcripts.fa'
)
# Filter lowly expressed isoforms
switchAnalyzeRlist <- preFilter(
switchAnalyzeRlist,
geneExpressionCutoff = 1, # Minimum TPM
isoformExpressionCutoff = 0,
removeSingleIsoformGenes = TRUE
)
# Test for isoform switches
switchAnalyzeRlist <- isoformSwitchTestDEXSeq(
switchAnalyzeRlist,
reduceToSwitchingGenes = TRUE
)
