X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bp_bin%2Fcreate_bwa_index;h=a80ae5971aaf4ce19f435fbcc98ea3116ca815eb;hb=5de6112b70b59420b245ce636a8b2e3c90acbe00;hp=9ccb0e427568b65d20b0f5e11337a2ec75455e78;hpb=f26e561ce68e6f3b870b760bd388cae9eb3fdbd7;p=biopieces.git diff --git a/bp_bin/create_bwa_index b/bp_bin/create_bwa_index index 9ccb0e4..a80ae59 100755 --- a/bp_bin/create_bwa_index +++ b/bp_bin/create_bwa_index @@ -32,6 +32,7 @@ use Maasha::Common; use Maasha::Biopieces; use Maasha::Filesys; use Maasha::Fasta; +use Maasha::BWA; # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @@ -47,8 +48,6 @@ $options = Maasha::Biopieces::parse_options( ] ); -Maasha::Common::error( qq(Directory already exists: "$options->{ 'directory' }") ) if -d $options->{ 'directory' }; - Maasha::Filesys::dir_create_if_not_exists( $options->{ 'directory' } ); $in = Maasha::Biopieces::read_stream( $options->{ "stream_in" } ); @@ -69,13 +68,7 @@ while ( $record = Maasha::Biopieces::get_record( $in ) ) close $fh_tmp; -Maasha::Filesys::dir_create_if_not_exists( $options->{ 'directory' } ); - -if ( $options->{ 'verbose' } ) { - Maasha::Common::run( "bwa", "index -p $options->{ 'directory' }/$options->{ 'index_name' } $file_tmp" ); -} else { - Maasha::Common::run( "bwa", "index -p $options->{ 'directory' }/$options->{ 'index_name' } $file_tmp > /dev/null 2>&1" ); -} +Maasha::BWA::bwa_index( $file_tmp, $options->{ 'directory' }, $options->{ 'index_name' }, $options->{ 'verbose' } ); unlink $file_tmp;