]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed all defects from bug list
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 10 Jul 2008 07:05:11 +0000 (07:05 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Thu, 10 Jul 2008 07:05:11 +0000 (07:05 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@142 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm

index 0523a45a2af78483c351e924ad9afed0a03da6cb..8c9358b543123d1facab6b11e1f0abcc7be365b7 100644 (file)
@@ -2523,7 +2523,7 @@ sub script_translate_seq
                     %new_record = %{ $record };
 
                     $new_record{ "SEQ" }     = Maasha::Seq::translate( $record->{ "SEQ" }, $frame );
-                    $new_record{ "SEQ_LEN" } = length $record->{ "SEQ" };
+                    $new_record{ "SEQ_LEN" } = length $new_record{ "SEQ" };
                     $new_record{ "FRAME" }   = $frame;
 
                     put_record( \%new_record, $out );
@@ -2595,6 +2595,8 @@ sub script_extract_seq
             }
         }
 
+        $record->{ "SEQ_LEN" } = length $record->{ "SEQ" };
+
         put_record( $record, $out );
     }
 }
@@ -2952,7 +2954,6 @@ sub script_split_seq
 
                 if ( $options->{ "uniq" } and not $lookup{ $subseq } )
                 {
-                    $new_record->{ "REC_TYPE" } = "SPLIT";
                     $new_record->{ "SEQ_NAME" } = $record->{ "SEQ_NAME" } . "[" . ( $i + 1 ) . "-" . ( $i + $options->{ "word_size" } ) . "]";
                     $new_record->{ "SEQ" }      = $subseq;
 
@@ -2962,7 +2963,6 @@ sub script_split_seq
                 }
                 else
                 {
-                    $new_record->{ "REC_TYPE" } = "SPLIT";
                     $new_record->{ "SEQ_NAME" } = $record->{ "SEQ_NAME" } . "[" . ( $i + 1 ) . "-" . ( $i + $options->{ "word_size" } ) . "]";
                     $new_record->{ "SEQ" }      = $subseq;
 
@@ -3976,7 +3976,7 @@ sub script_write_solid
     {
         if ( $record->{ "SEQ_NAME" } and $record->{ "SEQ" } )
         {
-            $seq_cs = Maasha::Solid::seq2color_space( $record->{ "SEQ" } );
+            $seq_cs = Maasha::Solid::seq2color_space( uc $record->{ "SEQ" } );
 
             Maasha::Fasta::put_entry( [ $record->{ "SEQ_NAME" }, $seq_cs ], $fh, $options->{ "wrap" } );
         }
@@ -4147,7 +4147,7 @@ sub script_analyze_vals
     foreach $key ( keys %{ $analysis } )
     {
         $analysis->{ $key }->{ "MEAN" } = sprintf "%.2f", $analysis->{ $key }->{ "SUM" } / $analysis->{ $key }->{ "COUNT" };
-        $analysis->{ $key }->{ "SUM" }  = sprintf "%.2f", $analysis->{ $key }->{ "SUN" };
+        $analysis->{ $key }->{ "SUM" }  = sprintf "%.2f", $analysis->{ $key }->{ "SUM" };
     }
 
     my ( $keys, $types, $counts, $mins, $maxs, $sums, $means );