热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

gff文件转入mysql_gff文件转换成gtf文件

做测序数据分析的时候经常需要将gff格式的注释文件转换成gtf格式的文件。今天小编就给大家介绍一个工具,gffread来实现这个目的。注意这个工具需要在linux或者

做测序数据分析的时候经常需要将gff格式的注释文件转换成gtf格式的文件。今天小编就给大家介绍一个工具,gffread来实现这个目的。注意这个工具需要在linux或者mac操作系统上运行。

下面是一个gff3格式文件的例子

##gff-version 3

scaffold625 maker gene 337818 343277 . + . ID=CLUHARG00000005458;Name=TUBB3_2

scaffold625 maker mRNA 337818 343277 . + . ID=CLUHART00000008717;Parent=CLUHARG00000005458

scaffold625 maker tss 337916 337918 . + . ID=CLUHART00000008717:tss;Parent=CLUHART00000008717

scaffold625 maker start_codon 337916 337918 . + . ID=CLUHART00000008717:start;Parent=CLUHART00000008717

scaffold625 maker CDS 337915 337971 . + 0 ID=CLUHART00000008717:cds;Parent=CLUHART00000008717

scaffold625 maker CDS 340733 340841 . + 0 ID=CLUHART00000008717:cds;Parent=CLUHART00000008717

scaffold625 maker CDS 341518 341628 . + 2 ID=CLUHART00000008717:cds;Parent=CLUHART00000008717

scaffold625 maker CDS 341964 343033 . + 2 ID=CLUHART00000008717:cds;Parent=CLUHART00000008717

scaffold625 maker stop_codon 343031 343033 . + . ID=CLUHART00000008717:stop;Parent=CLUHART00000008717

scaffold625 maker exon 337818 337971 . + . ID=CLUHART00000008717:exon1;Parent=CLUHART00000008717

scaffold625 maker exon 340733 340841 . + . ID=CLUHART00000008717:exon2;Parent=CLUHART00000008717

scaffold625 maker exon 341518 341628 . + . ID=CLUHART00000008717:exon3;Parent=CLUHART00000008717

scaffold625 maker exon 341964 343277 . + . ID=CLUHART00000008717:exon4;Parent=CLUHART00000008717

scaffold625 maker five_prime_utr 337818 337914 . + . ID=CLUHART00000008717:five_prime_utr;Parent=CLUHART00000008717

scaffold625 maker three_prime_UTR 343034 343277 . + . ID=CLUHART00000008717:three_prime_utr;Parent=CLUHART00000008717

而gtf格式文件是这样的

##gtf-version 3

scaffold625 maker gene 337818 343277 . + . gene_id "CLUHARG00000005458"; ID "CLUHARG00000005458"; Name "TUBB3_2";

scaffold625 maker transcript 337818 343277 . + . gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717"; Parent "CLUHARG00000005458"; original_biotype "mrna";

scaffold625 maker exon 337818 337971 . + . gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:exon1"; Parent "CLUHART00000008717";

scaffold625 maker exon 340733 340841 . + . gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:exon2"; Parent "CLUHART00000008717";

scaffold625 maker exon 341518 341628 . + . gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:exon3"; Parent "CLUHART00000008717";

scaffold625 maker exon 341964 343277 . + . gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:exon4"; Parent "CLUHART00000008717";

scaffold625 maker CDS 337915 337971 . + 0 gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:cds"; Parent "CLUHART00000008717";

scaffold625 maker CDS 340733 340841 . + 0 gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:cds"; Parent "CLUHART00000008717";

scaffold625 maker CDS 341518 341628 . + 2 gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:cds"; Parent "CLUHART00000008717";

scaffold625 maker CDS 341964 343033 . + 2 gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:cds"; Parent "CLUHART00000008717";

scaffold625 maker five_prime_utr 337818 337914 . + . gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:five_prime_utr"; Parent "CLUHART00000008717";

scaffold625 maker start_codon 337916 337918 . + . gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:start"; Parent "CLUHART00000008717";

scaffold625 maker stop_codon 343031 343033 . + . gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:stop"; Parent "CLUHART00000008717";

scaffold625 maker three_prime_utr 343034 343277 . + . gene_id "CLUHARG00000005458"; transcript_id "CLUHART00000008717"; ID "CLUHART00000008717:three_prime_utr"; Parent "CLUHART00000008717"; original_biotype "three_prime_UTR";

那么如何安装gffread这个工具呢

1.首先安装conda

可以根据自己的操作系统选择相应的版本

e49809110782

2. 通过conda安装gffread

conda install -c bioconda gffread

3.格式转换,下面这一条命令就可以将gff3格式的注释文件转换成gtf格式的文件了。

gffread gencode.v19.annotation.gff3 -T -o gencode.v19.gtf

当然也可以将gtf格式的文件转换成gff3格式的文件

gffread gencode.vM13.annotation.gtf -o gencode.vM13.annotation.gff3



推荐阅读
author-avatar
suzhaolie
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有