Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c0b2316b5320756fc35b43f35335d7ce > files > 153

perl-AcePerl-1.920.0-1mdv2010.0.i586.rpm

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Ace::Sequence::FeatureList - Lightweight Access to Features</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>

<body style="background-color: white">


<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<!--

<ul>

	<li><a href="#name">NAME</a></li>
	<li><a href="#synopsis">SYNOPSIS</a></li>
	<li><a href="#description">DESCRIPTION</a></li>
	<li><a href="#object_creation">OBJECT CREATION</a></li>
	<li><a href="#object_methods">OBJECT METHODS</a></li>
	<li><a href="#see_also">SEE ALSO</a></li>
	<li><a href="#author">AUTHOR</a></li>
</ul>

-->


</div>
<!-- INDEX END -->

<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>Ace::Sequence::FeatureList - Lightweight Access to Features</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
    # get a megabase from the middle of chromosome I
    $seq = Ace::Sequence-&gt;new(-name   =&gt; 'CHROMOSOME_I,
                              -db     =&gt; $db,
                              -offset =&gt; 3_000_000,
                              -length =&gt; 1_000_000);</pre>
<pre>
    # find out what's there
    $list = $seq-&gt;feature_list;</pre>
<pre>
    # Scalar context: count all the features
    $feature_count = $list-&gt;types;</pre>
<pre>
    # Array context: list all the feature types
    @feature_types = $list-&gt;types;</pre>
<pre>
    # Scalar context, 1 argument.  Count this type
    $gene_cnt = $list-&gt;types('Predicted_gene');
    print &quot;There are $gene_cnt genes here.\n&quot;;</pre>
<pre>
    # Array context, 1 argument.  Get list of subtypes
    @subtypes = $list-&gt;types('Predicted_gene');</pre>
<pre>
    # Two arguments. Count type &amp; subtype
    $genefinder_cnt = $list-&gt;types('Predicted_gene','genefinder');</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p><em>Ace::Sequence::FeatureList</em> is a small class that provides
statistical information about sequence features.  From it you can
obtain summary counts of the features and their types within a
selected region.</p>
<p>
</p>
<hr />
<h1><a name="object_creation">OBJECT CREATION</a></h1>
<p>You will not ordinarily create an <em>Ace::Sequence::FeatureList</em> object
directly.  Instead, objects will be created by calling a
<em>Ace::Sequence</em> object's <code>feature_list()</code> method.  If you wish to
create an <em>Ace::Sequence::FeatureList</em> object directly, please consult
the source code for the <em>new()</em> method.</p>
<p>
</p>
<hr />
<h1><a name="object_methods">OBJECT METHODS</a></h1>
<p>There are only two methods in <em>Ace::Sequence::FeatureList</em>.</p>
<dl>
<dt><strong><a name="type" class="item"><code>type()</code></a></strong>

<dd>
<p>This method has five distinct behaviors, depending on its context and
the number of parameters.  Usage should be intuitive</p>
</dd>
<dd>
<pre>
 Context       Arguments       Behavior
 -------       ---------       --------</pre>
</dd>
<dd>
<pre>
 scalar         -none-         total count of features in list
 array          -none-         list feature types (e.g. &quot;exon&quot;)
 scalar          type          count features of this type
 array           type          list subtypes of this type
 -any-       type,subtype      count features of this type &amp; subtype</pre>
</dd>
<dd>
<p>For example, this code fragment will count the number of exons present
on the list:</p>
</dd>
<dd>
<pre>
  $exon_count = $list-&gt;type('exon');</pre>
</dd>
<dd>
<p>This code fragment will count the number of exons found by &quot;genefinder&quot;:</p>
</dd>
<dd>
<pre>
  $predicted_exon_count = $list-&gt;type('exon','genefinder');</pre>
</dd>
<dd>
<p>This code fragment will print out all subtypes of &quot;exon&quot; and their
counts:</p>
</dd>
<dd>
<pre>
  for my $subtype ($list-&gt;type('exon')) {
      print $subtype,&quot;\t&quot;,$list-&gt;type('exon',$subtype),&quot;\n&quot;;
  }</pre>
</dd>
</li>
<dt><strong><a name="asstring" class="item"><code>asString()</code></a></strong>

<dd>
<pre>
  print $list-&gt;asString;</pre>
</dd>
<dd>
<p>This dumps the list out in tab-delimited format.  The order of columns
is type, subtype, count.</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="/AcePerl/docs/./Ace.html">the Ace manpage</a>, <a href="/AcePerl/docs/./Ace/Object.html">the Ace::Object manpage</a>, <a href="/AcePerl/docs/./Ace/Sequence.html">the Ace::Sequence manpage</a>,
<a href="/AcePerl/docs/./Ace/Sequence/Feature.html">the Ace::Sequence::Feature manpage</a>, <em>GFF</em></p>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Lincoln Stein &lt;<a href="mailto:lstein@w3.org">lstein@w3.org</a>&gt; with extensive help from Jean
Thierry-Mieg &lt;<a href="mailto:mieg@kaa.crbm.cnrs-mop.fr">mieg@kaa.crbm.cnrs-mop.fr</a>&gt;</p>
<p>Copyright (c) 1999, Lincoln D. Stein</p>
<p>This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.  See DISCLAIMER.txt for
disclaimers of warranty.</p>

</body>

</html>