primer3-org / primer3

Primer3 is a command line tool to select primers for polymerase chain reaction (PCR).
GNU General Public License v2.0
222 stars 64 forks source link

Penalty for template pair mispriming is perhaps calculated twice #63

Open Tarasovk49 opened 2 years ago

Tarasovk49 commented 2 years ago

The penalty calculation is partly written in italic, which means that this part is substituted for another formula in case thermodynamic model is used. According to manual the formula for primer pair penalty goes like this:

\<CITATION FROM MANUAL

These are allways added (+) to the penalty: (if the thermodynamic approach is used then the part in italic is substituted with text below this calculation):

PRIMER_PAIR_WT_DIFF_TM* \<difference in Tm between the left and the right primer> + PRIMER_PAIR_WT_COMPL_ANY * PRIMER_PAIR_4_COMPL_ANY + PRIMER_PAIR_WT_COMPL_END * PRIMER_PAIR_4_COMPL_END + PRIMER_PAIR_WT_LIBRARY_MISPRIMING * PRIMER_PAIR_4_LIBRARY_MISPRIMING + PRIMER_PAIR_WT_TEMPLATE_MISPRIMING * PRIMER_PAIR_4_TEMPLATE_MISPRIMING

If the thermodynamic approach is used then the part of italic in the above calculation is replaced by this:

............. If ((min(PRIMER_LEFT_4_TM,PRIMER_RIGHT_4_TM) - 5) ≤ PRIMER_PAIR_4_TEMPLATE_MISPRIMING_TH) then is added (+): + PRIMER_PAIR_WT_TEMPLATE_MISPRIMING_TH (PRIMER_PAIR_4_TEMPLATE_MISPRIMING_TH - (min(PRIMER_LEFT_4_TM,PRIMER_RIGHT_4_TM) - 5 - 1)) else if ((min(PRIMER_LEFT_4_TM,PRIMER_RIGHT_4_TM) - 5) > PRIMER_PAIR_4_TEMPLATE_MISPRIMING_TH) then is added (+): + PRIMER_PAIR_WT_TEMPLATE_MISPRIMING_TH (1/(min(PRIMER_LEFT_4_TM,PRIMER_RIGHT_4_TM) - 5 + 1 - PRIMER_PAIR_4_TEMPLATE_MISPRIMING_TH));

END OF CITATION>

The term for primer pair mispriming (PRIMER_PAIR_4_TEMPLATE_MISPRIMING) is not written in italic so if thermodynamic model is used, the penalty is calculateded twice - for classic model and for thermodynamic. I was not able to find any reasonable explanation for this that's why i opened the issue. I believe this is just a mistake in manual but I would appreciate if you check. Best regards, Tarasov Kirill