Giles Weaver | 27 Aug 12:39

Re: Bioperl Primer3 Tm calculation of a pre-defined primer

Hi Tony,

It isn't well documented, but Primer3 includes a program called oligotm,
which is used to calculate the Tm of short sequences (up to 32bp). You can
run it directly by typing something like "oligotm ACGTACGTACGTACGT" in the
terminal. Just typing oligotm will give you the options.

If you are using Linux, these snippets of code may help you call oligotm
from within a perl script:

use IPC::Open3;

sub _run_oligotm
{
    my ($class, $sequence) = @_;

    my $run = "oligotm -tp 1 -sc 1 $sequence";
    my $pid = open3(\*WTRFH, \*RDRFH, \*ERRFH, $run);
    close (WTRFH);

    my ($tm, $errors);
    while (<RDRFH>) { $tm .= $_;}
    while (<ERRFH>) { $errors .= $_;}
    chomp $tm;
    return ($tm, $errors);
}

You'll need to put this in a package or edit out the $class bit for it to
work.

(Continue reading)


Gmane