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

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

πŸ’– Bio::T...Primer3 πŸ’–

okay bestie, welcome to the Bio::Tools::Primer3 era β€” this is a User Contributed Perl Documentation page and it is so much. Basically: it makes input for the primer3 program, and it reads what primer3 gives back. no cap. 🧬✨


✨ NAME ✨

Bio::Tools::Primer3 β€” bestie, it creates input for, and works with the output from, the program primer3. that's the whole job description. πŸ’…


🌸 SYNOPSIS 🌸

okay so here's the vibe, copy this energy:

# parse primer3 output to get some data
# this is also called from Bio::Tools::Run::Primer3
use Bio::Tools::Primer3;

# read a primer3 output file
my $p3 = Bio::Tools::Primer3->new(-file=>"data/primer3_output.txt");

# how many results were there?
my $num = $p3->number_of_results;
print "There were $num results\n";

# get all the results
my $all_results = $p3->all_results;
print "ALL the results\n";
foreach my $key (keys %{$all_results}) {
   print "$key\t${$all_results}{$key}\n";
}

# get specific results
my $result1 = $p3->primer_results(1);
print "The first primer is\n";
foreach my $key (keys %{$result1}) {
   print "$key\t${$result1}{$key}\n";
}

# get the results as a Bio::Seq::PrimedSeq stream
my $primer = $p3->next_primer;
print "The left primer in the stream is ",
  $primer->get_primer('-left_primer')->seq->seq, "\n";

like, look at that. it's giving glow up. πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

Bio::Tools::Primer3 creates the input files you need to design primers using primer3, and it also gives you the mechanisms to get at the data sitting inside the primer3 output files. two jobs, both slaying. πŸ‘‘

This module is a bioperl interface to the program primer3. Go look at http://www-genome.wi.mit.edu/genome_software/other/primer3.html for the details, and to download the software. iykyk. πŸ”—

This module is based on one written by Chad Matsalla (bioinformatics1@dieselwurks.com). 🫢

ngl, the author says: "I have ripped some of his code, and added a lot of my own. I hope he is not mad at me!" β€” and honestly? iconic. not me being emotional about legacy code. 😭

This is probably best run in one of the two following ways:

  1. To parse the output from Bio::Tools::Run::Primer3. You will most likely just use next_primer to get the results from Bio::Tools::Run::Primer3.
  2. To parse the output of primer3 handed to it as a file name.

🫢 FEEDBACK 🫢

πŸ’Œ Mailing Lists πŸ’Œ

User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated. fr fr, they want to hear from you. πŸ’–

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. 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. ✨ (yes, that's the original spelling of "reponsive" β€” we keep the facts exactly as they are, bestie, always.)

πŸ› Reporting Bugs πŸ›

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

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

go off, report those bugs, they want the receipts. πŸ’€


πŸ‘‘ AUTHOR - πŸ‘‘

Rob Edwards

redwards@utmem.edu

Based heavily on work of

Chad Matsalla

bioinformatics1@dieselwurks.com


⭐ CONTRIBUTORS ⭐

Brian Osborne bosborne at 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 a _, mind your business, that's internal. πŸ™ˆ)

🌸 new

  • Title β€” new()
  • Usage β€” my $primer3 = Bio::Tools::Primer3->new(-file=>$file);
  • Function β€” Parse primer3 output
  • Returns β€” Does not return anything. If called with a filename will allow you to retrieve the results
  • Args β€” -file (optional) file of primer3 results to parse -verbose (optional) set verbose output
  • Notes β€”

πŸ¦‹ number_of_results

  • Title β€” number_of_results()
  • Usage β€” my $count = $primer3->number_of_results();
  • Function β€” Retrieve the number of primers returned from Primer3.
  • Returns β€” A scalar
  • Args β€” None
  • Notes β€” This returns the count of the primers returned by Primer3 (aka how many of them there are). This is one more than the maximum offset into the zero based list of primers that is accessed by primer_results().
lowkey important: that "one more than the maximum offset" thing is a real technical caveat, don't sleep on it. zero-based lists are like that. πŸ’…

πŸ’œ all_results

  • Title β€” all_results()
  • Usage β€”
my $results = $primer3->all_results();
   or
my $results = $primer3->all_results('primer3 result name', 'other results');
  • Function β€” Retrieve the results returned from Primer3.
  • Returns β€” A reference to a hash
  • Args β€” Optional array of specific results to retrieve

πŸŽ€ primer_results

  • Title β€” primer_results()
  • Usage β€” my $results = $primer3->primer_results(2); # results for third primer
  • Function β€” Retrieve the results returned from Primer3 for specific primer pairs.
  • Returns β€” A reference to a hash
  • Args β€” A number between 0 and the maximum number of primers to retrieve

πŸ“ _readfile

  • Title β€” _readfile()
  • Usage β€” $self->_readfile();
  • Function β€” An internal function that reads a file and sets up the results
  • Returns β€” Nothing.
  • Args β€” None
  • Notes β€”

✨ next_primer

  • Title β€” next_primer()
  • Usage β€” while (my $primed_seq = $primer3->next_primer()) {
  • Function β€” Retrieve the primed sequence and a primer pair, one at a time
  • Returns β€” Returns a Bio::Seq::PrimedSeq object, one at a time
  • Args β€” None
  • Notes β€” Use $primed_seq->annotated_seq to get an annotated sequence object you can write out.

🌈 primer_stream

  • Title β€” primer_stream()
  • Usage β€” while (my $primed_seq = $primer3->primer_stream()) {
  • Function β€” Retrieve the primer/sequences one at a time
  • Returns β€” Returns a Bio::Seq::PrimedSeq object, one at a time
  • Args β€” None
  • Notes β€” Deprecated, just a link to next_primer
🚨 bestie heads up: this one is deprecated. it still works, but it's literally just pointing at next_primer. use next_primer. periodt.

πŸ’« _separate

  • Title β€” _separate()
  • Usage β€” $self->_separate();
  • Function β€” An internal function that groups the results by number (e.g. primer pair 1, etc)
  • Returns β€” Nothing.
  • Args β€” None
  • Notes β€”

🌸 _set_variable

  • Title β€” _set_variable()
  • Usage β€” $self->_set_variable('variable name', 'value');
  • Function β€” An internal function that sets a variable
  • Returns β€” Nothing.
  • Args β€” None
  • Notes β€” Used to set $self->{results} and $self->seqobject

and that's the whole page, bestie! πŸŽ‰ this doc came to you courtesy of perl v5.32.1, dated 2021-08-15, and it's the Bio::T...Primer3(3pm) page. go write some primers, you absolute main character. πŸ’…πŸ§¬πŸ’–

πŸ“¦ where this page comes from