+# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> SUBROUTINES <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+
+
+sub bowtie_index
+{
+ # Martin A. Hansen, July 2009.
+
+ # Create a bowtie index for fast sequence mapping.
+
+ my ( $src_file, # filename of source file
+ $dst_dir, # destination dir to store index
+ $base_name, # base name of index
+ $verbose, # verbose flag
+ ) = @_;
+
+ Maasha::Filesys::dir_create_if_not_exists( $dst_dir );
+
+ if ( $verbose ) {
+ Maasha::Common::run( "bowtie-build", "$src_file $dst_dir/$base_name" );
+ } else {
+ Maasha::Common::run( "bowtie-build", "$src_file $dst_dir/$base_name > /dev/null 2>&1" );
+ }
+}
+
+