GTF format
GTF 文件一般用于对基因组区域的注释,记录基因组上哪个区域是一个基因,哪个区域是一个repeat区等等。该格式共包含9列信息。
Note:GTF的格式与GFF2 的格式基本一致,而与GFF3有一定的差异。
Fields说明
示例
我们先看一个人类基因组上的TP53基因,其中一个转录本的的GTF注释文件。
chr17 HAVANA CDS 7676521 7676594 . - 0 gene_id "ENSG00000141510.16"; transcript_id "ENST00000413465.6"; chr17 HAVANA CDS 7676382 7676403 . - 1 gene_id "ENSG00000141510.16"; transcript_id "ENST00000413465.6"; chr17 HAVANA CDS 7675994 7676272 . - 0 gene_id "ENSG00000141510.16"; transcript_id "ENST00000413465.6"; chr17 HAVANA CDS 7675053 7675236 . - 0 gene_id "ENSG00000141510.16"; transcript_id "ENST00000413465.6"; chr17 HAVANA CDS 7674859 7674971 . - 2 gene_id "ENSG00000141510.16"; transcript_id "ENST00000413465.6"; chr17 HAVANA CDS 7674181 7674290 . - 0 gene_id "ENSG00000141510.16"; transcript_id "ENST00000413465.6"; chr17 HAVANA CDS 7661942 7662014 . - 1 gene_id "ENSG00000141510.16"; transcript_id "ENST00000413465.6";
格式说明
上面格式包含了9列信息。
- 第一列:seqname - name of the chromosome or scaffold
- 第二列:source - name of the program (database or project name) that generated this feature,即该行注释信息的来源
- 第三列:feature - feature type name, 可以是 Gene,Variation,Similarity,CDS,UTR,SNP等等
- 第四列:start - Start position of the feature,坐标计数从1开始,为1-based坐标
- 第五列:end - End position of the feature,坐标计数从1开始,为1-based坐标,和start一起组成闭区间
- 第六列:score - 该feature 的得分
- 第七咧:strand - 链的方向, + (forward) or - (reverse)
- 第八列:frame - 可取三个值,'0','1' or '2',代表codon phase,0代表mRNA的5'位置上的碱基是三联密码子的第一位,1代表5'上游存在一个属于上一个CDS codon的碱基,2代表5'上游存在两个属于上一个CDS codon的碱基。 需要注意的是 对于strand 为‘-’ 的时候,5’上游的base 是end position(end > start)。 计算方法见:关于codon frame 的计算
- 第九列:attribute - 用逗号分隔的属性值。
- 补充: 若某列的值为'.',代表该值缺失,可忽略
因此,上例中表示的是:基因id为ENSG00000141510.16的CDS区域,位置在人类17号染色体的负链(给定的基因组序列为正链)上。
关于codon frame 的计算
例:
AB000123 Twinscan CDS 193817 194022 . - 2 gene_id "AB000123.1"; transcript_id "AB00123.1.2"; AB000123 Twinscan CDS 199645 199752 . - 2 gene_id "AB000123.1"; transcript_id "AB00123.1.2"; AB000123 Twinscan CDS 200369 200508 . - 1 gene_id "AB000123.1"; transcript_id "AB00123.1.2"; AB000123 Twinscan CDS 215991 216028 . - 0 gene_id "AB000123.1"; transcript_id "AB00123.1.2"; AB000123 Twinscan start_codon 216026 216028 . - . gene_id "AB000123.1"; transcript_id "AB00123.1.2"; AB000123 Twinscan stop_codon 193814 193816 . - . gene_id "AB000123.1"; transcript_id "AB00123.1.2";
计算方法(编程参考)
- 因为是基因组负链上的基因, 因此mRNA 5'第一个CDS (216028~215991) 的 frame 永远为0
- 第一个CDS 的Frame=0,length=38,那么第二个CDS 的frame 计算方法: (frame - length) % 3 = 1 即(0-38)%3
- 第二个CDS 的Frame=1,length=140,那么第三个CDS的frame 计算方法: (frame - length) % 3 = 2 即(1-140)%3
- 往后以此类推
Contributors: rongzhengqin@basepedia.com