乐于分享
好东西不私藏

使用转录组组装软件StringTie获取组装好的转录本序列

使用转录组组装软件StringTie获取组装好的转录本序列

StringTie 是一款广泛应用于转录组数据分析的工具,主要用于 RNA-seq 数据中组装和定量转录本。它能够将比对到参考基因组上的 RNA-seq 读段(reads)组装成完整的转录本,并估算每个转录本和基因的表达水平(如 FPKMTPM)。

StringTie的安装:

conda create --namestringtie -c bioconda stringtie

激活环境:

conda activate stringtie

stringtie的输入文件是转录组数据比对到基因组上得到的bam文件

获得方式如下:

hisat2安装

conda create --name hisat2-c bioconda hisat2

激活环境

conda activate hisat2

建立索引

hisat2-build 参考基因组.fa ./输出结果名_index

比对

hisat2 --dta -p 20 -x ./输出结果名_index \

     -1 _R1.fq.gz \

     -2 _R2.fq.gz \

     -S 样本名.sam

再使用samtools生成bam文件

samtools安装

conda create --name samtools -c bioconda samtools

激活环境

conda activate samtools

生成bam

samtools sort -@ 20 样本名.sam -o 样本名_sorted.bam

stringtie的运行时间也比较长,建议使用nohup运行:

nohup stringtie -p 30 \

-o 输出结果名.gtf\

样本名_sorted.bam \

 > stringtie.log 2>&1 &

-p 使用的线程(CPU)数量(默认: 1)

-o 组装转录本GTF的输出路径/文件名(默认: stdout)

结果会输出一个gtf格式的文件,可以使用gffread提取相应的转录本序列

gffread安装:

conda create --name gffread -c bioconda gffread

激活环境:

conda activate gffread

提取转录本序列:

gffread -w transcripts.fa \

-g基因组.fa \

输出结果名.gtf

transcripts.fa既是组装好的转录本序列