use strict;
use Maasha::Common;
use Maasha::Biopieces;
-use Maasha::Bowtie;
use Maasha::Filesys;
use Maasha::Fasta;
]
);
-Maasha::Common::error( qw(Directory already exists: "$options->{ 'directory' }") ) if -d $options->{ 'directory' };
+Maasha::Common::error( qq(Directory already exists: "$options->{ 'directory' }") ) if -d $options->{ 'directory' };
Maasha::Filesys::dir_create_if_not_exists( $options->{ 'directory' } );
close $fh_tmp;
-Maasha::Bowtie::bowtie_index( $file_tmp, $options->{ 'directory' }, $options->{ 'index_name' }, $options->{ 'verbose' } );
+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" );
+}
unlink $file_tmp;