Mercurial > repos > estrain > amrformat
view amrformat.pl @ 2:ae0d90df065f
Uploaded
author | estrain |
---|---|
date | Wed, 29 Jan 2020 16:33:31 -0500 |
parents | 514bd7256422 |
children | abe5635dd846 |
line wrap: on
line source
#!/usr/bin/perl open IN,$ARGV[0]; open OUT,">$ARGV[1]"; my %iso_hash; ## Skip header <IN>; while(<IN>) { 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]; } } print OUT "Source.Name\tGene symbol\n"; foreach(sort keys %iso_hash){ print OUT $_,"\t",$iso_hash{$_},"\n"; }