Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#25 Salt correction params ignored in hairpin,etc calcs

open
nobody
7
2012-04-17
2012-04-13
Peter Reintjes
No

Primer3 does not correctly pass the Mono and Di-valent salt corrections to the oligo secondary structure tm calculations.

To see this error; Run "ntthal <salt options> -a HAIRPIN" with the same salt, divalent-salt, dntp settings as in the list of parameters given to Primer3.

ntthal will correctly use the values given as command line options, but though primer3 reads these parameters
(primer3_boulder_main.c) and sets its global 'pa' structure, it still uses the default thal_args values for the self- any- and hairpin-
thermo calculations.

We've added a fix (hack?) on line 316 of read_boulder.c to put these values into the default structure in thal.c
Currently, the initialization of the thal_args data structure uses only the constants hard wired into thal.c and not the values
from the parameter file.

Our fix: 1) create static variables to hold the default constants in thal.c (rather than literal numbers in the source code)
2) Add functions to thal.c to set these variables.
3) Set these variables when the parameter values are read (this requires read_boulder.c to include thal.h and call functions(2)
when it parses PRIMER_SALT_CONC, PRIMER_DIVALENT_CONC, PRIMER_DNTP_CONC, PRIMER_DNA_CONC, etc)

Discussion

  • Peter Reintjes
    Peter Reintjes
    2012-04-13

    thal.c with variables and accessors to replace in-line constants.

     
    Attachments
  • Peter Reintjes
    Peter Reintjes
    2012-04-17

    • priority: 5 --> 7
     
  • Peter Reintjes
    Peter Reintjes
    2012-04-17

    Today we discovered that INTERNAL oligo calculations, near the end of choose_primers() the call to create the internal(probe) oligos passes the
    thal_args_to_use structure which *does not* have the values from:

    PRIMER_INTERNAL_DNA_CONC
    PRIMER_INTERNAL_DNTP_CONC
    PRIMER_INTERNAL_SALT...etc.

    but rather the 'normal' primer values

    PRIMER_SALT_MONOVALENT
    PRIMER_SALT_DIVALENT
    PRIMER_DNA_CONC
    PRIMER_DNTP_CONC
    PRIMER_DNA_CONC

    We fixed this by allocating: internal_thal_arg_to_use
    (at the same point where thal_arg_to_use is created), and making sure
    that it gets the right values by initializing it with the following code.
    (Note that the last line also fixes the hairpin flag which wasn't set correctly in thal_args_to_use)

    if(internal_thal_arg_to_use == NULL) /* INTERNALs have different PARAMETERS! pbr */
    {
    internal_thal_arg_to_use = create_thal_arg_holder();

    internal_thal_arg_to_use->any->mv = pa->o_args.salt_conc;
    internal_thal_arg_to_use->any->dv = pa->o_args.divalent_conc;
    internal_thal_arg_to_use->any->dntp = pa->o_args.dntp_conc;
    internal_thal_arg_to_use->any->dna_conc = pa->o_args.dna_conc;

    internal_thal_arg_to_use->end1->mv = pa->o_args.salt_conc;
    internal_thal_arg_to_use->end1->dv = pa->o_args.divalent_conc;
    internal_thal_arg_to_use->end1->dntp = pa->o_args.dntp_conc;
    internal_thal_arg_to_use->end1->dna_conc = pa->o_args.dna_conc;

    internal_thal_arg_to_use->end2->mv = pa->o_args.salt_conc;
    internal_thal_arg_to_use->end2->dv = pa->o_args.divalent_conc;
    internal_thal_arg_to_use->end2->dntp = pa->o_args.dntp_conc;
    internal_thal_arg_to_use->end2->dna_conc = pa->o_args.dna_conc;

    internal_thal_arg_to_use->hairpin_th->mv = pa->o_args.salt_conc;
    internal_thal_arg_to_use->hairpin_th->dv = pa->o_args.divalent_conc;
    internal_thal_arg_to_use->hairpin_th->dntp = pa->o_args.dntp_conc;
    internal_thal_arg_to_use->hairpin_th->dna_conc = pa->o_args.dna_conc;
    internal_thal_arg_to_use->hairpin_th->dimer = 0;
    }