[Bioperl-l] use primer3 to design primers with multiple sequences
chen li
chen_li3 at yahoo.com
Tue May 9 17:32:32 UTC 2006
Thanks Paul it REALLY works.
I have other questions:
1) When I run the script I use this line on the
command prompt
perl primer.pl >test
When I check the default output file(temp.out) used by
the script I only see the information about the last
sequence which is different from what is in the test
file. In test file I can get all the information for
all the sequences.
2)Is it possible directly to use Bio::Tools:: Primer3
to print out selective information such as the primer
sequence and the size of PCR product? Or do I have
parse the file by myself?
After I get all these information I would like to post
the script for bacth-designing PCR primers.
Thanks,
Li
--- "Wiersma, Paul" <WiersmaP at agr.gc.ca> wrote:
> Hi Li,
>
> The line "my $result = $primer3->run" is already in
> the code you submitted. In the Bio::Tools::Primer3
> module the author uses "$p3" for the object. If you
> change your line to "my $p3 = $primer3->run" you
> should be able to run the examples below. Process
> the results for each sequence and output the results
> before looping to the next sequence.
>
> >From Bio::Tools::Primer3.pm:
>
> # 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"}
>
> Paul
>
> Paul A. Wiersma
> Agriculture and Agri-Food Canada/Agriculture et
> Agroalimentaire Canada
> Summerland, BC
> wiersmap at agr.gc.ca
>
>
>
>
>
> -----Original Message-----
> From: chen li [mailto:chen_li3 at yahoo.com]
> Sent: Monday, May 08, 2006 8:32 PM
> To: Wiersma, Paul
> Subject: Re: [Bioperl-l] use primer3 to design
> primers with multiple sequences
>
> Hi Paul,
>
> I read both documents. What I understand is that
> Bio:Tools::Run:Primer3 is for designing primers and
> Bio:Tools::Primer3 is for parsing the results. When
> I
> read the documents I do not see this line
> $result = $primer3->run in Bio:Tools::Primer3. I
> wonder how you get this infomration.
>
> Thanks,
>
> Li
>
> --- "Wiersma, Paul" <WiersmaP at agr.gc.ca> wrote:
>
> > Hi Li,
> >
> >
> >
> > When you execute $primer3->run with a
> > Bio::Tools::Run::Primer3 object it
> > opens -outfile=>"filename" for writing and then
> > closes. That's why
> > putting it in a loop will overwrite your output
> file
> > each time so you
> > only see the last one. I suppose you could read
> in
> > each output file
> > before looping to the next seq and append it to
> > another file.
> >
> >
> >
> > If you're doing a fair bit of work with this
> module
> > it would be worth
> > looking at the Bio::Tools::Primer3 module. The
> > statement $result =
> > $primer3->run produces a Bio::Tools::Primer3
> object
> > which has all the
> > methods you need for customizing your output.
> >
> >
> >
> > Paul
> >
> >
> >
> > Paul A. Wiersma
> > Agriculture and Agri-Food Canada/Agriculture et
> > Agroalimentaire Canada
> > Summerland, BC
> >
> > wiersmap at agr.gc.ca
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Bioperl-l mailing list
> > Bioperl-l at lists.open-bio.org
> >
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the Bioperl-l
mailing list