sortByRef now supports x:y location syntax

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1186 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
depristo 2009-07-07 16:42:40 +00:00
parent 1db15ee468
commit 1d84c9da96
1 changed files with 6 additions and 0 deletions

View File

@ -63,6 +63,11 @@ while ( <INPUT> ) {
if ( $pos >= scalar(@fields) );
my $contig = $fields[$pos];
if ( $contig =~ m/:/ ) {
my @loc = split(/:/, $contig);
# print $contig . " " . $loc[0] . "\n";
$contig = $loc[0]
}
chomp $contig if ( $pos == scalar(@fields) - 1 ); # if last field in line
my $order;
@ -76,6 +81,7 @@ while ( <INPUT> ) {
my $fhandle;
if ( defined $temp_outputs{$order} ) { $fhandle = $temp_outputs{$order} }
else {
#print "opening $order $$ $_\n";
open( $fhandle, " > /tmp/sortByRef.$$.$order.tmp" ) or
die ( "Can not open temporary file $order: $!");
$temp_outputs{$order} = $fhandle;