GMAP gff3格式转换与数据统计

本文详细介绍了如何使用Python进行GFF3格式的数据转换,并提供了进行基因组数据分析的统计方法。通过实例展示了从GFF3文件处理到获取关键统计信息的全过程。
摘要由CSDN通过智能技术生成
##gff-version   3
# Generated by GMAP version 2016-06-09 using call:  gmapl.sse42 -D /export/data/ -d NRGenome --trim-end-exons=10 -t 32 --canonical-mode=2 --allow-close-indels=2 -B 4 -f 4 -n 0 ./unigene_seq_5.fasta
chr6B	NRGenome	EST_match	558820383	558820604	99	.	.	ID=UN227692.path1;Name=UN227692;Target=UN227692 1 222 +;Gap=M222;coverage=100.0;identity=99.1;matches=216;mismatches=2;indels=0;unknowns=4
###
chr7A	NRGenome	EST_match	683635472	683635624	100	.	.	ID=UN113387.path1;Name=UN113387;Target=UN113387 1 153 -;Gap=M153;coverage=100.0;identity=100.0;matches=153;mismatches=0;indels=0;unknowns=0
###
chr7D	NRGenome	EST_match	27592786	27593326	100	.	.	ID=UN128584.path1;Name=UN128584;Target=UN128584 1 541 -;Gap=M541;coverage=100.0;identity=100.0;matches=541;mismatches=0;indels=0;unknowns=0
###
chr4B	NRGenome	EST_match	505369881	505370146	99	.	.	ID=UN170802.path1;Name=UN170802;Target=UN170802 4 269 +;Gap=M266;coverage=98.9;identity=99.6;matches=265;mismatches=1;indels=0;unknowns=0
###
chr3A	NRGenome	EST_match	106517703	106518022	100	.	.	ID=UN181903.path1;Name=UN181903;Target=UN181903 1 320 -;Gap=M320;coverage=100.0;identity=100.0;matches=320;mismatches=0;indels=0;unknowns=0
###

结果文件

Query Target Start End Coverage Identity Matches Mismatches Indels Unknowns
UN227692 chr6B 558820383 558820604 100.0 99.1 216 2 0 4
UN113387 chr7A 683635472 683635624 100.0 100.0 153 0 0 0
UN128584 chr7D 27592786 27593326 100.0 100.0 541 0 0 0
UN170802 chr4B 505369881 505370146 98.9 99.6 265 1 0 0
UN181903 chr3A 106517703 106518022 100.0 100.0 320 0 0 0
UN076932 chr2B 452598011 452598795 99.1 99.2 781 4 2 0
UN067930 chr3D 23548729 23549162 100.0 100.0 434 0 0 0
#!/usr/bin/env python
# -*- coding: utf-8 -*-

H_Id_98 = 0
H_Id_97 = 0
H_Id_96 = 0
H_Id_95 = 0
H_Id_94 = 0
H_Id_93_90 = 0
H_Id_89 = 0

L_Id_98 = 0
L_Id_97 = 0
L_Id_96 = 0
L_Id_95 = 0
L_Id_94 = 0
L_Id_93_90 = 0
L_Id_89 = 0

V_L = 0
cal_file2 = open('cal_file2.txt', 'w')
with open('unigene_seq_5.fasta_gmapl_NRGenome.out.gff', 'r') as f:
    print 'Query', 'Target', 'Start', 'End', 'Coverage', 'Identity', 'Matches', 'Mismatches', 'Indels', 'Unknowns'
    for line in f:
        if line.startswith('
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值