Mercurial > repos > estrain > amrformat
view amrformat.pl @ 7:abe5635dd846 tip
Uploaded
author | estrain |
---|---|
date | Thu, 30 Jan 2020 08:42:23 -0500 |
parents | 514bd7256422 |
children |
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]); $iso_hash{$els[0]}{$vals[1]}=1; } print OUT "Source.Name\tGene symbol\n"; foreach(sort keys %iso_hash){ print OUT $_; foreach my $gene (sort keys %{$iso_hash{$_}}){ print OUT " ",$gene; } print OUT "\n"; }