-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFind_len_variation_exon_0.pl
49 lines (42 loc) · 1.03 KB
/
Find_len_variation_exon_0.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/perl -w
use strict;
use Getopt::Long;
open IN,"$ARGV[0]" || die"!";
open Change,"$ARGV[1]" || die"!";
#open List, "$ARGV[2]"||die '!';
open OUT, ">$ARGV[2]"||die '!';
#>>> DA196784,2
#AF357013,2 NM_014839 + 99474315 99474444 130
#C04310,2 NM_000014 + 9123957 9124048 92 low 0.793650793650794 1 126
my %hash;
while (<Change>) {
chomp;
my @infor=split;
$hash{$infor[0]}=$_;
}
close Change;
#>>> AK056852,1
#AK056852,1 NM_000014 - 9109689 9109923 235
#my $name;
#my %rel;
#while (<List>) { #merge在一起的exon用其中一个代表
# chomp;
# my @infor=split;
# if (/^>>>/) {
# $name=$infor[1];
# }
# else{$rel{$infor[0]}=$name;}
#
#}
my $tmp;
my $tag;
while (<IN>) {
chomp;
my @infor=split;
if (/^>>>/) {$tmp=$_;$tag=1;}
else{
if (!exists $hash{$infor[0]}) {print ">>>>>>>>>>>>wrong!!!!!\t",$infor[0],"\n";exit;}
if ($tag==1) {print OUT "$tmp\n";$tag=0;}
print OUT "$hash{$infor[0]}\n";
}
}