StringTie 使用教程
项目地址:https://gitcode.com/gh_mirrors/st/stringtie
项目介绍
StringTie 是一个用于 RNA-Seq 数据转录本组装和定量的快速且高效的工具。它使用了一种新颖的网络流算法以及一个可选的 de novo 组装步骤,来组装和定量代表多个剪接变体的全长转录本。StringTie 的输入可以包括短读序列的比对,也可以包括从这些读序列组装的长序列的比对。为了识别实验间差异表达的基因,StringTie 的输出可以进一步处理和评估。
项目快速启动
安装
首先,从 GitHub 仓库下载 StringTie 的源码包:
git clone https://github.com/gpertea/stringtie.git
cd stringtie
make
使用
以下是一个基本的 StringTie 使用示例:
stringtie -o output.gtf input.bam
其中,input.bam
是排序后的 RNA-Seq 读取比对文件,output.gtf
是输出的 GTF 文件。
应用案例和最佳实践
案例一:差异表达分析
在两个不同的实验条件下,使用 StringTie 进行转录本组装和定量,然后使用 gffcompare
工具进行比较分析:
stringtie -o sample1.gtf sample1.bam
stringtie -o sample2.gtf sample2.bam
gffcompare -R -G -o comparison sample1.gtf sample2.gtf
最佳实践
- 输入文件准备:确保输入的 BAM 文件是按基因组位置排序的。
- 参数调整:根据具体需求调整 StringTie 的参数,例如
-l
用于设置转录本标签,-p
用于设置线程数。
典型生态项目
DESeq2
DESeq2 是一个用于差异表达分析的 R 包,可以与 StringTie 的输出结合使用:
library(DESeq2)
countData <- read.table("stringtie_counts.txt", header=TRUE, row.names=1)
condition <- factor(c("control", "treated"))
dds <- DESeqDataSetFromMatrix(countData, DataFrame(condition), design=~condition)
dds <- DESeq(dds)
res <- results(dds)
edgeR
edgeR 是另一个用于差异表达分析的 R 包,同样可以与 StringTie 的输出结合使用:
library(edgeR)
counts <- read.table("stringtie_counts.txt", header=TRUE, row.names=1)
group <- factor(c("control", "treated"))
y <- DGEList(counts=counts, group=group)
y <- calcNormFactors(y)
design <- model.matrix(~group)
y <- estimateDisp(y, design)
fit <- glmQLFit(y, design)
qlf <- glmQLFTest(fit, coef=2)
topTags(qlf)
通过这些工具和方法,可以有效地进行 RNA-Seq 数据的转录本组装和差异表达分析。