Question: design PCR primers with primer3 on command line
0
gravatar for marongiu.luigi
14 months ago by
Germany, Mannheim, UMM
marongiu.luigi420 wrote:

Dear all,

I am trying to use PRIMER3 to design primers on the Linux command line. Following the manual, I prepared a file called PRIME with the Boulder-IO syntax:

SEQUENCE_ID=e6 
SEQUENCE_TEMPLATE=ATGTTTCAGGACCCACAGGAGCGACCCATAAAGTTACCAGATTTATGCACAGAGCTGCAAACAACTATACATGATATAATATTAGAATGTGTGTACTGCAAGCAACAGTTACTGCGACGTGAGGTATATGACTTTGCTTT
TCGGGATTTATGCATAGTATATAGAGATGGGAATCCATATGCAGTGTGTGATAAATGTTTAAAGTTTTATTCTAAAATTAGTGAGTATAGATATTATTGTTATAGTTTGTATGGAACAACATTAGAACAGCAATACAACA
AACCGTTGTGTGATTTGTTGATTAGGTGTATTAACTGTCAAAAGCCACTGTGTCCTGAAGAAAAGCAAAGACATCTGGACAAAAAGCAAAGATTCCATAATATAAGGGGTCGGTGGACCGGTCGATGTATGTCTTGTTGC
AGATCATCAAGAACACGTAGAGAAACCCAGCTGTAA
PRIMER_TASK=generic 
PRIMER_PICK_LEFT_PRIMER=1 
PRIMER_PICK_INTERNAL_OLIGO=1 
PRIMER_PICK_RIGHT_PRIMER=1 
PRIMER_OPT_SIZE=18 
PRIMER_MIN_SIZE=15 
PRIMER_MAX_SIZE=21 
PRIMER_MAX_NS_ACCEPTED=0     
PRIMER_PRODUCT_SIZE_RANGE=75-100 
PRIMER_EXPLAIN_FLAG=1     
=

Launching primer3 with the suggested syntax of primer3_core < file I get:

$ primer3_core < PRIME
SEQUENCE_ID=e6 
SEQUENCE_TEMPLATE=ATGTTTCAGGACCCACAGGAGCGACCCATAAAGTTACCAGATTTATGCACAGAGCTGCAAACAACTATACATGATATAATATTAGAATGTGTGTACTGCAAGCAACAGTTACTGCGACGTGAGGTATATGACTTTGCTTTTCGGGATTTATGCATAGTATATAGAGATGGGAATCCATATGCAGTGTGTGATAAATGTTTAAAGTTTTATTCTAAAATTAGTGAGTATAGATATTATTGTTATAGTTTGTATGGAACAACATTAGAACAGCAATACAACAAACCGTTGTGTGATTTGTTGATTAGGTGTATTAACTGTCAAAAGCCACTGTGTCCTGAAGAAAAGCAAAGACATCTGGACAAAAAGCAAAGATTCCATAATATAAGGGGTCGGTGGACCGGTCGATGTATGTCTTGTTGCAGATCATCAAGAACACGTAGAGAAACCCAGCTGTAA
PRIMER_TASK=generic 
PRIMER_PICK_LEFT_PRIMER=1 
PRIMER_PICK_INTERNAL_OLIGO=1 
PRIMER_PICK_RIGHT_PRIMER=1 
PRIMER_OPT_SIZE=18 
PRIMER_MIN_SIZE=15 
PRIMER_MAX_SIZE=21 
PRIMER_MAX_NS_ACCEPTED=0     
PRIMER_PRODUCT_SIZE_RANGE=75-100 
PRIMER_EXPLAIN_FLAG=1     
PRIMER_ERROR=Unrecognized PRIMER_TASK
=
primer3_core: Unrecognized PRIMER_TASK

I tried to remove the file by sending the variables as argument by enclosing the data in " but I got:

$ primer3_core "SEQUENCE_ID=e6 
> SEQUENCE_TEMPLATE=ATGTTTCAGGACCCACAGGAGCGACCCATAAAGTTACCAGATTTATGCACAGAGCTGCAAACAACTATACATGATATAATATTAGAATGTGTGTACTGCAAGCAACAGTTACTGCGACGTGAGGTATATGACTTTGCTTTTCGGGATTTATGCATAGTATATAGAGATGGGAATCCATATGCAGTGTGTGATAAATGTTTAAAGTTTTATTCTAAAATTAGTGAGTATAGATATTATTGTTATAGTTTGTATGGAACAACATTAGAACAGCAATACAACAAACCGTTGTGTGATTTGTTGATTAGGTGTATTAACTGTCAAAAGCCACTGTGTCCTGAAGAAAAGCAAAGACATCTGGACAAAAAGCAAAGATTCCATAATATAAGGGGTCGGTGGACCGGTCGATGTATGTCTTGTTGCAGATCATCAAGAACACGTAGAGAAACCCAGCTGTAA
> PRIMER_TASK=generic 
> PRIMER_PICK_LEFT_PRIMER=1 
> PRIMER_PICK_INTERNAL_OLIGO=1 
> PRIMER_PICK_RIGHT_PRIMER=1 
> PRIMER_OPT_SIZE=18 
> PRIMER_MIN_SIZE=15 
> PRIMER_MAX_SIZE=21 
> PRIMER_MAX_NS_ACCEPTED=0     
> PRIMER_PRODUCT_SIZE_RANGE=75-100 
> PRIMER_EXPLAIN_FLAG=1     
> =
> "
Error opening file SEQUENCE_ID=e6 
SEQUENCE_TEMPLATE=ATGTTTCAGGACCCACAGGAGCGACCCATAAAGTTACCAGATTTATGCACAGAGCTGCAAACAACTATACATGATATAATATTAGAATGTGTGTACTGCAAGCAACAGTTACTGCGACGTGAGGTATATGACTTTGCTTTTCGGGATTTATGCATAGTATATAGAGATGGGAATCCATATGCAGTGTGTGATAAATGTTTAAAGTTTTATTCTAAAATTAGTGAGTATAGATATTATTGTTATAGTTTGTATGGAACAACATTAGAACAGCAATACAACAAACCGTTGTGTGATTTGTTGATTAGGTGTATTAACTGTCAAAAGCCACTGTGTCCTGAAGAAAAGCAAAGACATCTGGACAAAAAGCAAAGATTCCATAATATAAGGGGTCGGTGGACCGGTCGATGTATGTCTTGTTGCAGATCATCAAGAACACGTAGAGAAACCCAGCTGTAA
PRIMER_TASK=generic 
PRIMER_PICK_LEFT_PRIMER=1 
PRIMER_PICK_INTERNAL_OLIGO=1 
PRIMER_PICK_RIGHT_PRIMER=1 
PRIMER_OPT_SIZE=18 
PRIMER_MIN_SIZE=15 
PRIMER_MAX_SIZE=21 
PRIMER_MAX_NS_ACCEPTED=0     
PRIMER_PRODUCT_SIZE_RANGE=75-100 
PRIMER_EXPLAIN_FLAG=1     
=

The same is true if I add a \n at the end of each line.

My questions are:

  1. how shall I write the file to feed primer3_core?

  2. Is there a way to avoid the file and give the data as arguments to primer3_core?

Thnak you

pcr primer3 command line • 995 views
ADD COMMENTlink written 14 months ago by marongiu.luigi420
1
gravatar for finswimmer
14 months ago by
finswimmer13k
Germany
finswimmer13k wrote:

Hello marongiu.luigi ,

check each line of your PRIME file that there are no whitespaces at the end.

primer3 tells you what its problem is:

PRIMER_ERROR=Unrecognized PRIMER_TASK

I could reproduce thhis with the file content you've posted above. It turned out that you have whitespace at the end of the line PRIMER_TASK=generic. After removing those the next error arises due to the same problem,

fin swimmer

ADD COMMENTlink written 14 months ago by finswimmer13k

Thank you, now it works for me as well. It was a very tricky bit. It there a way to pass the parameters directly without need of a file?

ADD REPLYlink written 14 months ago by marongiu.luigi420

By the way, I still getting an error at the end of the computation:

PRIMER_ERROR=Input line with no '=': ; Input line with no '=': ; Input line with no '=': ; Final record not terminated by '='
=
primer3_core: Input line with no '=': ; Input line with no '=': ; Input line with no '=': ; Final record not terminated by '='

The = I placed at the end doesn't have spaces and it is followed by a newline.

ADD REPLYlink written 14 months ago by marongiu.luigi420
1

and it is followed by a newline.

Remove this new line.

ADD REPLYlink written 14 months ago by finswimmer13k

Perfect, thank you. Now it went smoothly.

ADD REPLYlink written 14 months ago by marongiu.luigi420
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1355 users visited in the last hour