Bio::T...Primer3(3pm)
π 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:
- To parse the output from
Bio::Tools::Run::Primer3. You will most likely just usenext_primerto get the results fromBio::Tools::Run::Primer3. - 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 outputReturnsβ Does not return anything. If called with a filename will allow you to retrieve the resultsArgsβ-file(optional) file of primer3 results to parse-verbose(optional) set verbose outputNotesβ
π¦ 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 scalarArgsβ NoneNotesβ 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 byprimer_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 hashArgsβ Optional array of specific results to retrieve
π primer_results
Titleβ primer_results()Usageβmy $results = $primer3->primer_results(2); # results for third primerFunctionβ Retrieve the results returned from Primer3 for specific primer pairs.Returnsβ A reference to a hashArgsβ 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 resultsReturnsβ Nothing.Argsβ NoneNotesβ
β¨ 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 timeReturnsβ Returns aBio::Seq::PrimedSeqobject, one at a timeArgsβ NoneNotesβ Use$primed_seq->annotated_seqto 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 timeReturnsβ Returns aBio::Seq::PrimedSeqobject, one at a timeArgsβ NoneNotesβ Deprecated, just a link tonext_primer
π¨ bestie heads up: this one is deprecated. it still works, but it's literally just pointing atnext_primer. usenext_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β NoneNotesβ
πΈ _set_variable
Titleβ _set_variable()Usageβ$self->_set_variable('variable name', 'value');Functionβ An internal function that sets a variableReturnsβ Nothing.Argsβ NoneNotesβ 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
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms