#!/usr/bin/perl

 use strict;
use warnings;
########input######## my $gff = $ARGV[];my $cut = &cut($gff);my %cut = %$cut; my ($gene_number,$gene_id,$gene_name) = ($ARGV[],$ARGV[],$ARGV[]); #########main####### my %hash_2 = %{$cut{$gene_name}}; foreach my $key_2(keys %hash_2)
{
my @arr = $hash_2{$key_2};my $exon_start = $arr[][]+-;my $exon_end =$arr[][]-+; print "$gene_name\t$key_2\t$arr[0][0]\t$exon_start\n$gene_name\t$key_2\t$exon_end\t$arr[0][1]\n";
} #############sub################ sub cut
{
my %gene; my $exon = ;my $start = ;my $length = ; my $gff = shift;open GFF,"$gff"; while(my $line = <GFF>)
{
chomp $line; my @q = split /\s/,$line; if($q[] =~ /mRNA/)
{
$exon = ;$start = $q[];$length = ;
}
elsif($q[] =~ /CDS/)
{
$q[] =~ /Parent=(.*);S/m;my $key = $; my $new_length = $q[]-$q[]; $exon =~/(\w*)/; $gene{$key}{$} = [$length+,$length+$new_length]; $exon++; $length += $new_length;
}
}
return \%gene;
}

最新文章

  1. [C#] Control.Invoke方法和跨线程访问控件(转载)
  2. LINUX安全加固规范
  3. iOS 网络监测
  4. Ubuntu——&quot;xxx is not in the sudoers file.This incident will be reported&quot; 错误解决方法
  5. 《DSP using MATLAB》示例Example5.3
  6. 在CentOS 7上安装Node.js的4种方法
  7. POJ - 1132Border
  8. Urlencode and Urldecode 命令行
  9. php 分享两种给图片加水印的方法
  10. C++ builder 操作Excel方法(据网上资料整理)
  11. Map 对象
  12. sap 设备cnsapwin不支持页格式*****
  13. Java经典编程题50道之二十四
  14. HIVE和HADOOP的一些东西
  15. 套接字输入缓冲装置——InternalInputBuffer
  16. 如何查看kernel社区的变更历史
  17. flask_socket_io中报错RuntimeError: You need to use the eventlet server. See the Deployment section of the documentation for more information.的解决办法
  18. solr配置ik中文分词(二)
  19. Ubuntu无法连接WiFi
  20. 【转载三】Grafana系列教程–Grafana的配置及运行

热门文章

  1. 我们是如何将 ToB 服务的交付能力优化 75%?
  2. (20)sopel算法
  3. Linux基础命令层级图-01
  4. Caffe Install by Cmake in Ubuntu 18.04
  5. 使用Oracle VM VirtualBox创建虚拟机教程
  6. VS2012中MFC 操作mshflexgrid插入图片
  7. java课程课后作业190502之单词统计
  8. 通过SQL语句操作Sqlite数据库
  9. EF Core的安装及入门
  10. IDEA的一些常用设置