Answers.Body: <p>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.</p>
  
  <p>If the error is caused by the line endings, maybe you can fix your downloaded files with a tool like <a href="http://macappstore.org/dos2unix/" rel="nofollow noreferrer">dos2unix</a>.</p>
  
  <h1>Update:</h1>
  
  <p>On a whim, I tried adding a description to the FASTA header:</p>
  
  <pre><code>&gt;test1 description
  ATTAAAGGTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAA
  AATCTGTGTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGG
  ACACGAGTAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTT
  CGTCCGGGTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTG
  </code></pre>
  
  <p>This time, there was no error.</p>
  
  <p>Does that work for you as well?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-25T17:29:36.020Z
Answers.Text: 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.
Answers.UserDisplayName: Set
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-25T17:50:06.510Z
Answers.Text: Sorry, you're right. When uploading the sequence as database, I get the same error. -.-
Answers.UserDisplayName: mrhd
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-25T17:53:01.293Z
Answers.Text: The error does not appear when pasting the sequence into the text box under "Custom", though. Strange...
Answers.UserDisplayName: mrhd
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-25T17:56:31.260Z
Answers.Text: 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.
Answers.UserDisplayName: Set
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-25T17:58:48.150Z
Answers.Text: Very odd indeed..
Answers.UserDisplayName: mrhd
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-25T17:24:37.067Z
Answers.LastActivityDate: 2020-04-25T17:57:45.047Z
Answers.LastEditDate: 2020-04-25T17:57:45.047Z
Answers.UserDisplayName: mrhd
Answers.Body: <p>I did it by copy and paste. Here's the top line of the output:</p>
  
  <pre><code>    Primer pair 1
  Sequence (5'-&gt;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'-&gt;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'-&gt;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'-&gt;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
  </code></pre>
  
  <p>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. <a href="http://www.bioinformatics-made-simple.com/2012/02/perl-script-4-how-to-blast-multiple.html" rel="nofollow noreferrer">here</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-25T18:05:38.843Z
Answers.LastActivityDate: 2020-04-25T18:31:29.817Z
Answers.LastEditDate: 2020-04-25T18:31:29.817Z
Answers.UserDisplayName: M__
Body: <p>I'm using <a href="https://www.ncbi.nlm.nih.gov/tools/primer-blast/" rel="nofollow noreferrer">Primer-Blast</a> to compare a PCR template against a custom database of reference sequences, using Primer-Blast's <em>Custom</em> database functionality.</p>
  
  <p>However whenever I try to upload a FASTA file as the custom database and then run Primer-Blast, I get the following error:</p>
  
  <p><code>Exception error: Fasta Reader: sequence id ends with 80 valid nucleotide characters. Was the sequence accidentally placed in the definition line?</code></p>
  
  <p>No matter how I try to format my FASTA file, I get this error.</p>
  
  <p>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?</p>
  
  <p>Here's an example FASTA file, to upload both for the template and the custom database.</p>
  
  <pre><code>&gt;test1
  ATTAAAGGTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAACGAACTTTAA
  AATCTGTGTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAACTAATTACTGTCGTTGACAGG
  ACACGAGTAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTGTTGCAGCCGATCATCAGCACATCTAGGTTT
  CGTCCGGGTGTGACCGAAAGGTAAGATGGAGAGCCTTGTCCCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGC
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-25T17:01:43.170Z
Comments.Text: @mrhd just added
Comments.UserDisplayName: Set
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-25T17:05:11.543Z
Comments.Text: @mrhd It's almost like it's not recognizing the newline escape character at the end of the sequence ID.
Comments.UserDisplayName: Set
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-25T17:07:08.710Z
Comments.Text: That might actually be the cause of the error. Did you create the FASTA on Windows or Linux/Mac?
Comments.UserDisplayName: mrhd
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-25T17:10:06.887Z
Comments.Text: @mrhd The actual FASTAs I want to use were downloaded from GISAID. However I am on a Mac.
Comments.UserDisplayName: Set
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-25T18:06:32.940Z
Comments.Text: 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.
Comments.UserDisplayName: Set
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-25T16:56:58.837Z
Comments.Text: Could you provide a sample of your FASTA file, pls?
Comments.UserDisplayName: mrhd
Tags: <blast><phylogenetics><primer>
Title: Primer-Blast Custom Database [error]
ThreadText: # Primer-Blast Custom Database [error]
  
  (Asked by: username_0 on 2020-04-25)
  
  I'm using [Primer-Blast](https://www.ncbi.nlm.nih.gov/tools/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
  
  ```
  
  **Tags:** blast, phylogenetics, primer
  
  > **Comments:**
  > **username_1**: Could you provide a sample of your FASTA file, pls?  
  > **username_0**: @username_1 just added  
  > **username_0**: @username_1 It's almost like it's not recognizing the newline escape character at the end of the sequence ID.  
  > **username_1**: That might actually be the cause of the error. Did you create the FASTA on Windows or Linux/Mac?  
  > **username_0**: @username_1 The actual FASTAs I want to use were downloaded from GISAID. However I am on a Mac.  
  > **username_0**: 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.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-04-25. Score: 1
  
  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](http://macappstore.org/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?
  
  > **Comments:**
  > **username_0**: 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.  
  > **username_1**: Sorry, you're right. When uploading the sequence as database, I get the same error. -.-  
  > **username_1**: The error does not appear when pasting the sequence into the text box under "Custom", though. Strange...  
  > **username_0**: 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.  
  > **username_1**: Very odd indeed..  
  
  ---
  
  ### Answer by username_2 on 2020-04-25. Score: 0
  
  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](http://www.bioinformatics-made-simple.com/2012/02/perl-script-4-how-to-blast-multiple.html).
  
  
  ---
  
  