Result:
found more than 649 distributions - search limited to the first 2001 files matching your query ( run in 1.493 )


Bio-GMOD

 view release on metacpan or  search on metacpan

GMOD/Admin/Update.pm  view on Meta::CPAN


  my ($mount_point, $available_space);
  my $counter;
  while (<IN>) {
    next unless /^\//;
    my ($filesystem, $blocks, $used, $available, $use_percent, $mounted_on) = split(/\s+/);
    $mount_point = $mounted_on;
    $available_space = sprintf("%.2f", $available/1048576);
    $counter++;
  }

 view all matches for this distribution


Bio-GeneDesign

 view release on metacpan or  search on metacpan

lib/Bio/GeneDesign.pm  view on Meta::CPAN

object.

the count function counts the bases in a DNA sequence and returns a hash
reference where each base (including the ambiguous bases) are keys and the
values are the number of times they appear in the sequence. There are also the
special values GCp and ATp for GC and AT percentage.

=cut

sub count
{

lib/Bio/GeneDesign.pm  view on Meta::CPAN


=head2 GC_windows

takes a nucleotide sequence, a window size, and minimum and maximum values.
returns lists of real coordinates of subsequences that violate mimimum or
maximum GC percentages.

Values are returned inside an array reference such that the first value is an
array ref of minimum violators (as array refs of left/right coordinates), and
the second value is an array ref of maximum violators.

lib/Bio/GeneDesign.pm  view on Meta::CPAN

  my ($self, @args) = @_;

  my ($rlen, $rgc, $rstop)
    = $self->_rearrange([qw(
        length
        gc_percentage
        no_stops)], @args);

  $self->throw("no codon table has been defined")
    if ($rstop && ! $self->{codontable});

  $rgc = $rgc || 50;
  $self->throw("gc_percentage must be between 0 and 100")
    if ($rgc && ($rgc < 0 || $rgc > 100));

  if (! $rlen || $rlen < 1)
  {
    return q{};

 view all matches for this distribution


Bio-Graphics

 view release on metacpan or  search on metacpan

lib/Bio/Graphics/Glyph/merged_alignment.pm  view on Meta::CPAN


=head2 SAMPLE CONFIGURATION

Sample gbrowse configuration stanzas for an alignment feature
using this glyph.  The scores are assumed to be expressed 
as percent identity (0-100).

 # base configuration
 [BLASTZ]
 feature      = blastz_alignment
 glyph        = merged_alignment

 view all matches for this distribution


Bio-Grep

 view release on metacpan or  search on metacpan

lib/Bio/Grep/Backend/Vmatch.pm  view on Meta::CPAN

                end              => $upstream + $fields[$COL_LENGTH],
                alignment        => Bio::SimpleAlign->new(),
                sequence_id      => $internal_seq_id,
                remark           => q{},
                evalue           => $fields[$COL_EVALUE],
                percent_identity => $fields[$COL_IDENTITY],
                query            => Bio::Seq->new(
                    -id   => $query->id,
                    -desc => $query->desc . $rct,
                    -seq  => $rcs,
                ),

 view all matches for this distribution


Bio-Grid-Run-SGE

 view release on metacpan or  search on metacpan

bin/distribution  view on Meta::CPAN

		$barWidth->[$i] = log($count) / $maxLog;
	} else {
		$barWidth->[$i] = $count / $maxVal;
	}

	# determine the percent of key frequency
	my $percentile = $count / $totalValues * 100;

	# graph axis labels, really
	$ctText->[$i] = sprintf ("%d", $count);
	$pctText->[$i] = $count > 0 ? sprintf ("(%3.02f%%)", $percentile) : '';
	$preBarLen = length ($ctText->[$i]) + length ($pctText->[$i]);

	# determine the longest key name and longest count/percent text for
	# aligning the output
	if ($preBarLen > $maxPreBarLen) { $maxPreBarLen = $preBarLen; }
	if (length ($sortedKeys[$i]) > $maxKeyLen) { $maxKeyLen = length ($sortedKeys[$i]); }
}

bin/distribution  view on Meta::CPAN

}

# the arrays, hashes, variables must be all-correct for this to
# work, TODO: list out which ones they are, convert to functional
# keyText->[]  - list of the keys
# pctText->[]  - list of the percents
# ctText->[]   - list of the counts
# barWidth->[] - list of the widths of the bars
sub outputGraph {
	# print a header with alignment from key names
	print STDERR "min";

bin/distribution  view on Meta::CPAN

	print "        num      ^\\d+\$        - tokens/lines must be entirely numeric\n";
	print "  --numonly[=N]  input is numerics, simply graph values without labels\n";
	print "        abs      input is absolute values (default)\n";
	print "        mon      input monotonically-increasing, graph differences (of 2nd and later values)\n";
	print "  --palette=P    comma-separated list of ANSI colour values for portions of the output\n";
	print "                 in this order: regular, key, count, percent, graph. implies --color.\n";
	print "  --rcfile=F     use this rcfile instead of \$HOME/.distributionrc - must be first argument!\n";
	print "  --size=S       size of histogram, can abbreviate to single character, overridden by --width/--height\n";
	print "        small    40x10\n";
	print "        medium   80x20\n";
	print "        large    120x30\n";

 view all matches for this distribution


Bio-Homology-InterologWalk

 view release on metacpan or  search on metacpan

lib/Bio/Homology/InterologWalk.pm  view on Meta::CPAN

     
          #lastly I store those new ids never seen in the starting dataset
          $new_id_set{$idOUT} = 1 unless(exists($start_data_set{$idOUT})); 
     }
     my $number_of_old_IDs = keys %old_id_present;
     my $percentage = ($number_of_old_IDs / $number_of_elements_start_ds) * 100;
     print("Number of IDs from the original dataset that appear in the network: $number_of_old_IDs\n");
     print("Percentage of IDs from the original dataset that appear in the final dataset: $percentage\n");
     
     my $number_of_new_IDs = keys %new_id_set;
     my $number_of_network_nodes = keys %all_seen;
     $percentage= ($number_of_new_IDs / $number_of_network_nodes) * 100;
     if($onetoone_only){
          print("Number of total UNIQUE IDs in interaction dataset (considering ONE-TO-ONE ortologies only): $number_of_network_nodes\n");
     }else{
          print("Number of total UNIQUE IDs in interaction dataset: $number_of_network_nodes\n");
     }
     print("Number of NEW ids (e.g. not seen in starting data set): $number_of_new_IDs\n");
     print("Percentage of new ids over the total: $percentage\n");
     
     
     #I save all the new ids in a flat file. This might be useful to do some analysis of their functional annotation
     foreach my $id (sort keys %new_id_set){
          #print ("$id\t$new_id_set{$id}\n");

lib/Bio/Homology/InterologWalk.pm  view on Meta::CPAN

          
               $DF_oname = $homology_member->display_label;

               #OPI
               my $pairwise_alignment_from_multiple = $homology->get_SimpleAlign;
               $DF_opi = $pairwise_alignment_from_multiple->overall_percentage_identity;
               #$opi = sprintf("%.3f", $overall_pid); #rounded
          
               $DF_orthologue_id = '-' if(!$DF_orthologue_id);
               $DF_oname         = '-' if(!$DF_oname); 
               $DF_odesc         = '-' if(!$DF_odesc);

lib/Bio/Homology/InterologWalk.pm  view on Meta::CPAN

             We can divide the metadata features in two broad classes:
             - features related to the interaction. These include: Interaction Type, Interaction 
               Detection Method, Interaction coming from a SPOKE-expanded complex, interaction recon-
               firmed through multiple taxa, interaction reconfirmed through multiple detection methods
             - features related to the two orthology mappings. These include: orthology type 
               (one-to-one, one-to-many, many-to-one, many-to-many), OPI (percentage identity of the 
               conserved columns - see Bio::SimpleAlign), node to node distance, distance from the 
               first shared ancestor, (under development) dN/dS ratio
             The IPX computation will also involve a normalisation stage. The subroutine requires 
             five arguments (meanscore_x) representing mean values to be used for normalisation.
             The actual means are computed in get_mean_scores(), which is pre-requisite to 

lib/Bio/Homology/InterologWalk.pm  view on Meta::CPAN

             -meanscore_me_dm : mean 'multiple detection methods' score for normalisation
             -meanscore_me_taxa : mean 'multiple taxa' score for normalisation
 Throws    : -
 Comment   : -

See Also   : L<http://search.cpan.org/~cjfields/BioPerl-1.6.1/Bio/SimpleAlign.pm#overall_percentage_identity>, L</get_mean_scores>, C<doScores.pl> for sample usage

=cut


sub compute_prioritisation_index{

 view all matches for this distribution


Bio-KBase

 view release on metacpan or  search on metacpan

lib/Bio/KBase/CDMI/CDMI_APIImpl.pm  view on Meta::CPAN

in which hundreds of corresponding genes are detected, but they all come from
very closely related genomes.

The significance of the score relates to the number of genomes in the database.
We recommend that you take the time to look at a set of scored pairs and determine
approximately what percentage appear to be actually related for a few cutoff values.

=back

=cut

 view all matches for this distribution


Bio-Kmer

 view release on metacpan or  search on metacpan

lib/Bio/Kmer.pm  view on Meta::CPAN

                          software like jellyfish.
  gt           1          If the count of kmers is fewer 
                          than this, ignore the kmer. This 
                          might help speed analysis if you 
                          do not care about low-count kmers.
  sample       1          Retain only a percentage of kmers.
                          1 is 100%; 0 is 0%
                          Only works with the perl kmer counter.
  verbose      0          Print more messages.

  Examples:

 view all matches for this distribution


Bio-MAGE

 view release on metacpan or  search on metacpan

MAGE/Measurement/ConcentrationUnit.pm  view on Meta::CPAN

use constant UNITNAMECV_PM => 'pM';
use constant UNITNAMECV_MG_PER_ML => 'mg_per_mL';
use constant UNITNAMECV_OTHER => 'other';
use constant UNITNAMECV_UM => 'uM';
use constant UNITNAMECV_M => 'M';
use constant UNITNAMECV_MASS_PER_VOLUME_PERCENT => 'mass_per_volume_percent';
use constant UNITNAMECV_GRAM_PERCENT => 'gram_percent';
use constant UNITNAMECV_MASS_PER_MASS_PERCENT => 'mass_per_mass_percent';
use constant UNITNAMECV_NM => 'nM';

=head1 NAME

Bio::MAGE::Measurement::ConcentrationUnit - Class for the MAGE-OM API

MAGE/Measurement/ConcentrationUnit.pm  view on Meta::CPAN


=item $val = $concentrationunit->setUnitNameCV($val)

The restricted setter method for the C<unitNameCV> attribute.

C<unitNameCV> is an B<enumerated> attribute - it can only be set to C<undef> or one of the following values: M mM uM nM pM fM mg_per_mL mL_per_L g_per_L gram_percent mass_per_volume_percent  mass_per_mass_percent other


Input parameters: the value to which the C<unitNameCV> attribute will be set 

Return value: the current value of the C<unitNameCV> attribute 

Side effects: none

Exceptions: will call C<croak()> if no input parameters are specified, or
if too many input parameters are specified, or if C<$val> is not one of the accepted enumeration values: M mM uM nM pM fM mg_per_mL mL_per_L g_per_L gram_percent mass_per_volume_percent  mass_per_mass_percent other

=cut


sub setUnitNameCV {

MAGE/Measurement/ConcentrationUnit.pm  view on Meta::CPAN

  croak(__PACKAGE__ . "::setUnitNameCV: no arguments passed to setter")
    unless @_;
  croak(__PACKAGE__ . "::setUnitNameCV: too many arguments passed to setter")
    if @_ > 1;
  my $val = shift;
    croak(__PACKAGE__ . "::setUnitNameCV: expected one of enum values : M mM uM nM pM fM mg_per_mL mL_per_L g_per_L gram_percent mass_per_volume_percent  mass_per_mass_percent other, got $val")
    unless (not defined $val) or (grep {$val eq $_} qw(M mM uM nM pM fM mg_per_mL mL_per_L g_per_L gram_percent mass_per_volume_percent  mass_per_mass_percent other));

  return $self->{__UNITNAMECV} = $val;
}


MAGE/Measurement/ConcentrationUnit.pm  view on Meta::CPAN


The restricted getter method for the C<unitNameCV> attribute.

Input parameters: none

Return value: the current value of the C<unitNameCV> attribute : an instance of type C<M mM uM nM pM fM mg_per_mL mL_per_L g_per_L gram_percent mass_per_volume_percent  mass_per_mass_percent other>.

Side effects: none

Exceptions: will call C<croak()> if any input parameters are specified

 view all matches for this distribution


Bio-MAGETAB

 view release on metacpan or  search on metacpan

lib/Bio/MAGETAB/Util/DBLoader.pm  view on Meta::CPAN

            }
        }

        # Warn the user about a known Tangram bug.
        if ( $value && $value =~ /\%/ ) {
            warn("Warning: ID fields containing the percent character (%) may"
                ." lead to problems with object retrieval. See the documentation for "
                .__PACKAGE__." for a discussion of this bug.\n");
        }

        {

 view all matches for this distribution


Bio-MLST-Check

 view release on metacpan or  search on metacpan

lib/Bio/MLST/Blast/BlastN.pm  view on Meta::CPAN

  my ($start, $end) = ($row[8], $row[9]);
  ($start, $end, my $reverse) = $start <= $end ? ($start, $end, 0) : ($end, $start, 1);
  return {
    'allele_name' => $row[0],
    'source_name' => $row[1],
    'percentage_identity' => $row[2],
    'sample_alignment_length' => $row[3],
    'matches' => $row[12],
    'source_start' => $start,
    'source_end' => $end,
    'reverse' => $reverse,

lib/Bio/MLST/Blast/BlastN.pm  view on Meta::CPAN


sub _filter_best_hits
{
  my($self, $hits, $tollerance) = @_;
  $tollerance = defined($tollerance) ? $tollerance : 2.0;
  my @percentages = map { $_->{'percentage_identity'} } @$hits;
  my $top_percentage = max @percentages;
  my @top_hits = grep { $_->{'percentage_identity'} >= $top_percentage - $tollerance } @$hits;
  return \@top_hits;
}

sub _group_overlapping_hits
{

lib/Bio/MLST/Blast/BlastN.pm  view on Meta::CPAN

sub _best_hit_in_group
{
  ###
  # The best hit has the greatest number of matching bases.  If two hits have
  # the same number of matching bases, the one with the greater
  # percentage identity is selected.
  ###
  my($self, $hits) = @_;
  my @lengths = map { $_->{'matches'} } @$hits;
  my $max_length = max @lengths;
  my @longest_hits = grep { $_->{'matches'} == $max_length } @$hits;

  my $best_hit = reduce { $a->{'percentage_identity'} > $b->{'percentage_identity'} ? $a : $b } @longest_hits;
  return $best_hit;
}

sub _blastn_cmd
{

lib/Bio/MLST/Blast/BlastN.pm  view on Meta::CPAN

  $bins = $self->_merge_similar_bins($bins);
  my $groups = $self->_bins_to_groups($bins);

  # Find the best match
  my @best_in_groups = map { $self->_best_hit_in_group($_) } @$groups;
  $top_hit = reduce { $a->{'percentage_identity'} > $b->{'percentage_identity'} ? $a : $b } @best_in_groups;

  if (defined $top_hit)
  {
    $top_hit->{'percentage_identity'} = int($top_hit->{'percentage_identity'});
    delete $top_hit->{'sample_alignment_length'};
    delete $top_hit->{'matches'};
  }
  else {
    $top_hit = {};

lib/Bio/MLST/Blast/BlastN.pm  view on Meta::CPAN


Returns a hash containing details about the top blast result.

The attributes returned in the hash are:
  allele_name
  percentage_identity
  source_name
  source_start
  source_end
  reverse
  contamination

 view all matches for this distribution


Bio-MUST-Apps-FortyTwo

 view release on metacpan or  search on metacpan

bin/compress-db.pl  view on Meta::CPAN

=for Euclid: n.type:    n > 15
    n.default: 40

=item --cap3-p=<n>

Overlap percent identity cutoff for CAP3 (should be > 65) [default: 90].

=for Euclid: n.type:    n > 65
    n.default: 90

=item --verbosity=<level>

 view all matches for this distribution


Bio-MUST-Apps-Physeter

 view release on metacpan or  search on metacpan

bin/physeter.pl  view on Meta::CPAN

            next HIT;
        }

        # skip weak hits (classical mode)
        next HIT if $hit->hsp_length       < $ARGV_tax_min_len;
        next HIT if $hit->percent_identity < $ARGV_tax_min_ident;
        next HIT if $hit->bit_score        < $ARGV_tax_min_score;

        # fetch hit taxonomy and org
        # optimized code (requires taxon_id|accession seq_ids)
        my $taxon_id = ( split m{\|}xms, $hit->hit_id )[0];

bin/physeter.pl  view on Meta::CPAN

Enable greedy behavior when interpreting the ambiguous taxa provided in the
required argument C<--taxon-list> [default: no].

=item --tax-min-ident=<n>

Minimum identity percentage to consider a hit when computing a LCA [default:
n.default].

=for Euclid: n.type: +number
    n.default: 0

 view all matches for this distribution


Bio-MUST-Core

 view release on metacpan or  search on metacpan

bin/classify-ali.pl  view on Meta::CPAN


Other conditions are available: 'min_org_count' and 'max_org_count' deal with
organisms instead of sequences, whereas 'min_copy_mean' and 'max_copy_mean'
allow bounding the mean number of gene copies per organism. Moreover, there
exist 'perc' variants ('min_seq_perc', 'max_seq_perc', 'min_org_perc',
'max_org_perc') that count in percents (either of total sequences or total
organisms). All default to no bound.

An example YAML file follows:

    categories:

 view all matches for this distribution


Bio-MUST-Drivers

 view release on metacpan or  search on metacpan

bin/annotate-ali.pl  view on Meta::CPAN

use Bio::MUST::Drivers;


# TODO: add support for prebuilt reference database (e.g. nr)

# convert fractional identity threshold to percentage (see Euclid)
$ARGV_identity *= 100.0 if 0 < $ARGV_identity && $ARGV_identity <= 1;

### Building database: $ARGV_ref_file
my $blastdb = Bio::MUST::Drivers::Blast::Database::Temporary->new(
    seqs => $ARGV_ref_file

bin/annotate-ali.pl  view on Meta::CPAN

    my $curr_id = q{};

    HIT:
    while ( my $hit = $parser->next_hit ) {
        my ($qid, $hid, $identity)
            = map { $hit->$_ } qw(query_id hit_id percent_identity);

        next HIT if $identity < $ARGV_identity;     # skip weak-identity hits

        unless ($ARGV_hit_list) {                   # optionally
            next HIT if $qid eq $curr_id;           # skip non-first hits

bin/annotate-ali.pl  view on Meta::CPAN


=item --identity [=] <number>

Identity threshold for annotating a sequence [default: 0]. When specified as a
fraction between 0 and 1 (included), it is first multiplied by 100 to be
interpreted in percentage.

=for Euclid: number.type: number
    number.default: 0

=item --max-hits [=] <number>

bin/annotate-ali.pl  view on Meta::CPAN

=item --fields [=] <str>...

List of whitespace-separated BLAST fields to be displayed in final report
[default: no].

Valid fields are: percent_identity, hsp_length, mismatches, gaps, query_from,
query_to, hit_from, hit_to, evalue, bit_score, query_start, query_end,
hit_start, hit_end.

=for Euclid: str.type: string, str eq "percent_identity" || str eq "hsp_length" || str eq "mismatches" || str eq "gaps" || str eq "query_from" || str eq "query_to" || str eq "hit_from" || str eq "hit_to" || str eq "evalue" || str eq "bit_score" || st...
    str.default: []

=item --out[-suffix] [=] <suffix>

Suffix to append to infile basenames for deriving outfile names [default:

 view all matches for this distribution


Bio-MUST-Tools-Mcl

 view release on metacpan or  search on metacpan

bin/tag-loc-ids.pl  view on Meta::CPAN


    HIT:
    # loop through first hits for each query
    while (my $hit = $report->next_query) {

        # consider only hits over percent_id threshold
        next HIT if $hit->percent_identity < $ARGV_percent_id;

        # strict check of length unless percent_id filter only
        unless ($ARGV_pid_only) {
            next HIT
                unless ( $hit->query_end - $hit->query_start )
                    == (   $hit->hit_end -   $hit->hit_start )
            ;

bin/tag-loc-ids.pl  view on Meta::CPAN

infile (e.g., IDM files) and outfile names [default: none].

=for Euclid: str.type: string
    repeatable

=item --percent-id=<n>

Min percentage identity to consider a hit.

=for Euclid: n.type: n
    n.default: 99

=item --fasta[-suffix]=<suffix>

 view all matches for this distribution


Bio-NEXUS

 view release on metacpan or  search on metacpan

README_admin  view on Meta::CPAN


2.  Once you are sure that the package works, change the master version number 
in lib/Bio/NEXUS.pm (grep on VERSION).  This will change the dist name when 
the package is built (but the cvs version has to be changed separately-- see #4). 

The initial version was based on the percent completion of NEXUS commands, 
starting with 0.66 on 8/22/06.  Subsequently we just incremented the minor number 
by 1 each time.  If you don't change this, you won't get a new version number to 
upload to CPAN. 

3.  Check everything into CVS so that you can tag the current versions.  If you 

 view all matches for this distribution


Bio-Phylo

 view release on metacpan or  search on metacpan

lib/Bio/Phylo/Matrices/MatrixRole.pm  view on Meta::CPAN

sub no_sequences {
    my $self = shift;
    return scalar @{ $self->get_entities };
}

sub percentage_identity { $logger->warn }

# from simplealign
sub average_percentage_identity{
   my ($self,@args) = @_;

   my @alphabet = ('A','B','C','D','E','F','G','H','I','J','K','L','M',
                   'N','O','P','Q','R','S','T','U','V','W','X','Y','Z');

lib/Bio/Phylo/Matrices/MatrixRole.pm  view on Meta::CPAN

   }
   return $divisor > 0 ? ($total / $divisor )*100.0 : 0;
}

# from simplealign
sub overall_percentage_identity{
   my ($self, $length_measure) = @_;

   my @alphabet = ('A','B','C','D','E','F','G','H','I','J','K','L','M',
                   'N','O','P','Q','R','S','T','U','V','W','X','Y','Z');

 view all matches for this distribution


Bio-Pipeline-Comparison

 view release on metacpan or  search on metacpan

lib/Bio/Pipeline/Comparison/Report/ParseVCFCompare.pm  view on Meta::CPAN

{
  my ($self,$filename) = @_;
  my $number_of_variants = 0;
  for my $row_results (@{$self->_raw_venn_diagram_results})
  {
    my $number_of_files_with_overlap = @{$row_results->{files_to_percentage}};
    
    if($number_of_files_with_overlap > 0)
    {
      for(my $i = 0; $i < $number_of_files_with_overlap; $i++ )
      {
        if(defined($row_results->{files_to_percentage}->[$1]->{file_name})
           && $row_results->{files_to_percentage}->[$1]->{file_name} eq $filename)
        {
          $number_of_variants +=$row_results->{number_of_sites};
          last;
        }
      }

lib/Bio/Pipeline/Comparison/Report/ParseVCFCompare.pm  view on Meta::CPAN

sub _number_of_uniques_for_filename
{
  my ($self, $filename) = @_;
  for my $row_results (@{$self->_raw_venn_diagram_results})
  {
    if(@{$row_results->{files_to_percentage}} == 1
      && defined($row_results->{files_to_percentage}->[0]->{file_name})
      && $row_results->{files_to_percentage}->[0]->{file_name} eq $filename)
    {
      return $row_results->{number_of_sites};
    }
  }
  return 0;

lib/Bio/Pipeline/Comparison/Report/ParseVCFCompare.pm  view on Meta::CPAN

    my $line = $_;
    if( $line =~ m/$vd_regex/)
    {
      my %vd_results;
      $vd_results{number_of_sites} = $1;
      $vd_results{files_to_percentage} = [ {file_name => $2, percentage => $3} ];
      if(defined($4) && defined($5) && defined($6))
      {
        push(@{$vd_results{files_to_percentage}}, {file_name => $5, percentage => $6} );
      }
      push(@vd_rows,\%vd_results);
    }
  }
  return \@vd_rows;

 view all matches for this distribution


Bio-Polloc

 view release on metacpan or  search on metacpan

lib/Bio/Polloc/GroupCriteria.pm  view on Meta::CPAN


Minimum score for either algorithms B<blast> and B<hmmer>. 20 by default.

=item -consensusperc I<float>

Minimum percentage a residue must appear in order to include it in the
consensus used as query.  60 by default.  Only if -algorithm blast.

=item -e I<float>

If C<-algorithm> B<blast>, maximum e-value.  0.1 by default.

 view all matches for this distribution


Bio-Prospect

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

exercising rights under, and complying with all of the terms of, this 
License.  For legal entities, "You" includes any entity that controls, is 
controlled by, or is under common control with you.  For purposes of this 
definition, "control" means (i) the power, direct or indirect, to cause the 
direction or management of such entity, whether by contract or otherwise, 
or (ii) ownership of fifty percent (50%) or more of the outstanding shares, 
or (iii) beneficial ownership of such entity.   

15) Right to Use. You may use the Original Work in all ways not otherwise 
restricted or conditioned by this License or by law, and Licensor promises 
not to interfere with or be responsible for such uses by You.    

 view all matches for this distribution


Bio-Roary

 view release on metacpan or  search on metacpan

lib/Bio/Roary/AccessoryBinaryFasta.pm  view on Meta::CPAN


has 'input_files'            => ( is => 'ro', isa => 'ArrayRef',                   required => 1 );
has 'annotate_groups_obj'    => ( is => 'ro', isa => 'Bio::Roary::AnnotateGroups', required => 1 );
has 'analyse_groups_obj'     => ( is => 'ro', isa => 'Bio::Roary::AnalyseGroups',  required => 1 );
has 'output_filename'        => ( is => 'ro', isa => 'Str',                        default  => 'accessory_binary_genes.fa' );
has 'lower_bound_percentage' => ( is => 'ro', isa => 'Int',                        default  => 5 );
has 'upper_bound_percentage' => ( is => 'ro', isa => 'Int',                        default  => 5 );
has 'max_accessory_to_include' => ( is => 'ro', isa => 'Int',                      default  => 4000 );
has 'groups_to_files'        => ( is => 'ro', isa => 'HashRef',                    lazy     => 1, builder => '_build__groups_to_files' );
has '_lower_bound_value'     => ( is => 'ro', isa => 'Int',                        lazy     => 1, builder => '_build__lower_bound_value' );
has '_upper_bound_value'     => ( is => 'ro', isa => 'Int',                        lazy     => 1, builder => '_build__upper_bound_value' );

lib/Bio/Roary/AccessoryBinaryFasta.pm  view on Meta::CPAN

}

sub _build__lower_bound_value {
    my ($self) = @_;
    my $num_files = @{ $self->input_files };
    return ceil( $num_files * ( $self->lower_bound_percentage / 100 ) );
}

sub _build__upper_bound_value {
    my ($self) = @_;
    my $num_files = @{ $self->input_files };
    return $num_files - ceil( $num_files * ( $self->upper_bound_percentage / 100 ) );
}

sub create_accessory_binary_fasta {
    my ($self) = @_;
    my $out_seq_io = Bio::SeqIO->new( -file => ">" . $self->output_filename, -format => 'Fasta' );

 view all matches for this distribution


Bio-SamTools

 view release on metacpan or  search on metacpan

LICENSE  view on Meta::CPAN

"Legal Entity" shall mean the union of the acting entity and all other
entities that control, are controlled by, or are under common control
with that entity. For the purposes of this definition, "control" means
(i) the power, direct or indirect, to cause the direction or
management of such entity, whether by contract or otherwise, or (ii)
ownership of fifty percent (50%) or more of the outstanding shares, or
(iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.

 view all matches for this distribution


Bio-SearchIO-blastxml

 view release on metacpan or  search on metacpan

t/SearchIO/blastxml.t  view on Meta::CPAN

    is($hsp->query->end,815);
    is($hsp->hit->start, 3);
    is($hsp->hit->end, 310);
    is($hsp->query->frame,0);
    is($hsp->hit->frame,0);
    is(sprintf("%.2f", $hsp->percent_identity), 37.73);
    is(sprintf("%.4f", $hsp->frac_identical('hit')), 0.3994);
    is(sprintf("%.4f", $hsp->frac_identical('query')), 0.3868);
    is(sprintf("%.4f",$hsp->query->frac_identical), 0.3868);

    is(sprintf("%.4f",$hsp->frac_conserved('total')),0.5245);

t/SearchIO/blastxml.t  view on Meta::CPAN

                        is($hsp->end('query'), $hsp->query->end);
                        is($hsp->strand('sbjct'), $hsp->subject->strand);# alias for hit
                        float_is($hsp->evalue, 0.000286309);
                        is($hsp->score, 86);
                        is($hsp->bits, 37.7354);
                        is(sprintf("%.1f",$hsp->percent_identity), 20.9);
                        is(sprintf("%.4f",$hsp->frac_identical('query')), 0.2105);
                        is(sprintf("%.3f",$hsp->frac_identical('hit')), 0.224);
                        is($hsp->gaps('total'), 11);
                        $hsps_left--;
                    }

t/SearchIO/blastxml.t  view on Meta::CPAN

                        is($hsp->end('query'), $hsp->query->end);
                        is($hsp->strand('sbjct'), $hsp->subject->strand);# alias for hit
                        float_is($hsp->evalue, 0.0242028);
                        is($hsp->score, 73);
                        is($hsp->bits, 32.7278);
                        is(sprintf("%.1f",$hsp->percent_identity), '24.0');
                        is(sprintf("%.4f",$hsp->frac_identical('query')), '0.2605');
                        is(sprintf("%.3f",$hsp->frac_identical('hit')), '0.240');
                        is($hsp->gaps, 10);
                        $hsps_left--;
                    }

 view all matches for this distribution


Bio-SearchIO-hmmer

 view release on metacpan or  search on metacpan

lib/Bio/Search/HSP/HMMERHSP.pm  view on Meta::CPAN

                   default = 'total'
            arg 2: [optional] integer length value to set for specific type

=cut

=head2 percent_identity

 Title   : percent_identity
 Usage   : my $percentid = $hsp->percent_identity()
 Function: Returns the calculated percent identity for an HSP
 Returns : floating point between 0 and 100
 Args    : none


=cut

 view all matches for this distribution


Bio-ToolBox

 view release on metacpan or  search on metacpan

lib/Bio/ToolBox/Data.pm  view on Meta::CPAN


		# add column
		my $i = $summed_data->add_column($data_name);
		$summed_data->metadata( $i, 'dataset', $datasets[$d] );

		# tag for remembering we're working with percentile bins
		my $do_percentile = 0;

		# remember the row
		my $row = 1;

		# Collect summarized data

lib/Bio/ToolBox/Data.pm  view on Meta::CPAN

			);

			# convert midpoint to fraction of 1000 for plotting if necessary
			if ( substr( $self->name($column), -1 ) eq '%' ) {
				$midpoint *= 10;    # midpoint * 0.01 * 1000 bp
				$do_percentile++;
			}
			if ( $do_percentile and substr( $self->name($column), -2 ) eq 'bp' ) {

				# working on the extension after the percentile bins
				$midpoint += 1000;
			}

			# collect the values in the column
			my @values;

lib/Bio/ToolBox/Data.pm  view on Meta::CPAN

header becomes a row identifier (i.e. the table is transposed). The 
best use of this is to summarize the mean profile of windowed data 
collected across a feature. See the L<Bio::ToolBox> scripts 
L<get_relative_data.pl> and L<get_binned_data.pl> as examples. 
For data from L<get_binned_data.pl> where the columns are expressed 
as percentile bins, the reported midpoint column is automatically 
converted based on a length of 1000 bp.

You may pass these options. They are optional.

=over 4

 view all matches for this distribution


Bio-Tools-CodonOptTable

 view release on metacpan or  search on metacpan

lib/Bio/Tools/CodonOptTable.pm  view on Meta::CPAN

      . "|%{color:red}G%|"
      . $monomers->{G} . "|\n"
      . "|%{color:red}C%|"
      . $monomers->{C} . "|\n";

    my $gc_percentage =
      ( ( $monomers->{G} + $monomers->{C} ) /
          ( $monomers->{A} + $monomers->{T} + $monomers->{G} + $monomers->{C} )
      ) * 100;
    $gc_percentage = sprintf( "%.2f", $gc_percentage );

    my $REPORT = <<EOT;
h1. Bio::Tools::CodonOptTable

%{color:green}Report for $sequence_id%

%{color:red}Codon Adaptation Index (CAI) for sequence% : $cai

%{color:red}GC percentage for sequence% : $gc_percentage%

%{color:red}GENETIC CODE USED% : $genetic_code "--more about genetic code--":http://www.ncbi.nlm.nih.gov/Taxonomy/Utils/wprintgc.cgi

%{background:#336699;color:white;padding:5px}++**CODON USAGE**++%

 view all matches for this distribution


Bio-Tools-Phylo-PAML

 view release on metacpan or  search on metacpan

lib/Bio/Tools/Phylo/PAML.pm  view on Meta::CPAN

         (\d+)\s+ # constant sites
         \(\s*([\d\.]+)\s*\%\s*\)/x
          )
        {
            $self->{'_summary'}->{'stats'}->{'constant_sites'}            = $1;
            $self->{'_summary'}->{'stats'}->{'constant_sites_percentage'} = $2;
        }
        elsif (/^ln\s+Lmax\s+\(unconstrained\)\s+\=\s+(\S+)/x) {
            $self->{'_summary'}->{'stats'}->{'loglikelihood'} = $1;
            $done = 1;    # done for sure
        }

lib/Bio/Tools/Phylo/PAML.pm  view on Meta::CPAN

         (\d+)\s+    # constant sites
         \(\s*([\d\.]+)\s*\%\s*\)/ox
          )
        {
            $self->{'_summary'}->{'stats'}->{'constant_sites'}            = $1;
            $self->{'_summary'}->{'stats'}->{'constant_sites_percentage'} = $2;
        }
        elsif (/^ln\s+Lmax\s+\(unconstrained\)\s+\=\s+(\S+)/ox) {
            $self->{'_summary'}->{'stats'}->{'loglikelihood'} = $1;
            $done = 1;    # done for sure
        }

 view all matches for this distribution


Bio-Tools-Primer3Redux

 view release on metacpan or  search on metacpan

lib/Bio/Tools/Primer3Redux/Primer.pm  view on Meta::CPAN



sub gc_content {
    my ($self, $gc) = @_;
    if (defined $gc) {
        $self->remove_tag('gc_percent') if $self->has_tag('gc_percent');
        $self->add_tag_value('gc_percent', $gc);
    }
    $self->has_tag('gc_percent') ? return ($self->get_tag_values('gc_percent'))[0] : return;
}


sub run_description {
    my ($self, $desc) = @_;

lib/Bio/Tools/Primer3Redux/Primer.pm  view on Meta::CPAN

=head2 gc_content

 Title    : gc
 Usage    : $obj->gc
 Function : returns the GC content calculated for the primer via Primer3
 Returns  : float (percent)
 Args     : optional GC content (possibly calculated via other means)

=head2 run_description

 Title    : run_description

 view all matches for this distribution


Bio-Tools-Run-Alignment-TCoffee

 view release on metacpan or  search on metacpan

t/TCoffee.t  view on Meta::CPAN


my $seq_array_ref = \@seq_array;

$aln = $factory->align($seq_array_ref);
is $aln->num_sequences, 7;
my $s1_perid = $aln->average_percentage_identity;

my $profile1 = test_input_file("cysprot1a.msf");
my $profile2 = test_input_file("cysprot1b.msf");

# convert any warnings about program to an actual exception

t/TCoffee.t  view on Meta::CPAN

$aln1 = $str1->next_aln();
$str2 = Bio::SeqIO->new(-file=> test_input_file("cysprot1b.fa"));
my $seq = $str2->next_seq();

is $aln1->num_sequences, 3;
is( int($aln1->average_percentage_identity), 39);
$aln = $factory->profile_align($aln1,$seq);
is( $aln->num_sequences, 4);
if( $version <= 1.22 ) {
    cmp_ok( $aln->overall_percentage_identity, '>', 18);
    is( int($aln->average_percentage_identity), 44);
} else {
    my $overall = int($aln->overall_percentage_identity);
    ok( $overall >=21 && $overall <= 23, 'expect 21 >= val >= 23');
    my $avg = int($aln->average_percentage_identity);
    ok( $avg == 47 || $avg ==48, 'expect 47 or 48');
}

# test new 'run' generic running of factory

$aln = $factory->run('-type' => 'align',
                     '-seq'  => test_input_file("cysprot.fa"));
is ($aln->num_sequences, 7, 'simple generic run');
is ($aln->percentage_identity,$s1_perid); #calculated before

lives_ok{ $aln = $factory->run('-type' => 'profile',
                               '-profile' => $aln1,
                               '-seq'  => test_input_file("cysprot1b.fa"))} ;

ok(! $@, "no T-COFFEE errors");

is( $aln->num_sequences, 7);
if( $version <= 1.22 ) {
    cmp_ok( $aln->overall_percentage_identity, '>', 18);
    is( int($aln->average_percentage_identity), 44);
} else {
    my $overall = int $aln->overall_percentage_identity;
    ok($overall == 14 || $overall == 13, 'expect 13 or 14');
    my $avg = int($aln->average_percentage_identity);
    ok($avg == 41 || $avg == 42, 'expect 41 or 42');
}

done_testing();

 view all matches for this distribution


( run in 1.493 second using v1.01-cache-2.11-cpan-39bf76dae61 )