]> git.donarmstrong.com Git - biopieces.git/commitdiff
more renaming
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 26 Jun 2008 06:57:25 +0000 (06:57 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 26 Jun 2008 06:57:25 +0000 (06:57 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@27 74ccb610-7750-0410-82ae-013aeee3265d

bp_bin/00README [new file with mode: 0644]
bp_bin/list_biopieces [new file with mode: 0755]
bp_bin/list_biotools [deleted file]
bp_conf/bashrc
code_perl/Maasha/Biopieces.pm
code_perl/Maasha/Common.pm
code_perl/Maasha/Config.pm
code_perl/Maasha/Match.pm
code_perl/Maasha/Plot.pm
code_perl/Maasha/Seq.pm
code_perl/Maasha/TwoBit.pm

diff --git a/bp_bin/00README b/bp_bin/00README
new file mode 100644 (file)
index 0000000..49d4a84
--- /dev/null
@@ -0,0 +1,5 @@
+This directory should only contain biopiece executables.
+
+
+
+Martin A. Hansen, June 2008
diff --git a/bp_bin/list_biopieces b/bp_bin/list_biopieces
new file mode 100755 (executable)
index 0000000..4cd1d44
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/env perl
+
+use warnings;
+use strict;
+
+use Maasha::Biopieces;
diff --git a/bp_bin/list_biotools b/bp_bin/list_biotools
deleted file mode 100755 (executable)
index 4cd1d44..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env perl
-
-use warnings;
-use strict;
-
-use Maasha::Biopieces;
index 0a57f06eaea9e2646bafd443cbaf7b8d20cd9bac..10814f1a41559306f36e580fd3e4a20f4d5a6e7a 100644 (file)
@@ -24,16 +24,10 @@ export BP_PYTHON="$BP_DIR/code_python"      # Direcotry with Pyton code.
 export BP_RUBY="$BP_DIR/code_ruby"          # Direcotry with Ruby code.
 
 
-### For the Perl modules they may be contributed by different developers, so we define a variable for each.
-
-export BP_PERL_LIBS="$BP_PERL/Maasha"                 # Perl modules from the developer Maasha.
-# export BP_PERL_LIBS="$BP_PERL_LIBS:$BP_PERL/<new>"  # Perl modules from a new developer.
-
-
 ### Here we add the biopiece variable to the existing PATH and PERL5LIB variables.
 
 export PATH="$PATH:$BP_BIN"  
-export PERL5LIB="$PERL5LIB:$BP_PERL_LIBS"
+export PERL5LIB="$PERL5LIB:$BP_PERL"
 
 ### Alias allowing power scripting with biopieces.
 
index b42a9945c48b9a1fd25b4e3310637d6862dddea4..384159599561bac5c113390777026b17835e2a8e 100644 (file)
@@ -83,10 +83,10 @@ $SIG{ 'TERM' }    = \&sig_handler;
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> GLOBALS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
-my ( $script, $TMP_DIR );
+my ( $script, $BP_TMP );
 
 $script  = &Maasha::Common::get_scriptname();
-$TMP_DIR = &Maasha::Common::get_tmpdir();
+$BP_TMP = &Maasha::Common::get_tmpdir();
 
 
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> LOG <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@@ -154,9 +154,9 @@ sub run_script
 
     my ( $options, $in, $out );
 
-    &script_list_biotools( $ENV{ 'INST_DIR'} . "/biotools/usage/" ) if $script eq "list_biotools";
+    &script_list_biopieces( $ENV{ 'INST_DIR'} . "/biopieces/usage/" ) if $script eq "list_biopieces";
 
-    &script_print_usage( $ENV{ 'INST_DIR'} . "/biotools/usage/$script" ) if -t STDIN and not @ARGV;
+    &script_print_usage( $ENV{ 'INST_DIR'} . "/biopieces/usage/$script" ) if -t STDIN and not @ARGV;
 
     $options = &get_options( $script );
 
@@ -1054,11 +1054,11 @@ sub script_print_usage
 }
 
 
-sub script_list_biotools
+sub script_list_biopieces
 {
     # Martin A. Hansen, January 2008.
 
-    # Prints the description from the usage for each of the biotools.
+    # Prints the description from the usage for each of the biopieces.
 
     my ( $path,    # full path to usage directory
        ) = @_;
@@ -2755,7 +2755,7 @@ sub script_get_genome_align
             $end = $beg + $options->{ "len" };
         }
 
-        $align = &Maasha::UCSC::maf_extract( $TMP_DIR, $options->{ "genome" }, $maf_track, $options->{ "chr" }, $beg, $end, $options->{ "strand" } );
+        $align = &Maasha::UCSC::maf_extract( $BP_TMP, $options->{ "genome" }, $maf_track, $options->{ "chr" }, $beg, $end, $options->{ "strand" } );
 
         foreach $entry ( @{ $align } )
         {
@@ -2775,15 +2775,15 @@ sub script_get_genome_align
     {
         if ( $record->{ "REC_TYPE" } eq "BED" )
         {
-            $align = &Maasha::UCSC::maf_extract( $TMP_DIR, $options->{ "genome" }, $maf_track, $record->{ "CHR" }, $record->{ "CHR_BEG" }, $record->{ "CHR_END" }, $record->{ "STRAND" } );
+            $align = &Maasha::UCSC::maf_extract( $BP_TMP, $options->{ "genome" }, $maf_track, $record->{ "CHR" }, $record->{ "CHR_BEG" }, $record->{ "CHR_END" }, $record->{ "STRAND" } );
         }
         elsif ( $record->{ "REC_TYPE" } eq "PSL" )
         {
-            $align = &Maasha::UCSC::maf_extract( $TMP_DIR, $options->{ "genome" }, $maf_track, $record->{ "S_ID" }, $record->{ "S_BEG" }, $record->{ "S_END" }, $record->{ "STRAND" } );
+            $align = &Maasha::UCSC::maf_extract( $BP_TMP, $options->{ "genome" }, $maf_track, $record->{ "S_ID" }, $record->{ "S_BEG" }, $record->{ "S_END" }, $record->{ "STRAND" } );
         }
         elsif ( $record->{ "REC_TYPE" } eq "BLAST" )
         {
-            $align = &Maasha::UCSC::maf_extract( $TMP_DIR, $options->{ "genome" }, $maf_track, $record->{ "S_ID" }, $record->{ "S_BEG" }, $record->{ "S_END" }, $record->{ "STRAND" } );
+            $align = &Maasha::UCSC::maf_extract( $BP_TMP, $options->{ "genome" }, $maf_track, $record->{ "S_ID" }, $record->{ "S_BEG" }, $record->{ "S_END" }, $record->{ "STRAND" } );
         }
 
         foreach $entry ( @{ $align } )
@@ -3159,9 +3159,9 @@ sub script_patscan_seq
     push @args, "-m $options->{ 'max_hits' }"   if $options->{ 'max_hits' };
     push @args, "-n $options->{ 'max_misses' }" if $options->{ 'max_hits' };
 
-    $seq_file = "$TMP_DIR/patscan.seq";
-    $pat_file = "$TMP_DIR/patscan.pat";
-    $out_file = "$TMP_DIR/patscan.out";
+    $seq_file = "$BP_TMP/patscan.seq";
+    $pat_file = "$BP_TMP/patscan.pat";
+    $out_file = "$BP_TMP/patscan.out";
 
     $fh_out = &Maasha::Common::write_open( $seq_file );
 
@@ -3302,8 +3302,8 @@ sub script_blast_seq
 
     $options->{ "database" } = &Maasha::Config::genome_blast( $options->{ 'genome' } ) if $options->{ 'genome' };
 
-    $tmp_in  = "$TMP_DIR/blast_query.seq";
-    $tmp_out = "$TMP_DIR/blast.result";
+    $tmp_in  = "$BP_TMP/blast_query.seq";
+    $tmp_out = "$BP_TMP/blast.result";
 
     $fh_out = &Maasha::Common::write_open( $tmp_in );
 
@@ -3420,7 +3420,7 @@ sub script_blat_seq
     $blat_args .= " -stepSize=$options->{ 'step_size' }";
     $blat_args .= " -ooc=" . &Maasha::Config::genome_blat_ooc( $options->{ "genome" }, 11 ) if $options->{ 'ooc' };
 
-    $query_file = "$TMP_DIR/blat.seq";
+    $query_file = "$BP_TMP/blat.seq";
 
     $fh_out = &Maasha::Common::write_open( $query_file );
 
@@ -3440,7 +3440,7 @@ sub script_blat_seq
     $blat_args .= " -t=dnax" if $type eq "protein";
     $blat_args .= " -q=$type";
 
-    $result_file = "$TMP_DIR/blat.psl";
+    $result_file = "$BP_TMP/blat.psl";
 
     &Maasha::Common::run( "blat", "$genome_file $query_file $blat_args $result_file > /dev/null 2>&1" );
 
@@ -3483,13 +3483,13 @@ sub script_match_seq
 
     if ( @entries == 1 )
     {
-        $results = &Maasha::Match::match_mummer( [ $entries[ 0 ] ], [ $entries[ 0 ] ], $options, $TMP_DIR );
+        $results = &Maasha::Match::match_mummer( [ $entries[ 0 ] ], [ $entries[ 0 ] ], $options, $BP_TMP );
 
         map { &put_record( $_, $out ) } @{ $results };
     }
     elsif ( @entries == 2 )
     {
-        $results = &Maasha::Match::match_mummer( [ $entries[ 0 ] ], [ $entries[ 1 ] ], $options, $TMP_DIR );
+        $results = &Maasha::Match::match_mummer( [ $entries[ 0 ] ], [ $entries[ 1 ] ], $options, $BP_TMP );
 
         map { &put_record( $_, $out ) } @{ $results };
     }
@@ -3574,7 +3574,7 @@ sub script_vmatch_seq
         &put_record( $record, $out );
     }
 
-    $result_file = &Maasha::Match::match_vmatch( $TMP_DIR, \@records, \@index_files, $options );
+    $result_file = &Maasha::Match::match_vmatch( $BP_TMP, \@records, \@index_files, $options );
 
     undef @records;
 
@@ -3931,7 +3931,7 @@ sub script_write_2bit
 
     $mask = 1 if not $options->{ "no_mask" };
 
-    $tmp_file = "$TMP_DIR/write_2bit.fna";
+    $tmp_file = "$BP_TMP/write_2bit.fna";
     $fh_tmp   = &Maasha::Common::write_open( $tmp_file );
 
     $fh_out = &write_stream( $options->{ "data_out" } );
@@ -4067,7 +4067,7 @@ sub script_plot_phastcons_profiles
 
     $AoA = &Maasha::Matrix::matrix_flip( $AoA );
 
-    $plot = &Maasha::Plot::lineplot_simple( $AoA, $options, $TMP_DIR );
+    $plot = &Maasha::Plot::lineplot_simple( $AoA, $options, $BP_TMP );
 
     $fh = &write_stream( $options->{ "data_out" } );
 
@@ -4734,7 +4734,7 @@ sub script_random_records
 
     $options->{ "num" } ||= 10;
 
-    $tmp_file = "$TMP_DIR/random_records.tmp";
+    $tmp_file = "$BP_TMP/random_records.tmp";
 
     $fh_out = &Maasha::Common::write_open( $tmp_file );
 
@@ -4850,7 +4850,7 @@ sub script_count_vals
 
     my ( $num, $record, %count_hash, @records, $tmp_file, $fh_out, $fh_in, $cache );
 
-    $tmp_file = "$TMP_DIR/count_cache.tmp";
+    $tmp_file = "$BP_TMP/count_cache.tmp";
 
     $fh_out   = &Maasha::Common::write_open( $tmp_file );
 
@@ -5121,7 +5121,7 @@ sub script_plot_matches
     $options->{ "xlabel" } ||= $data[ 0 ]->{ "Q_ID" };
     $options->{ "ylabel" } ||= $data[ 0 ]->{ "S_ID" };
 
-    $result = &Maasha::Plot::dotplot_matches( \@data, $options, $TMP_DIR );
+    $result = &Maasha::Plot::dotplot_matches( \@data, $options, $BP_TMP );
 
     $fh = &write_stream( $options->{ "data_out" } );
 
@@ -5394,7 +5394,7 @@ sub script_upload_to_ucsc
     $options->{ "color" }       ||= join( ",", int( rand( 255 ) ), int( rand( 255 ) ), int( rand( 255 ) ) );
     $options->{ "chunk_size" }  ||= 10_000_000_000;    # Due to 32-bit UCSC compilation really large tables cannot be loaded in one go.
 
-    $file = "$TMP_DIR/ucsc_upload.tmp";
+    $file = "$BP_TMP/ucsc_upload.tmp";
 
     $append = 0;
 
@@ -5414,7 +5414,7 @@ sub script_upload_to_ucsc
             $record->{ "CHR_BEG" } = $record->{ "S_BEG" } if not defined $record->{ "CHR_BEG" };
             $record->{ "CHR_END" } = $record->{ "S_END" } if not defined $record->{ "CHR_END" };
 
-            $fh_hash{ $record->{ "CHR" } } = &Maasha::Common::write_open( "$TMP_DIR/$record->{ 'CHR' }" ) if not exists $fh_hash{ $record->{ "CHR" } };
+            $fh_hash{ $record->{ "CHR" } } = &Maasha::Common::write_open( "$BP_TMP/$record->{ 'CHR' }" ) if not exists $fh_hash{ $record->{ "CHR" } };
 
             $fh_out = $fh_hash{ $record->{ "CHR" } };
             
@@ -5427,9 +5427,9 @@ sub script_upload_to_ucsc
 
         foreach $chr ( sort keys %fh_hash )
         {
-            &Maasha::Common::run( "bedSort", "$TMP_DIR/$chr $TMP_DIR/$chr" );
+            &Maasha::Common::run( "bedSort", "$BP_TMP/$chr $BP_TMP/$chr" );
 
-            $fh_in = &Maasha::Common::read_open( "$TMP_DIR/$chr" );
+            $fh_in = &Maasha::Common::read_open( "$BP_TMP/$chr" );
 
             undef $block;
 
@@ -5478,7 +5478,7 @@ sub script_upload_to_ucsc
 
             &Maasha::UCSC::fixedstep_put_entry( $chr, $beg_block, $block, $fh_out );
 
-            unlink "$TMP_DIR/$chr";
+            unlink "$BP_TMP/$chr";
         }
 
         close $fh_out;
@@ -5486,14 +5486,14 @@ sub script_upload_to_ucsc
         $wig_file = "$options->{ 'table' }.wig";
         $wib_file = "$options->{ 'table' }.wib";
 
-        $wib_dir  = "$ENV{ 'DATA_DIR' }/genomes/$options->{ 'database' }/wib";
+        $wib_dir  = "$ENV{ 'BP_DATA' }/genomes/$options->{ 'database' }/wib";
 
         &Maasha::Common::dir_create_if_not_exists( $wib_dir );
 
         # &Maasha::Common::run( "wigEncode", "$file $wig_file $wib_file > /dev/null 2>&1" );
 
-        `cd $TMP_DIR && wigEncode $file $wig_file $wib_file > /dev/null 2>&1`;
-        &Maasha::Common::run( "mv", "$TMP_DIR/$wib_file $wib_dir" );
+        `cd $BP_TMP && wigEncode $file $wig_file $wib_file > /dev/null 2>&1`;
+        &Maasha::Common::run( "mv", "$BP_TMP/$wib_file $wib_dir" );
 
         unlink $file;
 
@@ -5581,7 +5581,7 @@ sub script_upload_to_ucsc
                 close $fh_out;
 
                 if ( $format eq "BED" ) {
-                    &Maasha::UCSC::bed_upload_to_ucsc( $TMP_DIR, $file, $options, $append );
+                    &Maasha::UCSC::bed_upload_to_ucsc( $BP_TMP, $file, $options, $append );
                 } elsif ( $format eq "PSL" ) {
                     &Maasha::UCSC::psl_upload_to_ucsc( $file, $options, $append ); 
                 }
@@ -5607,7 +5607,7 @@ sub script_upload_to_ucsc
         {
             $type = "bed $columns";
 
-            &Maasha::UCSC::bed_upload_to_ucsc( $TMP_DIR, $file, $options, $append );
+            &Maasha::UCSC::bed_upload_to_ucsc( $BP_TMP, $file, $options, $append );
         }
         elsif ( $format eq "BED_SS" )
         {
@@ -5615,7 +5615,7 @@ sub script_upload_to_ucsc
 
             $type = "sec_struct";
         
-            &Maasha::UCSC::bed_upload_to_ucsc( $TMP_DIR, $file, $options, $append );
+            &Maasha::UCSC::bed_upload_to_ucsc( $BP_TMP, $file, $options, $append );
         }
         elsif ( $format eq "PSL" )
         {
@@ -5627,7 +5627,7 @@ sub script_upload_to_ucsc
         {
             $type = "wig 0";
 
-            &Maasha::UCSC::wiggle_upload_to_ucsc( $TMP_DIR, $wib_dir, $file, $options );
+            &Maasha::UCSC::wiggle_upload_to_ucsc( $BP_TMP, $wib_dir, $file, $options );
         }
 
         unlink $file;
@@ -5805,7 +5805,7 @@ sub sig_handler
 
     sleep 1;
 
-    if ( -d $TMP_DIR )
+    if ( -d $BP_TMP )
     {
         if ( $sig =~ /MAASHA_ERROR/ ) {
             print STDERR "\nProgram '$script' had an error"                     . "  -  Please wait for temporary data to be removed\n";
@@ -5818,9 +5818,9 @@ sub sig_handler
         }
 
         # This is a really bad solution, potentially, anyone can include this module and set
-        # the TMP_DIR to point at any dir and thus take out the machine !!!
+        # the BP_TMP to point at any dir and thus take out the machine !!!
 
-        &Maasha::Common::dir_remove( $TMP_DIR );
+        &Maasha::Common::dir_remove( $BP_TMP );
     }
 
     exit( 0 );
@@ -5830,9 +5830,9 @@ sub sig_handler
 END
 {
     # This is a really bad solution, potentially, anyone can include this module and set
-    # the TMP_DIR to point at any dir and thus take out the machine !!!
+    # the BP_TMP to point at any dir and thus take out the machine !!!
 
-    &Maasha::Common::dir_remove( $TMP_DIR );
+    &Maasha::Common::dir_remove( $BP_TMP );
 }
 
 
index b4304848ac53730bec3a71d56ea1199bd4a055e8..a6d63e10fbe6ee1edfc9060b398dfe4002fcdb4a 100644 (file)
@@ -484,20 +484,20 @@ sub get_tmpdir
     # Martin A. Hansen, April 2008.
 
     # Create a temporary directory based on
-    # $ENV{ 'TMP_DIR' } and sessionid.
+    # $ENV{ 'BP_TMP' } and sessionid.
 
     # Returns a path.
 
     my ( $user, $sid, $path );
 
-    &Maasha::Common::error( qq(no TMP_DIR set in %ENV) ) if not -d $ENV{ 'TMP_DIR' };
+    &Maasha::Common::error( qq(no BP_TMP set in %ENV) ) if not -d $ENV{ 'BP_TMP' };
 
     $user = $ENV{ 'USER' };
     $user =~ s/\.//g;
 
     $sid  = &Maasha::Common::get_sessionid();
 
-    $path = "$ENV{ 'TMP_DIR' }/$user\_$sid";
+    $path = "$ENV{ 'BP_TMP' }/$user\_$sid";
     
     &Maasha::Common::dir_create( $path );
 
index e25f3f2d7b0286156eea61329261878a98134764..b71397394b55ff8397607fafe450abf6847eb22e 100644 (file)
@@ -38,19 +38,19 @@ use vars qw( @ISA @EXPORT );
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> GLOBALS <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
-my ( $HOME, $PATH, $DATA_DIR, $TMP_DIR, $INST_DIR );
+my ( $HOME, $PATH, $BP_DATA, $BP_TMP, $BP_DIR );
 
 $HOME     = $ENV{ "HOME" };     
 $PATH     = $ENV{ "PATH" };     
-$DATA_DIR = $ENV{ "DATA_DIR" }; 
-$TMP_DIR  = $ENV{ "TMP_DIR" };  
-$INST_DIR = $ENV{ "INST_DIR" };
+$BP_DIR   = $ENV{ "BP_DIR" };
+$BP_DATA  = $ENV{ "BP_DATA" }; 
+$BP_TMP   = $ENV{ "BP_TMP" };  
 
 warn qq(WARNING: HOME not set in env\n)     if not defined $HOME;
 warn qq(WARNING: PATH not set in env\n)     if not defined $PATH;
-warn qq(WARNING: DATA_DIR not set in env\n) if not defined $DATA_DIR;
-warn qq(WARNING: TMP_DIR not set in env\n)  if not defined $TMP_DIR;
-warn qq(WARNING: INST_DIR not set in env\n) if not defined $INST_DIR;
+warn qq(WARNING: BP_DIR not set in env\n)   if not defined $BP_DIR;
+warn qq(WARNING: BP_DATA not set in env\n)  if not defined $BP_DATA;
+warn qq(WARNING: BP_TMP not set in env\n)   if not defined $BP_TMP;
 
 
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
@@ -90,7 +90,7 @@ sub genome_fasta
 
     # Returns string.
 
-    my $genome_file = "$DATA_DIR/genomes/$genome/$genome.fna";
+    my $genome_file = "$BP_DATA/genomes/$genome/$genome.fna";
 
     if ( not -f $genome_file ) {
         &Maasha::Common::error( qq(Genome file "$genome_file" for genome "$genome" not found) );
@@ -112,7 +112,7 @@ sub genome_fasta_index
 
     # Returns string.
 
-    my $index = "$DATA_DIR/genomes/$genome/$genome.fna.index";
+    my $index = "$BP_DATA/genomes/$genome/$genome.fna.index";
 
     if ( not -f $index ) {
         &Maasha::Common::error( qq(Index file "$index" for genome -> $genome not found) );
@@ -133,7 +133,7 @@ sub genome_blast
 
     # Returns string.
 
-    my $file = "$DATA_DIR/genomes/$genome/blast/$genome.fna";
+    my $file = "$BP_DATA/genomes/$genome/blast/$genome.fna";
 
     return $file;
 }
@@ -152,7 +152,7 @@ sub genome_blat_ooc
 
     # Returns string.
 
-    my $ooc_file = "$DATA_DIR/genomes/$genome/blat/$tile_size.ooc";
+    my $ooc_file = "$BP_DATA/genomes/$genome/blat/$tile_size.ooc";
 
     &Maasha::Common::error( qq(ooc file "$ooc_file" not found for genome -> $genome) ) if not -f $ooc_file;
 
@@ -175,7 +175,7 @@ sub genome_vmatch
 
     @chrs = &chromosomes( $genome );
 
-    map { $_ = "$DATA_DIR/genomes/$genome/vmatch/$_" } @chrs;
+    map { $_ = "$BP_DATA/genomes/$genome/vmatch/$_" } @chrs;
 
     # needs robustness check
 
@@ -195,7 +195,7 @@ sub genome_phastcons
 
     # Returns a string.
     
-    my $file = "$DATA_DIR/genomes/$genome/phastcons/$genome.pp";
+    my $file = "$BP_DATA/genomes/$genome/phastcons/$genome.pp";
 
     return $file;
 }
@@ -213,7 +213,7 @@ sub genome_phastcons_index
 
     # Returns a string.
     
-    my $file = "$DATA_DIR/genomes/$genome/phastcons/$genome.pp.index";
+    my $file = "$BP_DATA/genomes/$genome/phastcons/$genome.pp.index";
 
     return $file;
 }
@@ -230,7 +230,7 @@ sub genomes
 
     my ( %genome_hash, $fh, $line, @genomes, $org );
 
-    $fh = &Maasha::Common::read_open( "$INST_DIR/conf/genomes.conf" );
+    $fh = &Maasha::Common::read_open( "$BP_DIR/conf/genomes.conf" );
 
     while ( $line = <$fh> )
     {
@@ -265,7 +265,7 @@ sub chromosomes
 
     my ( $fh_in, $line, $org, $chr, %genome_hash, @chrs );
 
-    $fh_in = &Maasha::Common::read_open( "$INST_DIR/conf/genomes.conf" );
+    $fh_in = &Maasha::Common::read_open( "$BP_DIR/bp_conf/genomes.conf" );
 
     while ( $line = <$fh_in> )
     {
index 5f97856b2815939a2a01c76613e83c778aa99d79..8f52d8d99d6dc5d29a91b7c6467beab06aac5fe3 100644 (file)
@@ -59,7 +59,7 @@ sub match_mummer
 
     my ( @args, $arg, $file_in1, $file_in2, $cmd, $file_out, $fh, $line, $result, @results );
 
-    $tmp_dir ||= $ENV{ "TMP_DIR" };
+    $tmp_dir ||= $ENV{ "BP_TMP" };
 
     $options->{ "word_size" } ||= 20;
     $options->{ "direction" } ||= "both";
index 8c76a53e6c23521800ea743b0c5d27f8c4e2304b..225433dd5e99f44c7faf45b353b3ca45f1a93a51 100644 (file)
@@ -67,7 +67,7 @@ sub lineplot_simple
 
     my ( $tmp_file, $pid, $fh_in, $fh_out, $cmd, $i, $line, @lines, $xtic_space, @plot_cmd );
 
-    $tmp_dir ||= $ENV{ 'TMP_DIR' };
+    $tmp_dir ||= $ENV{ 'BP_TMP' };
 
     $tmp_file = "$tmp_dir/lineplot_simple.tab";
 
@@ -332,7 +332,7 @@ sub dotplot_matches
     my ( $forward_file, $backward_file, $pid, $fh_forward, $fh_backward,
          $fh_in, $fh_out, $cmd, $match, $line, @lines, $q_max, $s_max );
 
-    $tmp_dir ||= $ENV{ 'TMP_DIR' };
+    $tmp_dir ||= $ENV{ 'BP_TMP' };
 
     $forward_file  = "$tmp_dir/match_f.tab";
     $backward_file = "$tmp_dir/match_r.tab";
@@ -439,13 +439,13 @@ sub karyogram
 
     if ( $options->{ "genome" } eq "human" )
     {
-        $karyo_file = "/Users/m.hansen/maasha/perl_scripts/biotools/karyo_data/human_cytobands.txt";
-#        $karyo_file = "/home/m.hansen/maasha/perl_scripts/biotools/karyo_data/human_cytobands.txt";
+        $karyo_file = "/Users/m.hansen/maasha/perl_scripts/biopieces/karyo_data/human_cytobands.txt";
+#        $karyo_file = "/home/m.hansen/maasha/perl_scripts/biopieces/karyo_data/human_cytobands.txt";
     }
     else
     {
-        $karyo_file = "/Users/m.hansen/maasha/perl_scripts/biotools/karyo_data/mouse_cytobands.txt";
- #       $karyo_file = "/home/m.hansen/maasha/perl_scripts/biotools/karyo_data/mouse_cytobands.txt";
+        $karyo_file = "/Users/m.hansen/maasha/perl_scripts/biopieces/karyo_data/mouse_cytobands.txt";
+ #       $karyo_file = "/home/m.hansen/maasha/perl_scripts/biopieces/karyo_data/mouse_cytobands.txt";
     }
 
     $karyo = &parse_karyo_data( $karyo_file );
index 1d5d5cb8125a3f863f1222497725c646fe763ba6..f2b8089c1535b1249d0732e494c2f959970dc998 100644 (file)
@@ -531,7 +531,7 @@ sub fold_struct_contrastruct
 
     my ( $tmp_file, $out_file1, $out_file2, $fh, $line, $struct, @AoA, $i, $temp, $index );
 
-    $tmp_dir ||= $ENV{ 'TMP_DIR' };
+    $tmp_dir ||= $ENV{ 'BP_TMP' };
 
     $tmp_file  = "$tmp_dir/fold.fna";
     $out_file1 = "$tmp_dir/fold.out1";
index cc9d60023df0cbdf7c8c3a9e3232835eab03b50f..1d839bc86e5e385fc0d7e1bdb528eca9d29f08df 100644 (file)
@@ -35,7 +35,7 @@ use vars qw( @ISA @EXPORT );
 
 use Data::Dumper;
 
-use Inline ( C => <<'END_C', DIRECTORY => $ENV{ "TMP_DIR" } );
+use Inline ( C => <<'END_C', DIRECTORY => $ENV{ "BP_TMP" } );
 
 int find_block_beg( char *string, char c, int beg, int len )
 {