.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" 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 .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . 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 "2021-02-20" "perl v5.32.1" "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 \fI\f(BInew()\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 \*(L"genefinder\*(R": .Sp .Vb 1 \& $predicted_exon_count = $list\->type(\*(Aqexon\*(Aq,\*(Aqgenefinder\*(Aq); .Ve .Sp This code fragment will print out all subtypes of \*(L"exon\*(R" 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, \s-1GFF\s0 .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 \s-1DISCLAIMER\s0.txt for disclaimers of warranty.