Exemplo n.º 1
0
double seqTm(char *seq, double dna_conc, double salt_conc)
/* Figure out melting temperature of sequence of any length given
 * dna and salt concentration. */
{
  int len = strlen(seq);
  return (len > 36)
    ? longSeqTm(seq, 0, len, salt_conc) : oligoTm(seq, dna_conc, salt_conc);
}
Exemplo n.º 2
0
boolean doPcr(struct pcrServer *server, struct targetPcrServer *targetServer,
              char *fPrimer, char *rPrimer,
              int maxSize, int minPerfect, int minGood, boolean flipReverse)
/* Do the PCR, and show results. */
{
    struct errCatch *errCatch = errCatchNew();
    boolean ok = FALSE;

    hgBotDelay();
    if (flipReverse)
        reverseComplement(rPrimer, strlen(rPrimer));
    if (errCatchStart(errCatch))
    {
        struct gfPcrInput *gpi;

        AllocVar(gpi);
        gpi->fPrimer = fPrimer;
        gpi->rPrimer = rPrimer;
        if (server != NULL)
            doQuery(server, gpi, maxSize, minPerfect, minGood);
        if (targetServer != NULL)
            doTargetQuery(targetServer, gpi, maxSize, minPerfect, minGood);
        ok = TRUE;
    }
    errCatchEnd(errCatch);
    if (errCatch->gotError)
        warn("%s", errCatch->message->string);
    errCatchFree(&errCatch);
    if (flipReverse)
        reverseComplement(rPrimer, strlen(rPrimer));
    webNewSection("Primer Melting Temperatures");
    printf("<TT>");
    printf("<B>Forward:</B> %4.1f C %s<BR>\n", oligoTm(fPrimer, 50.0, 50.0), fPrimer);
    printf("<B>Reverse:</B> %4.1f C %s<BR>\n", oligoTm(rPrimer, 50.0, 50.0), rPrimer);
    printf("</TT>");
    printf("The temperature calculations are done assuming 50 mM salt and 50 nM annealing "
           "oligo concentration.  The code to calculate the melting temp comes from "
           "<A HREF=\"http://frodo.wi.mit.edu/primer3/input.htm\" target=_blank>"
           "Primer3</A>.");
    return ok;
}