1
$\begingroup$

I'm using Primer-Blast to compare a PCR template against a custom database of reference sequences, using Primer-Blast's Custom database functionality.

However whenever I try to upload a FASTA file as the custom database and then run Primer-Blast, I get the following error:

Exception error: Fasta Reader: sequence id ends with 80 valid nucleotide characters. Was the sequence accidentally placed in the definition line?

No matter how I try to format my FASTA file, I get this error.

Does anyone know how to properly format a FASTA file to have it accepted as a custom database of reference sequences to compare against the PCR template? Or is this a bug in the software?

Here's an example FASTA file, to upload both for the template and the custom database.

>test1
ATTAAAGGTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAA
AATCTGTGTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGG
ACACGAGTAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTT
CGTCCGGGTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGC
$\endgroup$
5
  • $\begingroup$ Could you provide a sample of your FASTA file, pls? $\endgroup$
    – mrhd
    Apr 25 '20 at 16:56
  • $\begingroup$ @mrhd just added $\endgroup$
    – Thoth
    Apr 25 '20 at 17:01
  • 1
    $\begingroup$ @mrhd It's almost like it's not recognizing the newline escape character at the end of the sequence ID. $\endgroup$
    – Thoth
    Apr 25 '20 at 17:05
  • $\begingroup$ That might actually be the cause of the error. Did you create the FASTA on Windows or Linux/Mac? $\endgroup$
    – mrhd
    Apr 25 '20 at 17:07
  • $\begingroup$ @mrhd The actual FASTAs I want to use were downloaded from GISAID. However I am on a Mac. $\endgroup$
    – Thoth
    Apr 25 '20 at 17:10
1
$\begingroup$

I just copied your FASTA sequence into a file (on Mac OS) and uploaded it to Primer BLAST, the search did not give an error.

If the error is caused by the line endings, maybe you can fix your downloaded files with a tool like dos2unix.

Update:

On a whim, I tried adding a description to the FASTA header:

>test1 description
ATTAAAGGTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAA
AATCTGTGTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGG
ACACGAGTAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTT
CGTCCGGGTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTG

This time, there was no error.

Does that work for you as well?

$\endgroup$
5
  • $\begingroup$ You uploaded it both as the PCR template and as the custom database? Because it works fine when you just upload it as the template, and then set the database to something like Refseq representative genomes. It's only when you set the database to custom that it errors out. $\endgroup$
    – Thoth
    Apr 25 '20 at 17:29
  • $\begingroup$ Sorry, you're right. When uploading the sequence as database, I get the same error. -.- $\endgroup$
    – mrhd
    Apr 25 '20 at 17:50
  • 1
    $\begingroup$ The error does not appear when pasting the sequence into the text box under "Custom", though. Strange... $\endgroup$
    – mrhd
    Apr 25 '20 at 17:53
  • 1
    $\begingroup$ Ok, for some crazy reason, I'm able to get it to work when I copy-paste the template but upload the custom database. But it doesn't work when you upload both the template and the custom database, even though it does work if you upload the template but don't use the custom database option. $\endgroup$
    – Thoth
    Apr 25 '20 at 17:56
  • $\begingroup$ Very odd indeed.. $\endgroup$
    – mrhd
    Apr 25 '20 at 17:58
0
$\begingroup$

Ok so it looks like the workaround for this is to copy-paste the template into the text box, and then upload your custom database.

If you upload both the template and the custom database, you will get the error.

$\endgroup$
0
0
$\begingroup$

I did it by copy and paste. Here's the top line of the output:

    Primer pair 1
Sequence (5'->3')   Template strand Length  Start   Stop    Tm  GC% Self complementarity    Self 3' complementarity
Forward primer  TGTCGTTGACAGGACACGAG    Plus    20  148 167 59.97   55.00   5.00    2.00
Reverse primer  TTACCTTTCGGTCACACCCG    Minus   20  264 245 59.97   55.00   3.00    2.00
Product length  117
Primer pair 2
Sequence (5'->3')   Template strand Length  Start   Stop    Tm  GC% Self complementarity    Self 3' complementarity
Forward primer  ATCTGTGTGGCTGTCACTCG    Plus    20  82  101 60.04   55.00   5.00    3.00
Reverse primer  ACTCGTGTCCTGTCAACGAC    Minus   20  168 149 59.97   55.00   4.00    3.00
Product length  87
Primer pair 3
Sequence (5'->3')   Template strand Length  Start   Stop    Tm  GC% Self complementarity    Self 3' complementarity
Forward primer  TACTGTCGTTGACAGGACACG   Plus    21  145 165 60.00   52.38   7.00    3.00
Reverse primer  ACACCCGGACGAAACCTAGA    Minus   20  251 232 60.54   55.00   4.00    2.00
Product length  107
Primer pair 4
Sequence (5'->3')   Template strand Length  Start   Stop    Tm  GC% Self complementarity    Self 3' complementarity
Forward primer  GCTTACGGTTTCGTCCGTGT    Plus    20  192 211 60.94   55.00   4.00    0.00
Reverse primer  GTTGAAACCAGGGACAAGGC    Minus   20  292 273 59.33   55.00   4.00    2.00
Product length  101

A command line solution would work, based on the bug reported by the OP. However there's nothing in NCBIs e-utilities and Biopython doesn't do Primer-Blast, but will do Blast. You could do it Perl via the LWP Agent, e.g. here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.