primer3-org / primer3

Primer3 is a command line tool to select primers for polymerase chain reaction (PCR).
GNU General Public License v2.0
218 stars 62 forks source link

Final record not terminated by '=' #62

Closed Miduoduoduoduomi closed 2 years ago

Miduoduoduoduomi commented 2 years ago

Hello, I'm trying to design primers for 48 sequences which are about 4000-6000bp long, I generated my input file by a shell loop scripts and this is what my file looks like using the 'cat -A':

SEQUENCE_ID=chr10_inv7$ SEQUENCE_TEMPLATE=CCTCCAAAGGTTCTAAGCCTGTGAAATAAACGAAGTCTG...CTTCCCCTATGT$ SEQUENCE_TARGET=2000,608$ P3_FILE_TAG=1$ PRIMER_EXPLAIN_FLAG=1$ PRIMER_TASK=generic$ PRIMER_PICK_LEFT_PRIMER=1$ PRIMER_PICK_INTERNAL_OLIGO=0$ PRIMER_PICK_RIGHT_PRIMER=1$ PRIMER_OPT_SIZE=20$ PRIMER_MIN_SIZE=18$ PRIMER_MAX_SIZE=22$ PRIMER_PRODUCT_SIZE_RANGE=608-1608$ SEQUENCE_TARGET=2000-2608$ SEQUENCE_FORCE_LEFT_START=1000$ SEQUENCE_FORCE_LEFT_END=2000$ SEQUENCE_FORCE_RIGHT_START=2608$ SEQUENCE_FORCE_RIGHT_END=3608$ =$ SEQUENCE_ID=chr11_inv61$ SEQUENCE_TEMPLATE=TCTGACTGTTCCTCATAACAAGGACA...TGCTTGGTAGGTTACTAGGTCCCTTCATACCCATGTAAGGAGTGGTT$ SEQUENCE_TARGET=2000,754$ P3_FILE_TAG=1$ PRIMER_EXPLAIN_FLAG=1$ PRIMER_TASK=generic$ PRIMER_PICK_LEFT_PRIMER=1$ PRIMER_PICK_INTERNAL_OLIGO=0$ PRIMER_PICK_RIGHT_PRIMER=1$ PRIMER_OPT_SIZE=20$ PRIMER_MIN_SIZE=18$ PRIMER_MAX_SIZE=22$ PRIMER_PRODUCT_SIZE_RANGE=754-1754$ SEQUENCE_TARGET=2000-2754$ SEQUENCE_FORCE_LEFT_START=1000$ SEQUENCE_FORCE_LEFT_END=2000$ SEQUENCE_FORCE_RIGHT_START=2754$ SEQUENCE_FORCE_RIGHT_END=3754$ =$

While when I try to run primer3, I get the error "Final record not terminated by '='" , I wonder what's wrong with my input file, I'm using primer3-2.4.0 on my macOS. Looking forward to your reply, thx!!

untergasser commented 2 years ago

Hi,

are you sure the last = is followed by a newline? I assume $ means newline above.

SEQUENCE_FORCE_LEFT_START=1000$ SEQUENCE_FORCE_LEFT_END=2000$ defines a primer from position 1000 to 2000, far to big for Primer3. I assume all SEQUENCE_FORCE tags should go out.

Best,

Andreas

Miduoduoduoduomi commented 2 years ago

@untergasser Thank u for ur reply and precious advice. I've checked my test file, newline was truly missing for the last row, I fixed this problem, but I still get the same error command. Here is my text file, may u please check it for me? Thx a lot! test_0304.txt

Best,

Jiaxin

untergasser commented 2 years ago

Hi,

SEQUENCE_TARGET=2000,608 was given twice, the top one is correct: pos,len

You had two newlines in the end, there can be only one.

This works: test_0304.txt

Best,

Andreas

Miduoduoduoduomi commented 2 years ago

Hello, @untergasser

I'm pleasant to accept ur advice on 'SEQUENCE_TARGET'!

And I'm finally awful to find that my mistake occurs in the setting file instead of the input file, thus my little suggestion is that maybe we can tell the user which file goes wrong when giving this error.

Thx again for ur kind and detailed help, hope u happy everyday ;)

Best,

Jiaxin