Mercurial > repos > estrain > amrformat
comparison amrformat.pl @ 7:abe5635dd846 tip
Uploaded
author | estrain |
---|---|
date | Thu, 30 Jan 2020 08:42:23 -0500 |
parents | 514bd7256422 |
children |
comparison
equal
deleted
inserted
replaced
6:834e31c6e4e5 | 7:abe5635dd846 |
---|---|
11 | 11 |
12 while(<IN>) { | 12 while(<IN>) { |
13 chomp(); | 13 chomp(); |
14 @vals=split(/\t/,$_); | 14 @vals=split(/\t/,$_); |
15 @els=split(/\_/,$vals[0]); | 15 @els=split(/\_/,$vals[0]); |
16 if(exists $iso_hash{$els[0]}){ | 16 $iso_hash{$els[0]}{$vals[1]}=1; |
17 $iso_hash{$els[0]}="$iso_hash{$els[0]} $vals[1]"; | |
18 } else { | |
19 $iso_hash{$els[0]}=$vals[1]; | |
20 } | |
21 } | 17 } |
22 | 18 |
23 | 19 |
24 print OUT "Source.Name\tGene symbol\n"; | 20 print OUT "Source.Name\tGene symbol\n"; |
25 foreach(sort keys %iso_hash){ | 21 foreach(sort keys %iso_hash){ |
26 print OUT $_,"\t",$iso_hash{$_},"\n"; | 22 print OUT $_; |
23 foreach my $gene (sort keys %{$iso_hash{$_}}){ | |
24 print OUT " ",$gene; | |
25 } | |
26 print OUT "\n"; | |
27 } | 27 } |
28 | 28 |