BioPerl
view release on metacpan or search on metacpan
Bio/SeqFeature/Primer.pm view on Meta::CPAN
$enthalpy += $thermo_values{$_}{enthalpy};
$entropy += $thermo_values{$_}{entropy};
}
# Account for initiation parameters
$enthalpy += $thermo_values{substr($sequence, 0, 1)}{enthalpy};
$entropy += $thermo_values{substr($sequence, 0, 1)}{entropy};
$enthalpy += $thermo_values{substr($sequence, -1, 1)}{enthalpy};
$entropy += $thermo_values{substr($sequence, -1, 1)}{entropy};
# Symmetry correction
$entropy -= 1.4;
my $r = 1.987; # molar gas constant
my $tm = $enthalpy * 1000 / ($entropy + ($r * log($oligo_conc))) - 273.15 + (12* (log($salt_conc)/log(10)));
return $tm;
}
=head2 Tm_estimate
Title : Tm_estimate
Usage : my $tm = $primer->Tm_estimate(-salt => 0.05);
Function: Estimate the Tm (melting temperature) of the primer
Returns : A scalar containing the Tm.
Args : -salt set the Na+ concentration on which to base the calculation.
Notes : This is only an estimate of the Tm that is kept in for comparative
reasons. You should probably use Tm instead!
This Tm calculations are taken from the Primer3 docs: They are
based on Bolton and McCarthy, PNAS 84:1390 (1962)
as presented in Sambrook, Fritsch and Maniatis,
Molecular Cloning, p 11.46 (1989, CSHL Press).
Tm = 81.5 + 16.6(log10([Na+])) + .41*(%GC) - 600/length
where [Na+] is the molar sodium concentration, %GC is the
%G+C of the sequence, and length is the length of the sequence.
However.... I can never get this calculation to give me the same result
as primer3 does. Don't ask why, I never figured it out. But I did
want to include a Tm calculation here because I use these modules for
other things besides reading primer3 output.
The primer3 calculation is saved as 'PRIMER_LEFT_TM' or 'PRIMER_RIGHT_TM'
and this calculation is saved as $primer->Tm so you can get both and
average them!
=cut
sub Tm_estimate {
# This should probably be put into seqstats as it is more generic, but what the heck.
my ($self, %args) = @_;
my $salt = 0.2;
if ($args{'-salt'}) {
$salt = $args{'-salt'}
};
my $seqobj = $self->seq();
my $length = $seqobj->length();
my $seqdata = Bio::Tools::SeqStats->count_monomers($seqobj);
my $gc=$$seqdata{'G'} + $$seqdata{'C'};
my $percent_gc = ($gc/$length)*100;
my $tm = 81.5+(16.6*(log($salt)/log(10)))+(0.41*$percent_gc) - (600/$length);
return $tm;
}
=head2 primary_tag, source_tag, location, start, end, strand...
The documentation of L<Bio::SeqFeature::Generic> describes all the methods that
L<Bio::SeqFeature::Primer> object inherit.
=cut
1;
( run in 2.390 seconds using v1.01-cache-2.11-cpan-437f7b0c052 )