]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/BGB_upload
shifted to NC list in BGB
[biopieces.git] / bp_bin / BGB_upload
index ba8b9d05685612bbd9a7d2174f4d1ae29f14a24f..33cc2e5ee706d9323785aa7131713519628736bb 100755 (executable)
@@ -39,6 +39,8 @@ use Maasha::Filesys;
 use constant {
     SEQ_NAME => 0,
     SEQ      => 1,
+
+    S_ID     => 0,
 };
 
 
@@ -79,13 +81,13 @@ if ( $options->{ 'track_name' } )
     {
         if ( $entry = Maasha::KISS::biopiece2kiss( $record ) )
         {
-            $entry->{ 'S_ID' } = ( split / /, $entry->{ 'S_ID' } )[ 0 ];
+            $entry->[ S_ID ] = ( split / /, $entry->[ S_ID ] )[ 0 ];
 
-            if ( not exists $fh_hash{ $entry->{ 'S_ID' } } ) {
-                $fh_hash{ $entry->{ 'S_ID' } } = Maasha::Filesys::file_write_open( "$tmp_dir/$entry->{ 'S_ID' }" );
+            if ( not exists $fh_hash{ $entry->[ S_ID ] } ) {
+                $fh_hash{ $entry->[ S_ID ] } = Maasha::Filesys::file_write_open( "$tmp_dir/$entry->[ S_ID ]" );
             }
 
-            $fh_out = $fh_hash{ $entry->{ 'S_ID' } };
+            $fh_out = $fh_hash{ $entry->[ S_ID ] };
 
             Maasha::KISS::kiss_entry_put( $entry, $fh_out );
         }
@@ -112,6 +114,7 @@ if ( $options->{ 'track_name' } )
         Maasha::KISS::kiss_sort( "$dst_dir/track_data.kiss" );
         Maasha::KISS::kiss_index( "$dst_dir/track_data.kiss" );
 
+        unlink "$dst_dir/track_data.kiss";
         unlink "$tmp_dir/$key";
     }
 }