~ubuntu-branches/ubuntu/saucy/bioperl/saucy-proposed

« back to all changes in this revision

Viewing changes to Bio/Seq/PrimedSeq.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: PrimedSeq.pm,v 1.23.4.1 2006/10/02 23:10:27 sendu Exp $
 
1
# $Id: PrimedSeq.pm 15052 2008-12-01 08:47:39Z heikki $
2
2
#
3
3
# This is the original copyright statement. I have relied on Chad's module
4
4
# extensively for this module.
31
31
 
32
32
=head1 SYNOPSIS
33
33
 
34
 
The easiest way to use this is probably either, (i), get the output 
35
 
from Bio::Tools::Run::Primer3, Bio::Tools::Primer3, or 
36
 
Bio::Tools::PCRSimulation:
 
34
  # The easiest way to use this is probably either, (i), get the
 
35
  # output from Bio::Tools::Run::Primer3, Bio::Tools::Primer3, or 
 
36
  # Bio::Tools::PCRSimulation:
37
37
 
38
38
      # For example, start with a fasta file
39
39
      use Bio::SeqIO;
56
56
         $seqout->write_seq($results->annotated_seq);
57
57
      }
58
58
 
59
 
Or, (ii), to create a genbank file for a sequence and its cognate primers:
 
59
  # Or, (ii), to create a genbank file for a sequence and its cognate
 
60
  # primers:
60
61
 
61
62
     use Bio::SeqIO;
62
63
     use Bio::Seq::PrimedSeq;
65
66
     # that match it, in fasta format
66
67
 
67
68
     my $file = shift || die "$0 <file>";
68
 
     my $seqin = new Bio::SeqIO(-file => $file);
 
69
     my $seqin = Bio::SeqIO->new(-file => $file);
69
70
 
70
71
     # read three sequences
71
72
     my ($template, $leftprimer, $rightprimer) =
80
81
     # print the sequence out
81
82
     $seqout->write_seq($primedseq->annotated_sequence);
82
83
 
83
 
This should output a genbank file with the two primers labeled.
 
84
  # This should output a genbank file with the two primers labeled.
84
85
 
85
86
=head1 DESCRIPTION
86
87
 
169
170
=head2 new
170
171
 
171
172
 Title   : new()
172
 
 Usage   : $primed_sequence = new Bio::SeqFeature::Primer( 
 
173
 Usage   : $primed_sequence = Bio::SeqFeature::Primer->new( 
173
174
                                     -seq => $sequence,
174
175
                                     -left_primer => $left_primer,
175
176
                                     -right_primer => $right_primer);
442
443
        my ($start, $length) = split /,/, $self->{'left_primer'}->{'PRIMER_LEFT'};
443
444
        my $tm=$self->{'left_primer'}->{'PRIMER_LEFT_TM'} || $self->{'left_primer'}->Tm || 0;
444
445
 
445
 
        my $seqfeatureL=new Bio::SeqFeature::Generic(
 
446
        my $seqfeatureL=Bio::SeqFeature::Generic->new(
446
447
                                                  -start => $start+1, -end => $start+$length, -strand => 1,
447
448
                    -primary_tag => 'left_primer', -source => 'primer3',
448
449
                    -tag    => {new => 1, author => 'Bio::Seq::PrimedSeq', Tm => $tm}
451
452
        ($start, $length) = split /,/, $self->{'right_primer'}->{'PRIMER_RIGHT'};
452
453
        $tm=$self->{'right_primer'}->{'PRIMER_RIGHT_TM'} || $self->{'right_primer'}->Tm || 0;
453
454
 
454
 
        my $seqfeatureR=new Bio::SeqFeature::Generic(
 
455
        my $seqfeatureR=Bio::SeqFeature::Generic->new(
455
456
   -start => $start-$length+2, -end => $start+1, -strand => -1,
456
457
   -primary_tag => 'right_primer', -source => 'primer3',
457
458
   -tag    => {new => 1, author => 'Bio::Seq::PrimedSeq', Tm => $tm}