Skip to content
Snippets Groups Projects
Commit a3cba24a authored by Sebastien Terrat's avatar Sebastien Terrat
Browse files

Fixes #13 issue

Modify the program to avoid errors due to PrimerRegExp function to
generate regular expressions.
parent ed1a1099
No related branches found
No related tags found
No related merge requests found
......@@ -184,8 +184,8 @@ sub DefineAllPrimerSeq
#2.5: Create the regular expression for each primer (forward and reverse, reverse complemented or not)
#Each regular expression is stored for further analysis in string variables ($forward, $forward_rc,
#$reverse and $reverse_rc). To do this efficiently, we use the function DefinePrimerRegex
$forward = PerlLib::Miscellaneous::DefinePrimerRegex($forward);
$reverse = PerlLib::Miscellaneous::DefinePrimerRegex($reverse);
#$forward = PerlLib::Miscellaneous::DefinePrimerRegex($forward);
#$reverse = PerlLib::Miscellaneous::DefinePrimerRegex($reverse);
#Test to know if partial primers need to be defined, using the "stringency" parameter
if ((uc($stringency) eq "MEDIUM")||(uc($stringency) eq "LOW"))
......@@ -198,8 +198,8 @@ sub DefineAllPrimerSeq
#2.5: Here, we use the function DefinePrimerRegex to define each regular expression for each partial primer
#easily and fastly fo further steps.
foreach $element (@forward_rc_part) { $element = PerlLib::Miscellaneous::DefinePrimerRegex($element); }
foreach $element (@reverse_rc_part) { $element = PerlLib::Miscellaneous::DefinePrimerRegex($element); }
#foreach $element (@forward_rc_part) { $element = PerlLib::Miscellaneous::DefinePrimerRegex($element); }
#foreach $element (@reverse_rc_part) { $element = PerlLib::Miscellaneous::DefinePrimerRegex($element); }
#3.0: We finally return the two array references and the two primers
return (\@forward_rc_part, \@reverse_rc_part, $forward, $reverse);
......@@ -424,14 +424,14 @@ sub Preprocessing
foreach $element_mm (@forward_mm)
{
push(@len_forward_mm, length($element_mm));
$element_mm = PerlLib::Miscellaneous::DefinePrimerRegex($element_mm);
#$element_mm = PerlLib::Miscellaneous::DefinePrimerRegex($element_mm);
}
$ref_array = &DefineAllMMPrimers($reverse, $lvl_mmreverse);
@reverse_mm = @{$ref_array};
foreach $element_mm (@reverse_mm)
{
push(@len_reverse_mm, length($element_mm));
$element_mm = PerlLib::Miscellaneous::DefinePrimerRegex($element_mm);
#$element_mm = PerlLib::Miscellaneous::DefinePrimerRegex($element_mm);
}
#=======================================================================================================
......@@ -506,6 +506,7 @@ sub Preprocessing
#3.0: Loop to search for mismatch primers in the proximal region of the sequence
LOOP02:for($j=0;$j<=$#forward_mm;$j++)
{
$forward_mm[$j] = PerlLib::Miscellaneous::DefinePrimerRegex($forward_mm[$j]);
#2.5: Regular expression to find sequences with the forward primer only to search then for the
#second primer partially and reverse complemented
if ($tmp[1] =~/(^$forward_mm[$j])/)
......@@ -513,6 +514,7 @@ sub Preprocessing
#2.5: Used loop to treat each partial primer previously defined
LOOP03:foreach $element (@reverse_rc_part)
{
$element = PerlLib::Miscellaneous::DefinePrimerRegex($element);
#2.5: New regular expression to find sequences with two primers (one at the end of the
#sequence potentially partial. The "?" is used for a not greedy regular expression
#(to avoid some problems with the primer research, particularly with partial primers).
......@@ -549,6 +551,7 @@ sub Preprocessing
#3.0: Loop to search for mismatch primers in the proximal region of the sequence
LOOP02:for($j=0;$j<=$#reverse_mm;$j++)
{
$reverse_mm[$j] = PerlLib::Miscellaneous::DefinePrimerRegex($reverse_mm[$j]);
#2.5: Regular expression to find sequences with the reverse primer only to search then for the
#second primer partially and reverse complemented
if ($tmp[1] =~/(^$reverse_mm[$j])/)
......@@ -556,6 +559,7 @@ sub Preprocessing
#2.5: Used loop to treat each partial primer previously defined
LOOP03:foreach $element (@forward_rc_part)
{
$element = PerlLib::Miscellaneous::DefinePrimerRegex($element);
#2.5: New regular expression to find sequences with two primers (one at the end of the
#sequence potentially partial. The "?" is used for a not greedy regular expression
#(to avoid some problems with the primer research, particularly with partial primers).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment