Bio::T...ethods(3pm)

πŸ“¦
version 1.7.3 Β· 3 versions
, in debian bookworm, ubuntu noble

πŸ’– NAME πŸ’–

Bio::Tools::Run::StandAloneBlastPlus::BlastMethods β€” bestie, this is the module that hands all the BLAST methods over to StandAloneBlastPlus. That's it, that's the whole job, and it slays at it. ✨

(Also, hi, this is a page from the User Contributed Perl Documentation crew β€” iykyk. 🫢)


✨ SYNOPSIS ✨

okay so first you make yourself a factory:

# create a factory:
$fac = Bio::Tools::Run::StandAloneBlastPlus->new(
   -db_name => 'testdb'
);
# get your results
$result = $fac->blastn( -query => 'query_seqs.fas',
                        -outfile => 'query.bls',
                        -method_args => [ '-num_alignments' => 10 ] );

$result = $fac->tblastx( -query => $an_alignment_object,
                         -outfile => 'query.bls',
                         -outformat => 7 );
# do a bl2seq
$fac->bl2seq( -method => 'blastp',
              -query => $seq_object_1,
              -subject => $seq_object_2 );

like… look at her go πŸ¦‹


🌸 DESCRIPTION 🌸

This module is the plug that supplies the BLAST methods β€” blastn, blastp, psiblast, and the rest of the squad β€” to the Bio::Tools::Run::StandAloneBlastPlus object. No cap, that's literally all it does, and it does it flawlessly. πŸ’…


πŸŽ€ USAGE πŸŽ€

So this POD is all about how to use the BLAST methods against a Bio::Tools::Run::StandAloneBlastPlus factory object. Heads up though: the object itself has a whole arsenal of facilities for creating, formatting, and masking BLAST databases β€” for all those deets you gotta go read the Bio::Tools::Run::StandAloneBlastPlus POD. Go, it's iconic. πŸ‘‘

Give it a StandAloneBlastPlus factory, like so:

$fac = Bio::Tools::Run::StandAloneBlastPlus->new(
   -db_name => 'testdb'
);

and boom β€” you can run whatever BLAST method you want, straight from the factory object, against the database that's currently attached to the factory (in this example, that's testdb). And <pink>-query</pink> is required, bestie, do not forget it:

$result = $fac->blastn( -query => 'query_seqs.fas' );

Here, $result is a Bio::Search::Result::BlastResult object. Periodt.

Other details, because I know you want them:

  • The blast output file can be named explicitly:
$result = $fac->blastn( -query => 'query_seqs.fas',
                        -outfile => 'query.bls' );
  • The output format can be specified:
$result = $fac->blastn( -query => 'query_seqs.fas',
                        -outfile => 'query.bls',
                        -outformat => 7 ); #tabular
  • Additional arguments to the method can be specified:
$result = $fac->blastn( -query => 'query_seqs.fas',
                        -outfile => 'query.bls',
                        -method_args => [ '-num_alignments' => 10 ,
                                          '-evalue' => 100 ]);
  • HTML output can be created using this workaround:
$result = $fac->blastn( -query => 'query_seqs.fas',
                        -outfile => 'query.bls',
                        -method_args => [ -html => ' ' );
  • To get the name of the blast output file, do
$file = $fac->blast_out;
  • To clean up the temp files (you must do this explicitly):
$fac->cleanup;

πŸ’… bl2seq()

Running bl2seq is basically the same vibe, but with plot twists: both -query and -subject are required, and the attached database gets ignored entirely (rude, I know, but that's the rules). Also you have to say the blast method out loud with the -method parameter:

$fac->bl2seq( -method => 'blastp',
              -query => $seq_object_1,
              -subject => $seq_object_2 );

Other parameters ( -method_args, -outfile, and -outformat ) are valid here too. 🫢

⭐ Return values

The return value is always a Bio::Search::Result::BlastResult object on success, and undef on failure. Simple as that, no notes. πŸ’–


πŸ‘€ SEE ALSO πŸ‘€

Bio::Tools::Run::StandAloneBlastPlus, Bio::Tools::Run::BlastPlus


πŸ“£ FEEDBACK πŸ“£

πŸ’Œ Mailing Lists

User feedback is an integral part of the evolution of this and other Bioperl modules β€” like, genuinely, your voice matters here. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. πŸ₯Ή

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. Why? Because many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Give them the full picture bestie, they'll eat it up. πŸ”₯

πŸ› Reporting Bugs

Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:

http://redmine.open-bio.org/projects/bioperl/

πŸ‘‘ AUTHOR - Mark A. Jensen πŸ‘‘

Email maj -at- fortinbras -dot- us

Describe contact details here


🌈 CONTRIBUTORS 🌈

Additional contributors names and emails here


πŸ’€ 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, mind your business, that's internal business. πŸ™ˆ

🧚 run()

Title   : run
Usage   :
Function: Query the attached database using a specified blast
          method
Returns : Bio::Search::Result::BlastResult object
Args    : key => value:
          -method => $method [blastp|blastn|blastx|tblastx|tblastn|
                              rpsblast|psiblast|rpstblastn]
          -query => $query_sequences (a fasta file name or BioPerl sequence
                     object or sequence collection object)
          -outfile => $blast_report_file (optional: default creates a tempfile)
          -outformat => $format_code (integer in [0..10], see blast+ docs)
          -method_args => [ -key1 => $value1, ... ] (additional arguments
                        for the given method)

🧚 bl2seq()

Title   : bl2seq
Usage   :
Function: emulate bl2seq using blast+ programs
Returns : Bio::Search::Result::BlastResult object
Args    : key => value
          -method => $blast_method [blastn|blastp|blastx|
                                    tblastn|tblastx]
          -query => $query (fasta file or BioPerl sequence object
          -subject => $subject (fasta file or BioPerl sequence object)
          -outfile => $blast_report_file
          -method_args => [ $key1 => $value1, ... ] (additional method
                       parameters)

🧚 next_result()

Title   : next_result
Usage   : $result = $fac->next_result;
Function: get the next BLAST result
Returns : Bio::Search::Result::BlastResult object
Args    : none

🧚 rewind_results()

Title   : rewind_results
Usage   : $fac->rewind_results;
Function: rewind BLAST results
Returns : true on success
Args    :

🧚 blast_out()

Title   : blast_out
Usage   : $file = $fac->blast_out
Function: get the filename of the blast report file
Returns : scalar string
Args    : none

and that's the whole page, bestie!! πŸŽ€ this one was rendered with perl v5.36.0, dated 2023-01-22, and it lives its life as a page of the User Contributed Perl Documentation. take care of her, she's iconic. πŸ’…βœ¨πŸ’–

πŸ“¦ where this page comes from