[Bioperl-l] Run::Primer3 and no primer return

Scott Markel smarkel at accelrys.com
Wed Oct 22 11:57:37 EDT 2008


Paola,

In addition to the excellent points raised by Roy, I would suggest
running the same command line outside of BioPerl.  In addition to
permissions issues, you'll also be able to track down problems with
input files, file locations (missing leading slash), etc.

Scott

Roy Chaudhuri wrote:
> Hi Paola,
> 
> I tried your code using a sequence I had lying around, and it seemed to
> work fine, designing 5 primers. I then tried it with a sequence
> consisting of just As, so no primers were designed. However the temp.out
> file was not empty, it still contained lines with the input data
> (PRIMER_SEQUENCE_ID and SEQUENCE), so this suggests that Primer3 is not
> running correctly for you. Perhaps there is a file permissions issue? Is
> primer3_core executable?
> 
> I notice that you haven't declared $results using "my". If you're not
> doing so already, include "use warnings; use strict;" at the top of your
> program, that might give you some more useful information on why things
> are going wrong.
> 
> Roy.
> -- 
> Dr. Roy Chaudhuri
> Department of Veterinary Medicine
> University of Cambridge, U.K.
> 
> Paola Bignone wrote:
>> Dear all,
>>
>> I trying to use Primer3 through Bioperl.
>> I copied the basic script from the Run::Primer3 documentation module, and
>> although it is reading the sequence from the file, no primer is designed.
>> If I use that sequence in the web-base interface of Primer3, several 
>> primers
>> were obtained; so there is no problem with the sequence.
>>
>> It is a very basic problem, but I cannot get this to work.
>> I will appreciate any help as I'm stuck even before I started to 
>> change the
>> code to suit my needs.
>> TIA,
>> Paola
>>
>> ----
>> use Bio::Tools::Run::Primer3;
>> use Bio::SeqIO;
>>
>>    my $seqio=Bio::SeqIO->new(-file=>'data/test.fasta');
>>    my $seq=$seqio->next_seq;
>>
>>    my $primer3 = Bio::Tools::Run::Primer3 -> new(
>>    -seq => $seq,
>>    -outfile => 'data/temp.out',
>>    -path => '/usr/local/pkgbin/primer3_core',
>>    );
>>
>>     unless ($primer3->executable) {
>>     print STDERR "primer3 can not be found. Is it installed?\n";
>>     exit(-1)
>>    }
>>
>> $results=$primer3->run();
>> print "There were ", $results->number_of_results, " primers\n";
>>
>> ----
>> the data/temp.out file is created but it is empty.
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at lists.open-bio.org
>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

-- 
Scott Markel, Ph.D.
Principal Bioinformatics Architect  email:  smarkel at accelrys.com
Accelrys (SciTegic R&D)             mobile: +1 858 205 3653
10188 Telesis Court, Suite 100      voice:  +1 858 799 5603
San Diego, CA 92121                 fax:    +1 858 799 5222
USA                                 web:    http://www.accelrys.com

http://www.linkedin.com/in/smarkel
Board of Directors: International Society for Computational Biology
Co-chair: ISCB Publications Committee
Associate Editor: PLoS Computational Biology
Editorial Board: Briefings in Bioinformatics


More information about the Bioperl-l mailing list