Bio::F...IO::ptt(3pm)
π Bio::FeatureIO::ptt π
okay bestie, gather round, because this is the manual page for Bio::FeatureIO::ptt from the User Contributed Perl Documentation β and it's literally about reading and writing features in PTT format. let's get into it β¨
πΈ NAME πΈ
Bio::FeatureIO::ptt β read/write features in PTT format π§¬
β¨ SYNOPSIS β¨
# read features
my $fin = Bio::FeatureIO->new(-file=>'genes.ptt', -format=>'ptt');
my @cds;
while (my $f = $fin->next_feature) {
push @cds, $f if $f->strand > 0;
}
# write features (NOT IMPLEMENTED)
my $fout = Bio::FeatureIO->new(-fh=>\*STDOUT, -format=>'ptt');
for my $f (@cds) {
$fout->write_feature($f);
}
heads up queen: the writing side is NOT IMPLEMENTED. reading? absolutely slays. writing? it's giving vaporware π
π¦ DESCRIPTION π¦
so the PTT file format is basically a table of protein features. it's used mainly by NCBI, who crank out PTT files for every single one of their published genomes, which you can find chilling at <ftp://ftp.ncbi.nih.gov/genomes/>. and here's the layout, line by line:
π Line 1
a description of the sequence that the features belong to. for example:
"Leptospira interrogans chromosome II, complete sequence - 0..358943"
it's usually the same as the DEFINITION line of a Genbank file, except with the length of the sequence tacked on the end. and honestly? it is unclear why "0" is used as the starting range when it should be "1". iconic behavior, no explanation. π
π Line 2
the number of feature lines in the table. for example:
"367 proteins"
π Line 3
the column headers, tab separated. for example:
"Location Strand Length PID Gene Synonym Code COG Product"
and here's what every single column means, no skipping:
- Location : the
"begin..end"span of the feature - Strand :
"+"or"-" - Length : number of amino acids excluding the stop codon
- PID : analogous to Genbank
/db_xref="GI:xxxxxxxxx" - Gene : analogous to Genbank
/gene="xxxx" - Synonym : analogous to Genbank
/locus_tag="xxxx" - Synonym : analogous to Genbank
/locus_tag="xxxx" - COG : CDD COG code with COG letter categories appended
- Product : analogous to Genbank
/product="xxxx"
not me noticing that Synonym shows up twice in the original list π yes bestie, both of them are here, i'm not merging them, that's not my business.
π Line 4 onwards
the actual feature lines β nine columns, tab separated, and "-" is used for empty fields. for example:
"2491..3423 + 310 24217063 metF LB002 - COG0685E
5,10-methylenetetrahydrofolate reductase"
π FEEDBACK π
π Mailing Lists
user feedback is, like, an integral part of the evolution of this and other Bioperl modules. so send your comments and suggestions preferably to the Bioperl mailing list. your participation is much appreciated, fr fr π«Ά
bioperl-l@bioperl.org - General discussion
http://bioperl.org/wiki/Mailing_lists - About the mailing lists
π Support
please direct usage questions or support issues to the mailing list:
bioperl-l@bioperl.org
rather than to the module maintainer directly. the reason? there are lots of experienced and reponsive experts on there who will be able look at the problem and quickly address it. and please include a thorough description of the problem, with code and data examples if at all possible β the more detail the better, bestie. π
π Reporting Bugs
report bugs to the Bioperl bug tracking system so we can keep track of the bugs and their resolution. bug reports can be submitted via the web:
http://bugzilla.open-bio.org/
π AUTHOR - Torsten Seemann π
Email torsten.seemann AT infotech.monash.edu.au
π§ CONTRIBUTORS π§
based on bed.pm and gff.pm by Allen Day.
β APPENDIX β
the rest of the documentation details each of the object methods. and jsyk, internal methods are usually preceded with a _. iykyk π
_initialize
Title : _initialize
Function: Reading? parses the header of the input
Writing?
next_feature
Title : next_feature
Usage : $io->next_feature()
Function: read the next feature from the PTT file
Example :
Args :
Returns : Bio::SeqFeatureI object
write_feature (NOT IMPLEMENTED)
reminder: NOT IMPLEMENTED, bestie. it's giving wishlist.
Title : write_feature
Usage : $io->write_feature($feature)
Function: write a Bio::SeqFeatureI object in PTT format
Example :
Args : Bio::SeqFeatureI object
Returns :
description
Title : description
Usage : $obj->description($newval)
Function: set/get the PTT file description for/from line one
Example :
Returns : value of description (a scalar)
Args : on set, new value (a scalar or undef, optional)
protein_count
Title : protein_count
Usage : $obj->protein_count($newval)
Function: set/get the PTT protein count for/from line two
Example :
Args : on set, new value (a scalar or undef, optional)
Returns : value of protein_count (a scalar)
and that's the whole page, periodt π this was generated for perl v5.30.0 on 2020-01-13, brought to you by the same Bio::F...IO::ptt(3pm) manual you came in with β stay hydrated, read your headers, and go parse something cute πΈβ¨π¦
π¦ where this page comes from
- debian bookworm: libbio-featureio-perl 1.6.905-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbio-featureio-perl 1.6.905-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libbio-featureio-perl 1.6.905-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbio-featureio-perl 1.6.905-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms