.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Bio::Seq::PrimedSeq 3pm" .TH Bio::Seq::PrimedSeq 3pm "2012-03-02" "perl v5.14.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::Seq::PrimedSeq \- A representation of a sequence and two primers flanking a target region .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 3 \& # The easiest way to use this is probably either, (i), get the \& # output from Bio::Tools::Run::Primer3, Bio::Tools::Primer3, or \& # Bio::Tools::PCRSimulation: \& \& # For example, start with a fasta file \& use Bio::SeqIO; \& use Bio::Tools::Run::Primer3; \& \& my $file = shift || die "need a file to read"; \& my $seqin = Bio::SeqIO\->new(\-file => $file); \& my $seq = $seqin\->next_seq; \& \& # use primer3 to design some primers \& my $primer3run = Bio::Tools::Run::Primer3\->new(\-seq => $seq); \& $primer3run \-> run; # run it with the default parameters \& \& # create a file to write the results to \& my $seqout = Bio::SeqIO\->new(\-file => ">primed_sequence.gbk", \& \-format => \*(Aqgenbank\*(Aq); \& \& # now just get all the results and write them out. \& while (my $results = $primer3run\->next_primer) { \& $seqout\->write_seq($results\->annotated_seq); \& } \& \& # Or, (ii), to create a genbank file for a sequence and its cognate \& # primers: \& \& use Bio::SeqIO; \& use Bio::Seq::PrimedSeq; \& \& # have a sequence file ($file) with the template, and two primers \& # that match it, in fasta format \& \& my $file = shift || die "$0 "; \& my $seqin = Bio::SeqIO\->new(\-file => $file); \& \& # read three sequences \& my ($template, $leftprimer, $rightprimer) = \& ($seqin\->next_seq, $seqin\->next_seq, $seqin\->next_seq); \& # set up the primed sequence object \& my $primedseq = Bio::Seq::PrimedSeq\->new(\-seq => $template, \& \-left_primer => $leftprimer, \& \-right_primer => $rightprimer); \& # open a file for output \& my $seqout = Bio::SeqIO\->new(\-file => ">primed_sequence.gbk", \& \-format => \*(Aqgenbank\*(Aq); \& # print the sequence out \& $seqout\->write_seq($primedseq\->annotated_sequence); \& \& # This should output a genbank file with the two primers labeled. .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is a slightly glorified capsule containing a primed sequence. It was created to address the fact that a primer is more than a seqfeature and there need to be ways to represent the primer-sequence complex and the behaviors and attributes that are associated with the complex. .PP The primers are represented as Bio::SeqFeature::Primer objects, and should be instantiated first. .PP A simple way to create a PrimedSeq object is as follows: .PP .Vb 5 \& my $primedseq = Bio::Seq::PrimedSeq\->new( \& \-seq => $seq, # Bio::Seq object, \& \-left_primer => $left, # Bio::SeqFeature::Primer object, \& \-right_primer => $right # Bio::SeqFeature::Primer object, \& ); .Ve .PP From the PrimedSeq object you should be able to retrieve information about melting temperatures and what not on each of the primers and the amplicon. .PP This is based on the PrimedSeq.pm module started by Chad Matsalla, with additions/improvements by Rob Edwards. .SH "FEEDBACK" .IX Header "FEEDBACK" 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. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP 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. .SS "Reporting Bugs" .IX Subsection "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: .PP .Vb 1 \& https://redmine.open\-bio.org/projects/bioperl/ .Ve .SH "AUTHOR" .IX Header "AUTHOR" Rob Edwards, redwards@utmem.edu .PP Based on a module written by Chad Matsalla, bioinformatics1@dieselwurks.com .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "new" .IX Subsection "new" .Vb 10 \& Title : new() \& Usage : $primed_sequence = Bio::SeqFeature::Primer\->new( \& \-seq => $sequence, \& \-left_primer => $left_primer, \& \-right_primer => $right_primer); \& Function: A constructor for an object representing a primed sequence \& Returns : A Bio::Seq::PrimedSeq object \& Args : \-seq => a Bio::Seq object (required) \& \-left_primer => a Bio::SeqFeature::Primer object (required) \& \-right_primer => a Bio::SeqFeature::Primer object (required) \& \& Many other parameters can be included including all of the output \& parameters from the primer3 program. At the moment most of these \& parameters will not do anything. .Ve .SS "get_primer" .IX Subsection "get_primer" .Vb 10 \& Title : get_primer(); \& Usage : $primer = $primedseq\->get_primer(l, left, left_primer, \& \-left_primer) to return the left primer or \& $primer = $primedseq\->get_primer(r, right, right_primer, \& \-right_primer) to return the right primer or \& $primer = $primedseq\->get_primer(b, both, both_primers, \& \-both_primers) \& to return the left primer, right primer array \& Function: A getter for the left primer in thie PrimedSeq object. \& Returns : A Bio::SeqFeature::Primer object \& Args : Either of (l, left, left_primer, \-left_primer) to get left \& primer. \& Either of (r, right, right_primer, \-right_primer) to get \& right primer \& Either of (b, both, both_primers, \-both_primers) to get \& both primers. \& Note that this is plural. [default] .Ve .SS "annotated_sequence" .IX Subsection "annotated_sequence" .Vb 8 \& Title : annotated_sequence \& Usage : $annotated_sequence_object = $primedseq\->annotated_sequence() \& Function: Get an annotated sequence object containg the left and right \& primers \& Returns : An annotated sequence object or 0 if not defined. \& Args : \& Note : Use this method to return a sequence object that you can write \& out (e.g. in GenBank format). See the example above. .Ve .SS "amplicon" .IX Subsection "amplicon" .Vb 6 \& Title : amplicon \& Usage : my $amplicon = $primedseq\->amplicon() \& Function: Retrieve the amplicon as a sequence object \& Returns : A seq object. To get the sequence use $amplicon\->seq \& Args : None \& Note : .Ve .SS "seq" .IX Subsection "seq" .Vb 6 \& Title : seq \& Usage : my $seqobj = $primedseq\->seq() \& Function: Retrieve the target sequence as a sequence object \& Returns : A seq object. To get the sequence use $seqobj\->seq \& Args : None \& Note : .Ve .SS "_place_seqs" .IX Subsection "_place_seqs" .Vb 7 \& Title : _place_seqs \& Usage : $self\->_place_seqs() \& Function: An internal method to place the primers on the sequence and \& set up the ranges of the sequences \& Returns : Nothing \& Args : None \& Note : Internal use only .Ve .SS "_set_seqfeature" .IX Subsection "_set_seqfeature" .Vb 10 \& Title : _set_seqfeature \& Usage : $self\->_set_seqfeature() \& Function: An internal method to create Bio::SeqFeature::Generic objects \& for the primed seq \& Returns : Nothing \& Args : None \& Note : Internal use only. Should only call this once left and right \& primers have been placed on the sequence. This will then set \& them as sequence features so hopefully we can get a nice output \& with write_seq. .Ve