I am interested in getting ungapped sequence hits (hspsnogap) from blast output, I tried using this:
result_handle = NCBIWWW.qblast("blastp", "nr", record.format("fasta"),expect=10,"hsps_no_gap")
blast_records=NCBIXML.read(result_handle)
but there are still gaps in the sequences.
I would appreciate some hints on how to get ungapped sequences in fasta format from blast output.
2 answers
I am not quiet sure which language you are using but this might help. It states that there is a parameter named: ungapped_alignment. This is probably a boolean value so you should set it to true.
If you are able to make a blast by hand: The blastall program has a parameter -g. For ungapped alignment you should set it to -g F
Here are two options that will work:
One option: Set -G and -E to high values. -G is the gap opening penalty and -E is the gap extension penalty.
Second option: Set -g to F, where -g is the binary switch to perform a gapped alignment.
Log in to answer this question.