Bio::A...bl2seq(3pm)

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

πŸ’– Bio::AlignIO::bl2seq πŸ’–

okay bestie, gather round, because this is the bl2seq sequence input/output stream page from the Bio::AlignIO family, and it's lowkey iconic. it lives in the User Contributed Perl Documentation, so you know it's giving community-coded excellence. ✨


🌸 NAME 🌸

Bio::AlignIO::bl2seq β€” the bl2seq sequence input/output stream, periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

bestie. listen. do NOT use this module directly. like, at all. you go through the Bio::AlignIO class instead, like this:

use Bio::AlignIO;

$in  = Bio::AlignIO->new(-file   => "inputfilename" ,
                         -format => "bl2seq",
                         -report_type => "blastn");
$aln = $in->next_aln();

that's the whole vibe. πŸ’…


✨ DESCRIPTION ✨

so what does this object even do? it creates Bio::SimpleAlign sequence alignment objects (of two sequences, just the two of them, a lil duo πŸ‘―) out of "bl2seq" BLAST reports. that's the whole job and it does it beautifully.

now here's the part that's genuinely highkey amazing: when you pair this module up with Bio::Tools::Run::StandAloneBlast.pm β€” or a remote BLAST, either one β€” you can use it to align two sequences and build a Bio::SimpleAlign object out of them. and then? then you can manipulate that object with literally any Bio::SimpleAlign method. it's giving main character energy. πŸ‘‘

like, for real for real:

  # Get two sequences
  $str = Bio::SeqIO->new(-file=>'t/amino.fa' , '-format' => 'Fasta', );
  my $seq3 = $str->next_seq();
  my $seq4 = $str->next_seq();

  # Run bl2seq on them
  $factory = Bio::Tools::StandAloneBlast->new('program' => 'blastp',
                                              'outfile' => 'bl2seq.out');
  my $bl2seq_report = $factory->bl2seq($seq3, $seq4);
  # Note that report is a Bio::SearchIO object

  # Use AlignIO.pm to create a SimpleAlign object from the bl2seq report
  $str = Bio::AlignIO->new(-file=> 'bl2seq.out','-format' => 'bl2seq');
  $aln = $str->next_aln();

see how smooth that is?? obsessed. 🫢


πŸ’Œ FEEDBACK πŸ’Œ

πŸŽ€ Mailing Lists πŸŽ€

user feedback is an integral part of the evolution of this and other Bioperl modules β€” no cap, it genuinely is. send your comments and suggestions preferably to one of the Bioperl mailing lists. 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 and support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. the reason is super valid: there are many experienced and reponsive experts hanging around who will be able look at the problem and quickly address it. (yes, "reponsive", that's how it's written here, we keep the lore intact πŸ’€). 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:

https://github.com/bioperl/bioperl-live/issues

🌈 AUTHOR - Peter Schattner 🌈

Email: schattner@alum.mit.edu


πŸ‘‘ APPENDIX πŸ‘‘

the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ β€” so if you see an underscore, that's the secret menu, iykyk. 🀫

⭐ new ⭐

  • Title : new
  • Usage :
my $alignio = Bio::SimpleAlign->new(-format => 'bl2seq',
                                    -file   => 'filename',
                                    -report_type => 'blastx');
  • Function : get a Bio::SimpleAlign
  • Returns : Bio::SimpleAlign object
  • Args : -report_type => report type (blastn,blastx,tblastx,tblastn,blastp)

⭐ next_aln ⭐

  • Title : next_aln
  • Usage : $aln = $stream->next_aln()
  • Function : returns the next alignment in the stream.
  • Returns : Bio::Align::AlignI object on success, undef on error or end of file
  • Args : none

⭐ write_aln (NOT IMPLEMENTED) ⭐

bestie, heads up: this one is NOT IMPLEMENTED. it's documented, but it's not actually a thing you can do. don't come for me, I'm just the messenger. πŸ’€
  • Title : write_aln
  • Usage : $stream->write_aln(@aln)
  • Function : writes the $aln object into the stream in bl2seq format
  • Returns : 1 for success and 0 for error
  • Args : Bio::Align::AlignI object

⭐ report_type ⭐

  • Title : report_type
  • Usage : $obj->report_type($newval)
  • Function : sets the report type (blastn, blastp...)
  • Returns : value of report_type (a scalar)
  • Args : on set, new value (a scalar or undef, optional)

πŸ’œ SEE ALSO πŸ’œ

okay so technically the SEE ALSO section isn't a separate heading here, but the references are absolutely scattered all over this page and they deserve their own lil shrine: Bio::AlignIO, Bio::SimpleAlign, Bio::Tools::Run::StandAloneBlast.pm, Bio::Tools::StandAloneBlast, Bio::SeqIO, Bio::SearchIO, Bio::Align::AlignI, and AlignIO.pm itself. go read them, they're all iconic in their own right. πŸ“šβœ¨


that's the whole page, bestie! πŸŽ€ this was perl v5.32.1, dated 2021-08-15 β€” a lil vintage moment, but the vibes are eternal. now go build an alignment and slay. πŸ’…πŸŒΈπŸ¦‹

πŸ“¦ where this page comes from