# HG changeset patch # User dsobral # Date 1331826473 14400 # Node ID a0e05808610a1ced73cb1422f01714810129c57c # Parent 633ca40ded01f15100277614c933438dbf971734 Uploaded diff -r 633ca40ded01 -r a0e05808610a reorient_coordinates.pl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/reorient_coordinates.pl Thu Mar 15 11:47:53 2012 -0400 @@ -0,0 +1,19 @@ +open(FILE,"<", $ARGV[0]) or die "cannot open for reading ".$ARGV[0].": $!"; +open(FO,">", $ARGV[1]) or die "cannot open for writing ".$ARGV[1].": $!"; +while(){ + chomp; + my @cols = split(/\t/); + print FO $cols[0]; + if($cols[1]>$cols[2]){ + print FO "\t".$cols[2]."\t".$cols[1]; + } else { + print FO "\t".$cols[1]."\t".$cols[2]; + } + #Can only take coordinates + #for($i=3;$i