This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Script Or Tools To Blast Primer Sequences Against Fasta File

Hi, I am looking for a script or tool to blasta all of my primer sequences against the reference fasta sequence. When i tried to use megablast i did not get any output eventhough those primers are supposed to hit somewhere in the reference sequence. I guess the problem here is the input sequences which are quite short. Any help is appreciated. Thanks in advance.....

blast primer

Megablast has a large default word-size. I think it's more than 20. If your primers are less than the word-size, then you won't get any results. Try lowering the word size to the minimum allowed.

Thank you both. I have changed the word_size and the megablast was able to work with my primers.

1 answer

There must be something wrong there. Primer sequences should match the reference sequence perfectly, so almost every tool should find them (even a simple grep (need to compensate for linebreaks in sequences)). But try for example primersearch from EMBOSS or BWA, both should find them with standard parameters. Note to provide the correct input format for primresearch (not fasta). If you want to use blast, use blast+ program blastn with task option blastn-short and not megablast, see the documentation.

Unfortunately, there are so many things that can go wrong, these are only few pitfall I can think of:

  • Blast parameters, best bet: Evalue cutoff (set to 100) too low, sequence too short: lower word size (blastn-short default is 7), etc..
  • Mismatched reference sequence or blast database (primers designed for different genome build), try to use the official genome sequence
  • Masked regions in reference sequence and masking active
  • other simple mistakes, eg. wron format ....

To provide further guidance, please specify

  • exact blast parameters and version of blast or blast+
  • reference genome and version
  • example of primer sequences, like the first 10 lines

Hi, Thank you for your detailed information. I have used megablast with lower wordsize and it worked well.

Log in to answer this question.