]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed IO rename in write_kiss
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 1 Dec 2009 10:59:03 +0000 (10:59 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Tue, 1 Dec 2009 10:59:03 +0000 (10:59 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@787 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/upload_to_bbrowser
bp_bin/write_kiss

index 2a700f1d6b791d7727eed18932ac3ec172ee490a..4558ce4782c990e242b898fb29032ebdecbf3df4 100755 (executable)
@@ -55,6 +55,7 @@ $options = Maasha::Biopieces::parse_options(
         { long => 'genome',     short => 'g', type => 'string', mandatory => 'yes', default => undef, allowed => undef, disallowed => undef },
         { long => 'assembly',   short => 'a', type => 'string', mandatory => 'yes', default => undef, allowed => undef, disallowed => undef },
         { long => 'track_name', short => 't', type => 'string', mandatory => 'no',  default => undef, allowed => undef, disallowed => undef },
+        { long => 'force',      short => 'f', type => 'flag',   mandatory => 'no',  default => undef, allowed => undef, disallowed => undef },
         { long => 'no_stream',  short => 'x', type => 'flag',   mandatory => 'no',  default => undef, allowed => undef, disallowed => undef },
     ]   
 );
@@ -138,6 +139,11 @@ else
         if ( $entry = Maasha::Fasta::biopiece2fasta( $record ) )
         {
             $entry->[ SEQ_NAME ] = ( split " ", $entry->[ SEQ_NAME ] )[ 0 ];
+
+            if ( $options->{ 'force' } ) {
+                Maasha::Filesys::dir_remove( "$dst_dir/$entry->[ SEQ_NAME ]" );
+            }
+
             $contig_dir = Maasha::Filesys::dir_create( "$dst_dir/$entry->[ SEQ_NAME ]" );
             $contig_dir = Maasha::Filesys::dir_create( "$contig_dir/Sequence" );
             
index dec6238ad58043e8535101743c4bbe7debf589c3..3fee688ce03636b37ed38b4b9834305665cfaab2 100755 (executable)
@@ -29,7 +29,7 @@
 use warnings;
 use strict;
 use Maasha::Biopieces;
-use Maasha::KISS::IO;
+use Maasha::KISS;
 
 
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@@ -52,8 +52,8 @@ $fh = Maasha::Biopieces::write_stream( $options->{ 'data_out' }, $options->{ 'co
 
 while ( $record = Maasha::Biopieces::get_record( $in ) ) 
 {
-    if ( $entry = Maasha::KISS::IO::biopiece2kiss( $record ) ) {
-        Maasha::KISS::IO::kiss_entry_put( $entry, $fh );
+    if ( $entry = Maasha::KISS::biopiece2kiss( $record ) ) {
+        Maasha::KISS::kiss_entry_put( $entry, $fh );
     }
 
     Maasha::Biopieces::put_record( $record, $out ) if not $options->{ 'no_stream' };