# 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
$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 );
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> 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
# 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.