]> git.donarmstrong.com Git - biopieces.git/blobdiff - bp_bin/create_bowtie_index
unfucked bowtie_index
[biopieces.git] / bp_bin / create_bowtie_index
index 95354f61a3f6364ee7cb47c919d0dd1f4bdd7a52..47a46c65f4c183c30a60daaf7f1f4b2aa1bd1ced 100755 (executable)
@@ -32,6 +32,7 @@ use Maasha::Common;
 use Maasha::Biopieces;
 use Maasha::Filesys;
 use Maasha::Fasta;
+use Maasha::Bowtie;
 
 
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@@ -69,13 +70,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( "bowtie-build", "$file_tmp $options->{ 'directory' }/$options->{ 'index_name' }" );
-} else {
-    Maasha::Common::run( "bowtie-build", "$file_tmp $options->{ 'directory' }/$options->{ 'index_name' } > /dev/null 2>&1" );
-}
+Maasha::Bowtie::bowtie_index( $file_tmp, $options->{ 'directory' }, $options->{ 'index_name' }, $options->{ 'verbose' } );
 
 unlink $file_tmp;