iTOL与netsurfp前期处理程序
来源:互联网 发布:鸡胸肉 知乎 编辑:程序博客网 时间:2024/06/13 22:39
#!perluse warnings;use strict;use List::Util qw(max);my (%hash);open RSA, $ARGV[0] or die $!;open SS, "> $ARGV[1].ss" or die $!;while(<RSA>){chomp;next if(/^#/);my @tmp = split;my $maxv = max @tmp[7..9];my $type;for(my $i = 7; $i < 10; $i ++){if($maxv == $tmp[$i]){if($i == 7){$type = "H";}elsif($i == 8){$type = "E";}elsif($i == 9){$type = "C";}}}push @{$hash{$tmp[2]}}, $type;print SS "$tmp[2]\t$tmp[1]\t$type\t$tmp[0]\n";}open DM, "> $ARGV[1].domains" or die $!;foreach(keys %hash){my $len = @{$hash{$_}};print DM "$_\t$len";my (@h, @e);for(my $i = 0; $i < @{$hash{$_}}; $i ++){if($hash{$_}[$i] eq "H"){push @h, $i + 1;}elsif($hash{$_}[$i] eq "E"){push @e, $i + 1;}}my ($hs, $he, $es, $ee);$hs = $h[0];$he = $h[0] + 1;for(my $i = 0; $i < @h - 1; $i ++){if($h[$i + 1] - $h[$i] == 1){$he = $h[$i + 1] + 1;}else{print DM "\tRE|$hs|$he|#ff0000|$_.$hs.$he";$hs = $h[$i + 1];$he = $h[$i + 1] + 1;}}print DM "\tRE|$hs|$he|#ff0000|$_.$hs.$he";if(@e > 0){$es = $e[0];$ee = $e[0] + 1;for(my $i = 0; $i < @e - 1; $i ++){if($e[$i + 1] - $e[$i] == 1){$ee = $e[$i + 1] + 1;}else{print DM "\tTR|$es|$ee|#0000ff|$_.$es.$ee";$es = $e[$i + 1];$ee = $e[$i + 1] + 1;}}print DM "\tTR|$es|$ee|#0000ff|$_.$es.$ee\n";}else{print DM "\n";}}
0 0
- iTOL与netsurfp前期处理程序
- 缺失值的前期处理
- 模块与处理程序
- 事件与处理程序
- 网站前期定位与分析
- 小程序前期准备(连载二)
- 异常处理与程序中断
- 程序调试与异常处理
- 异常处理与程序调试
- 购物车的原理与前期准备
- Android源代码编译原理与前期准备
- 前期准备与Django新建项目
- [会议信息管理程序·前期] 表格初始化问题:query数量
- 用Qt实现一个桌面弹幕程序(一)--前期准备
- 关于异常处理与程序性能
- Linux下信号处理与多线程程序
- Linux下信号处理与多线程程序
- DAl、BLL与一般处理程序
- Android之ListView原理学习与优化总结
- 史上OC重点最全总结!
- _tcscmp
- 约瑟夫环问题
- 我与大话设计模式之代码篇(四)-----外观模式
- iTOL与netsurfp前期处理程序
- DM8148开发学习板
- 通过wifi连接adb调试
- Python2.7下载微信公众号文章的图片(二)
- 手机移动通信-20151118
- 自定义手势
- 南阳ACM 求余数
- hdu 3549 Flow Problem最大流(裸)
- sap*/pass无法登陆