Mercurial > repos > estrain > amrformat
diff amrformat.pl @ 7:abe5635dd846 tip
Uploaded
author | estrain |
---|---|
date | Thu, 30 Jan 2020 08:42:23 -0500 |
parents | 514bd7256422 |
children |
line wrap: on
line diff
--- a/amrformat.pl Thu Jan 30 08:42:12 2020 -0500 +++ b/amrformat.pl Thu Jan 30 08:42:23 2020 -0500 @@ -13,16 +13,16 @@ chomp(); @vals=split(/\t/,$_); @els=split(/\_/,$vals[0]); - if(exists $iso_hash{$els[0]}){ - $iso_hash{$els[0]}="$iso_hash{$els[0]} $vals[1]"; - } else { - $iso_hash{$els[0]}=$vals[1]; - } + $iso_hash{$els[0]}{$vals[1]}=1; } print OUT "Source.Name\tGene symbol\n"; foreach(sort keys %iso_hash){ - print OUT $_,"\t",$iso_hash{$_},"\n"; + print OUT $_; + foreach my $gene (sort keys %{$iso_hash{$_}}){ + print OUT " ",$gene; + } + print OUT "\n"; }