From: martinahansen Date: Tue, 1 Dec 2009 10:59:03 +0000 (+0000) Subject: fixed IO rename in write_kiss X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=41b24ba95cbe8d98ca7f8c5bda6a825d9416b1f6;p=biopieces.git fixed IO rename in write_kiss git-svn-id: http://biopieces.googlecode.com/svn/trunk@787 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/bp_bin/upload_to_bbrowser b/bp_bin/upload_to_bbrowser index 2a700f1..4558ce4 100755 --- a/bp_bin/upload_to_bbrowser +++ b/bp_bin/upload_to_bbrowser @@ -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" ); diff --git a/bp_bin/write_kiss b/bp_bin/write_kiss index dec6238..3fee688 100755 --- a/bp_bin/write_kiss +++ b/bp_bin/write_kiss @@ -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' };