【基因组学】使用StringTie+gffread鉴定基因的新转录本

写在前面

    转录组通常被用来寻找差异基因,但是有的时候我们想看一下已报道的基因是否存在可变剪切现象,即新转录本的挖掘,这个时候就需要利用StringTie+gffread来挖掘基因的新转录本。

StringTie

    StringTie用于转录本的组装和转录组数据的量化。它使用一种新的网络流算法和可选的从头组装步骤来组装和量化代表每个基因位点的多个剪接变体的全长转录本。它的输入不仅可以包括其他转录汇编程序也可以使用的短读序列的比对,还可以包括从这些比对中组合的长序列的比对

1.安装.

二进制文件,安装过程请看官方说明。
下载链接:http://ccb.jhu.edu/software/stringtie/dl/stringtie-2.2.1.Linux_x86_64.tar.gz

##解压缩
tar xvf stringtie-2.2.1.Linux_x86_64.tar.gz
vim ~/.bashrc
source ~/.bashrc

2.数据预处理

输入文件是用TopHat或Hisat2比对后得到的bam文件。

3.基本参数

-p 线程数  
-G 基因组注释文件  
-o 输出的gtf文件 
--merge 这是StringTie的一种特殊使用模式,与上面描述的程序集使用模式不同。在合并模式中,StringTie将GTF/GFF文件列表作为输入,并将这些转录合并/汇编为一组非冗余的转录。在新的差异分析流水线中使用这种模式,在多个RNA-Seq样本中生成一套统一的转录本(亚型)

4.正式运行

#批量输出注释文件
cat id | while read id; do stringtie  -p 16 -G ref/Orysativa.gtf -o gtf/$id.gtf 01-align-ensembl/$id.bam ; done &

    还有需要注意的是,如果输入的bam文件是来自于HISAT2比对的话,需要在HISAT2使用时加上--dta,这有利于stringtie的组装。

输出结果解读

Description of each column's values:

  • seqname: Denotes the chromosome, contig, or scaffold for this transcript. Here the assembled transcript is on chromosome X.
  • source: The source of the GTF file. Since this example was produced by StringTie, this column simply shows 'StringTie'.
  • feature: Feature type; e.g., exon, transcript, mRNA, 5'UTR).
  • start: Start position of the feature (exon, transcript, etc), using a 1-based index.
  • end: End position of the feature, using a 1-based index.
  • score: A confidence score for the assembled transcript. Currently this field is not used, and StringTie reports a constant value of 1000 if the transcript has a connection to a read alignment bundle.
  • strand: If the transcript resides on the forward strand, '+'. If the transcript resides on the reverse strand, '-'.
  • frame: Frame or phase of CDS features. StringTie does not use this field and simply records a ".".
  • attributes
: A semicolon-separated list of tag-value pairs, providing additional information about each feature. Depending on whether an instance is a transcript or an exon and on whether the transcript matches the reference annotation file provided by the user, the content of the attributes field will differ. The following list describes the possible attributes shown in this column:


*   gene_id: A unique identifier for a single gene and its child transcript and exons based on the alignments' file name.
    
    
*   transcript_id: A unique identifier for a single transcript and its child exons based on the alignments' file name.
    
    
*   exon_number: A unique identifier for a single exon, starting from 1, within a given transcript.
    
    
*   reference_id: The transcript_id in the reference annotation (optional) that the instance matched.
    
    
*   ref_gene_id: The gene_id in the reference annotation (optional) that the instance matched.
    
    
*   ref_gene_name: The gene_name in the reference annotation (optional) that the instance matched.
    
    
*   cov: The average per-base coverage for the transcript or exon.
    
    
*   FPKM: Fragments per kilobase of transcript per million read pairs. This is the number of pairs of reads aligning to this feature, normalized by the total number of fragments sequenced (in millions) and the length of the transcript (in kilobases).
    
    
*   TPM: Transcripts per million. This is the number of transcripts from this particular gene normalized first by gene length, and then by sequencing depth (in millions) in the sample. A detailed explanation and a comparison of TPM and FPKM can be found [here](http://www.rna-seqblog.com/rpkm-fpkm-and-tpm-clearly-explained/), and TPM was defined [by B. Li and C. Dewey here](http://bmcbioinformatics.biomedcentral.com/articles/10.1186/1471-2105-12-323).
#将多个转录本合并
stringtie --merge -G ref/Orysativa.gtf -e gtf/file1.gtf gtf/file2.gtf gtf/file3.gtf -o NIP0h.gtf

官网说还能将stringTie的count结果提取出来,用于Deseq2差异分析,这部分内容暂时用不到,往后用到的时候再来学习吧~

Gffcompare

当与参考注释(也作为GFF提供)进行比较时,gffcompare可用于比较、合并、注释和估计一个或多个GFF文件(“查询”文件)的准确性。

Assuming that Cufflinks' transcript assembly output file name is cufflinks_asm.gtf and StringTie's output is in stringtie_asm.gtf, while the reference annotation would be in a file called mm10.gff, the gffcompare commands would be

gffcompare -R -r mm10.gff -o cuffcmp cufflinks_asm.gtf</pre>

输出结果文件

  • cuffcmp.loci :locus id的位置信息,个人理解为组装后的gene的local信息

  • cuffcmp.stats :统计结果展示,看看就行了

  • cuffcmp.combined.gtf :如果输入多个gtf组装文件的话,这个文件是将多个文件中的转录本并集输入到这个文件中

  • cuffcmp.stringtie_merged_new.gtf.refmap :如果组装的gtf文件中的转录本either fully or partially match参考基因组转录本,则输入该文件中,也就是说组装后与参考基因组几乎完全匹配的转录本

  • cuffcmp.stringtie_merged_new.gtf.tmap :这个文件跟cuffcmp.stringtie_merged_new.gtf.refmap形式相似,但是输入的则是组装后与参考基因组较为近似的转录本

  • cuffcmp.tracking :这个是比较重要的一个文件,里面含有cuffcompare软件对组装转录本分类定义的描述信息

2.1 cuffcmp.tracking文件

  • 第1列 :Cufflinks transfrag id,A unique internal id for the transfrag

  • 第2列 :Cufflinks locus id,A unique internal id for the locus

  • 第3列 :Reference gene id(如果没有则为"-")

  • 第4列 :Reference transcript id(如果没有则为"-")

  • 第5列 :class code,也就是组装转录本的分类信息

1   =   Complete match of intron chain
 2   c   Contained
 3   j   Potentially novel isoform (fragment): at least one splice junction is shared with a reference transcript
 4   e   Single exon transfrag overlapping a reference exon and at least 10 bp of a reference intron, indicating a possible pre-mRNA fragment.
 5   i   A transfrag falling entirely within a reference intron
 6   o   Generic exonic overlap with a reference transcript
 7   p   Possible polymerase run-on fragment (within 2Kbases of a reference transcript)
 8   r   Repeat. Currently determined by looking at the soft-masked reference sequence and applied to transcripts where at least 50% of the bases are lower case
 9   u   Unknown, intergenic transcript
 10  x   Exonic overlap with reference on the opposite strand
 11  s   An intron of the transfrag overlaps a reference intron on the opposite strand (likely due to read mapping errors)
 12  .   (.tracking file only, indicates multiple classifications)</pre>
gffcompare class code.png

参考链接

1.StringTie https://ccb.jhu.edu/software/stringtie/

2.StringTie manual(附带输出结果解读) https://ccb.jhu.edu/software/stringtie/index.shtml?t=manual

3.gffcompare https://ccb.jhu.edu/software/stringtie/gffcompare.shtml

4.https://www.bioinfo-scrounger.com/archives/284/

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 199,440评论 5 467
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 83,814评论 2 376
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 146,427评论 0 330
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 53,710评论 1 270
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 62,625评论 5 359
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 48,014评论 1 275
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 37,511评论 3 390
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 36,162评论 0 254
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 40,311评论 1 294
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,262评论 2 317
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 37,278评论 1 328
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 32,989评论 3 316
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 38,583评论 3 303
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 29,664评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 30,904评论 1 255
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 42,274评论 2 345
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 41,856评论 2 339