.\" -*- mode: troff; coding: utf-8 -*- .\" Automatically generated by Pod::Man 5.01 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. .ie n \{\ . ds C` "" . ds C' "" 'br\} .el\{\ . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Ace::Sequence::FeatureList 3pm" .TH Ace::Sequence::FeatureList 3pm 2024-03-07 "perl v5.38.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH NAME Ace::Sequence::FeatureList \- Lightweight Access to Features .SH SYNOPSIS .IX Header "SYNOPSIS" .Vb 5 \& # get a megabase from the middle of chromosome I \& $seq = Ace::Sequence\->new(\-name => \*(AqCHROMOSOME_I, \& \-db => $db, \& \-offset => 3_000_000, \& \-length => 1_000_000); \& \& # find out what\*(Aqs there \& $list = $seq\->feature_list; \& \& # Scalar context: count all the features \& $feature_count = $list\->types; \& \& # Array context: list all the feature types \& @feature_types = $list\->types; \& \& # Scalar context, 1 argument. Count this type \& $gene_cnt = $list\->types(\*(AqPredicted_gene\*(Aq); \& print "There are $gene_cnt genes here.\en"; \& \& # Array context, 1 argument. Get list of subtypes \& @subtypes = $list\->types(\*(AqPredicted_gene\*(Aq); \& \& # Two arguments. Count type & subtype \& $genefinder_cnt = $list\->types(\*(AqPredicted_gene\*(Aq,\*(Aqgenefinder\*(Aq); .Ve .SH DESCRIPTION .IX Header "DESCRIPTION" \&\fIAce::Sequence::FeatureList\fR 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. .SH "OBJECT CREATION" .IX Header "OBJECT CREATION" You will not ordinarily create an \fIAce::Sequence::FeatureList\fR object directly. Instead, objects will be created by calling a \&\fIAce::Sequence\fR object's \fBfeature_list()\fR method. If you wish to create an \fIAce::Sequence::FeatureList\fR object directly, please consult the source code for the \fR\f(BInew()\fR\fI\fR method. .SH "OBJECT METHODS" .IX Header "OBJECT METHODS" There are only two methods in \fIAce::Sequence::FeatureList\fR. .IP \fBtype()\fR 4 .IX Item "type()" This method has five distinct behaviors, depending on its context and the number of parameters. Usage should be intuitive .Sp .Vb 2 \& Context Arguments Behavior \& \-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\- \& \& 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 .Ve .Sp For example, this code fragment will count the number of exons present on the list: .Sp .Vb 1 \& $exon_count = $list\->type(\*(Aqexon\*(Aq); .Ve .Sp This code fragment will count the number of exons found by "genefinder": .Sp .Vb 1 \& $predicted_exon_count = $list\->type(\*(Aqexon\*(Aq,\*(Aqgenefinder\*(Aq); .Ve .Sp This code fragment will print out all subtypes of "exon" and their counts: .Sp .Vb 3 \& for my $subtype ($list\->type(\*(Aqexon\*(Aq)) { \& print $subtype,"\et",$list\->type(\*(Aqexon\*(Aq,$subtype),"\en"; \& } .Ve .IP \fBasString()\fR 4 .IX Item "asString()" .Vb 1 \& print $list\->asString; .Ve .Sp This dumps the list out in tab-delimited format. The order of columns is type, subtype, count. .SH "SEE ALSO" .IX Header "SEE ALSO" Ace, Ace::Object, Ace::Sequence, Ace::Sequence::Feature, GFF .SH AUTHOR .IX Header "AUTHOR" Lincoln Stein with extensive help from Jean Thierry-Mieg .PP Copyright (c) 1999, Lincoln D. Stein .PP 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.