]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed -S and -L for calc_fixedstep biopiece
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 3 Sep 2008 05:46:38 +0000 (05:46 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 3 Sep 2008 05:46:38 +0000 (05:46 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@241 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm

index 3344774e5eecef1b1a0e2647cb71b2fc37b15b7d..b50b3fca53a695a297dee5a892b1b8b03d66af58 100644 (file)
@@ -444,6 +444,8 @@ sub get_options
     elsif ( $script eq "calc_fixedstep" )
     {
         @options = qw(
+            score|S
+            log10|L
         );
     }
     elsif ( $script eq "transliterate_seq" )
@@ -2552,6 +2554,8 @@ sub script_calc_fixedstep
             {
                 if ( $beg > $max )
                 {
+                    map { $_ = sprintf( "%.4f", Maasha::Calc::log10( $_ ) ) } @{ $block } if $options->{ "log10" };
+
                     $record->{ "CHR" }     = $chr;
                     $record->{ "CHR_BEG" } = $beg_block;
                     $record->{ "STEP" }    = 1;
@@ -2584,6 +2588,8 @@ sub script_calc_fixedstep
 
         close $fh_in;
 
+        map { $_ = sprintf( "%.4f", Maasha::Calc::log10( $_ ) ) } @{ $block } if $options->{ "log10" };
+
         $record->{ "CHR" }     = $chr;
         $record->{ "CHR_BEG" } = $beg_block;
         $record->{ "STEP" }    = 1;