Something like this:
cline = NcbiblastnCommandline(query="m_cold.fasta", db="nt", strand="plus",evalue=0.001, out="m_cold.xml", outfmt=5)
Or:
cline = NcbiblastnCommandline(query="m_cold.fasta", db="nt", strand="minus",evalue=0.001, out="m_cold.xml", outfmt=5)
With the strand parameter you can change which orientation you want. Probably in your case you need to set it on plus but reverse complement all your input sequences.
For displaying the alignment you can do something like this:
from Bio.Blast import NCBIXML
blast_record = NCBIXML.read(result_handle)
for alignment in blast_record.alignments:
for hsp in alignment.hsps:
print("****Alignment****")
print("sequence:", alignment.title)
print("length:", alignment.length)
print("e value:", hsp.expect)
print(hsp.query[0:75] + "...")
print(hsp.match[0:75] + "...")
print(hsp.sbjct[0:75] + "...")
Output will be:
****Alignment****
sequence: >gb|AF283004.1|AF283004 Arabidopsis thaliana cold acclimation protein WCOR413-like protein
alpha form mRNA, complete cds
length: 783
e value: 0.034
tacttgttgatattggatcgaacaaactggagaaccaacatgctcacgtcacttttagtcccttacatattcctc...
||||||||| | ||||||||||| || |||| || || |||||||| |||||| | | |||||||| ||| ||...
tacttgttggtgttggatcgaaccaattggaagacgaatatgctcacatcacttctcattccttacatcttcttc...
I got this code from here:
http://biopython.org/DIST/docs/tutorial/Tutorial.html#htoc98
What is the actual question here?
Do you want to know how to 'render' the alignment visually, or how to do the BLAST, or how to reverse complement? All 3?
rendering part might also help basically i wanted to know,can we do Blast complementary strands inside biopython and visaulise the particular output.?
Don’t type entirely in capitals please.
sorry ,my bad !did not pay attention towards the case
Standalone blast or online?
standalone BLAST connecting it with a python sript