<?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->new(-name => 'CHROMOSOME_I, -db => $db, -offset => 3_000_000, -length => 1_000_000);</pre> <pre> # find out what's there $list = $seq->feature_list;</pre> <pre> # Scalar context: count all the features $feature_count = $list->types;</pre> <pre> # Array context: list all the feature types @feature_types = $list->types;</pre> <pre> # Scalar context, 1 argument. Count this type $gene_cnt = $list->types('Predicted_gene'); print "There are $gene_cnt genes here.\n";</pre> <pre> # Array context, 1 argument. Get list of subtypes @subtypes = $list->types('Predicted_gene');</pre> <pre> # Two arguments. Count type & subtype $genefinder_cnt = $list->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. "exon") scalar type count features of this type array type list subtypes of this type -any- type,subtype count features of this type & 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->type('exon');</pre> </dd> <dd> <p>This code fragment will count the number of exons found by "genefinder":</p> </dd> <dd> <pre> $predicted_exon_count = $list->type('exon','genefinder');</pre> </dd> <dd> <p>This code fragment will print out all subtypes of "exon" and their counts:</p> </dd> <dd> <pre> for my $subtype ($list->type('exon')) { print $subtype,"\t",$list->type('exon',$subtype),"\n"; }</pre> </dd> </li> <dt><strong><a name="asstring" class="item"><code>asString()</code></a></strong> <dd> <pre> print $list->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 <<a href="mailto:lstein@w3.org">lstein@w3.org</a>> with extensive help from Jean Thierry-Mieg <<a href="mailto:mieg@kaa.crbm.cnrs-mop.fr">mieg@kaa.crbm.cnrs-mop.fr</a>></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>