# HG changeset patch # User estrain # Date 1580333473 18000 # Node ID 514bd7256422384a11c13a238768a923b0dfb1ca Uploaded diff -r 000000000000 -r 514bd7256422 amrformat.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/amrformat.pl Wed Jan 29 16:31:13 2020 -0500 @@ -0,0 +1,28 @@ +#!/usr/bin/perl + +open IN,$ARGV[0]; + +open OUT,">$ARGV[1]"; + +my %iso_hash; + +## Skip header +; + +while() { + 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"; +} +