]> git.donarmstrong.com Git - biopieces.git/blobdiff - code_perl/Maasha/Seq.pm
migrated count_records
[biopieces.git] / code_perl / Maasha / Seq.pm
index 9b3ae083e65ff4c5aeea4feec8044ce7183ea9fc..42df6d3427c87b0833819e802c17ae5ec829d518 100644 (file)
@@ -636,7 +636,7 @@ sub generate_dna_oligos
 
     # Generates all possible DNA oligos of a given wordsize.
 
-    # alternative way: perl -MData::Dumper -e '@CONV = glob( "{T,C,A,G}" x 4 ); print Dumper( \@CONV )'
+    # alternative way: perl -MData::Dumper -e '@CONV = glob( "{A,T,C,G}" x 4 ); print Dumper( \@CONV )'
 
 
     my ( $wordsize,   # size of DNA oligos
@@ -881,14 +881,14 @@ sub seq_analyze
 
         $char_hash{ $char } += $char_hash{ lc $char };
 
-        $analysis{ "RES:$char" } = $char_hash{ $char };
+        $analysis{ "RES[$char]" } = $char_hash{ $char };
 
         $max = $char_hash{ $char } if $char_hash{ $char } > $max;
 
         $analysis{ "RES_SUM" } += $char_hash{ $char };
     }
 
-    map { $analysis{ "RES:$_" } = $indel_hash{ $_ } } @indels;
+    map { $analysis{ "RES[$_]" } = $indel_hash{ $_ } } @indels;
 
     $analysis{ "MIX_INDEX" } = sprintf( "%.2f", $max / $analysis{ "SEQ_LEN" } );
     $analysis{ "MELT_TEMP" } = sprintf( "%.2f", 4 * $gc + 2 * $at );
@@ -1389,6 +1389,10 @@ sub seq_word_unpack
 # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ADAPTOR LOCATING <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 
 
+###############################    REDUNDANT   ##############################
+
+# these functions have been replaced by index_m and match_m in Common.pm
+
 sub find_adaptor
 {
     # Martin A. Hansen & Selene Fernandez, August 2008
@@ -1437,17 +1441,17 @@ sub check_diag
     # Checks the diagonal starting at a given coordinate 
     # of a search space constituted by an adaptor and a tag sequence.
     # Residues in the diagonal are compared between the sequences allowing
-    # for a given number of mismatches. We terminate when search spaca is
+    # for a given number of mismatches. We terminate when search space is
     # exhausted or if max matches or mismatches is reached.
 
-    my ( $adaptor,
-         $tag,
-         $adaptor_len,
-         $tag_len,
-         $adaptor_beg,
-         $tag_beg,
-         $max_match,
-         $max_mismatch,
+    my ( $adaptor,       # list of chars
+         $tag,           # list of chars
+         $adaptor_len,   # length of adaptor sequence
+         $tag_len,       # length of tag sequence
+         $adaptor_beg,   # adaptor begin coordinate
+         $tag_beg,       # tag begin coordinate
+         $max_match,     # number of matches indicating success
+         $max_mismatch,  # number of mismatches
        ) = @_;
 
     # Returns boolean.