How To Get Ungapped Sequences From Blast Output?
2
1
Entering edit mode
12.6 years ago
Drdiran ▴ 10

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.

blast biopython • 4.3k views
ADD COMMENT
1
Entering edit mode
12.6 years ago
Fabian Bull ★ 1.3k

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

ADD COMMENT
1
Entering edit mode
12.6 years ago

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2115 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6