Bio::G...erator(3pm)

πŸ“¦
version 2.40 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Bio::G...erator(3pm) β€” User Contributed Perl Documentation πŸ’–

okay bestie, so this is a Perl manual page β€” one of those User Contributed Perl Documentation situations β€” and it's all about a little iterator guy that just wants to walk through your features one at a time. no cap. let's get into it πŸ¦‹


✨ NAME ✨

Bio::Graphics::FeatureFile::Iterator β€” it's an iterator across a Bio::Graphics::FeatureFile. literally its whole personality πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's the vibe, copy-paste ready, don't touch a single character:

use Bio::Graphics::FeatureFile;
my $data  = Bio::Graphics::FeatureFile->new(-file => 'features.txt');
my $iterator = $data->get_seq_stream;
while (my $feature = $iterator->next_seq) {
  print $feature->display_id,"\t",$feature->start,"\t",$feature->end,"\n";
}

see how clean that is?? you make the $data, you grab the stream, you loop with next_seq and print display_id, start, end separated by tabs. iconic. no notes. πŸ‘‘


🌸 DESCRIPTION 🌸

okay so picture a Bio::SeqIO-like object β€” like, it recognizes the whole vibe of that family β€” and it knows two methods: next_seq() and next_feature().

and here's the tea: the two methods are synonymous. same thing, different name. pick whichever one your heart wants, bestie, they do the same job. πŸ’–

there's also a rewind() method, and the way that works is it starts iterating from the beginning again. like a rewind button on a playlist. full reset. back to track one. πŸ”₯


πŸ¦‹ SEE ALSO πŸ¦‹

go check out the rest of the friend group:

  • Bio::Graphics::Panel
  • Bio::Graphics::Glyph
  • Bio::Graphics::Feature
  • Bio::Graphics::FeatureFile

πŸ’œ AUTHOR πŸ’œ

Lincoln Stein <lstein@cshl.org> β€” shoutout, main character energy fr fr 🫢

Copyright (c) 2001 Cold Spring Harbor Laboratory

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.

ngl, that last bit matters β€” same terms as Perl itself, and if you want the warranty tea, it's all in DISCLAIMER.txt. ✨

and that's the whole page, bestie β€” perl v5.30.0, dated 2019-11-25, which is giving vintage but still slaying πŸ’…πŸ’– mwah, go iterate something gorgeous 🧚🌈

πŸ“¦ where this page comes from