BioPerl
view release on metacpan or search on metacpan
Bio/Align/ProteinStatistics.pm view on Meta::CPAN
# are fraction of amino acids differing, as also in the
# case of the PAM distance. If the fraction of amino acids
# differing gets larger than 0.8541 the distance becomes
# infinite.
my $D = 1 - ( $match / $scored );
if( $D < 0.8541 ) {
$D = - log ( 1 - $D - (0.2 * ($D ** 2)));
$values[$j][$i] = $values[$i][$j] = sprintf($precisionstr,$D);
} else {
$values[$j][$i] = $values[$i][$j] = ' NaN';
}
# fwd and rev lookup
$dist{$names[$i]}->{$names[$j]} = [$i,$j];
$dist{$names[$j]}->{$names[$i]} = [$i,$j];
# (diagonals) distance is 0 for same sequence
$dist{$names[$j]}->{$names[$j]} = [$j,$j];
$values[$j][$j] = sprintf($precisionstr,0);
}
Bio/MapIO/fpc.pm view on Meta::CPAN
else {
$_contigs{$ctgname}{'group'} = "?";
}
}
elsif ($line =~ /^User_remark\s+"(.+)"/) {
$_contigs{$ctgname}{'usr_remark'} = $1;
}
elsif ($line =~ /^Trace_remark\s+"(.+)"/) {
$_contigs{$ctgname}{'trace_remark'} = $1;
}
elsif ($grpabbr && $line =~ /^Chr_remark\s+"(\W|$grpabbr((\d+)|(\w+)|([.\w\d]+)))\s*(\{(.*)\}|\[(.*)\])?"\s+(Pos\s+((\d.)+|NaN))(NOEDIT)?/)
{
my $grpmatch = $2;
my $pos = $10;
if ($pos eq "NaN") {
$pos = 0;
print "Warning: Nan encountered for Contig position \n";
}
$_contigs{$ctgname}{'chr_remark'} = $6;
$_contigs{$ctgname}{'position'} = $pos;
$_contigs{$ctgname}{'subgroup'} = 0;
if (defined($grpmatch)) {
$_contigs{$ctgname}{'anchor'} = 1;
( run in 0.419 second using v1.01-cache-2.11-cpan-4d50c553e7e )