Hi, everyone!
Apologies for the simplistic question, but I'm just getting started with Biopython, and I'm having a lot of trouble using qblast() to blast a text file of DNA sequences in FASTA format. The relevant bit of my code is:
"fastaFile = open("all targets.txt", "r")
resultHandle = NCBIWWW.qblast("blastn", "nt", fastaFile, word_size = 7, hitlist_size = 5, megablast = True)"
with the parameters based on requirements from another member of my team. The error message is:
"ValueError: Error message from NCBI: Message ID#24 Error: Failed to read the Blast query: Protein FASTA provided for nucleotide sequence"
The sequence I'm providing is certainly not a protein FASTA. I've tried setting them all to their defaults, and I've tried a few example FASTA files, with the same error being raised. My code works fine when provided with a GI number, or a raw sequence. I'm wondering if the error is something to do with the headers of my FASTA sequences being read as part of the sequence itself, and the non-GCTA letters are causing it to be read as a protein sequence.
Thank you for reading, and I would really appreciate any help anyone could offer!
can we have a look at "all targets.txt"?