Can't get results using Biopyhon BLAST
0
0
Entering edit mode
4 months ago
Ric95 • 0

Hi everyone,

I am writing a script to BLAST sequences using Biopython. Following previous posts like this, I tried to put all the constraints used in the NCBI website, still can't get the same results... Can someone help me?

The code I'm using is the following.

from Bio.Blast import NCBIWWW
from Bio.Blast import NCBIXML
record = '''GGGGCCCTTCTTCTAGATTACCCATGCATGTTATTGAATATAAAGAAAAGACGAACAGCTCAGTAACTCT
TAGTGTAAAGATGTATTAGGACTGTTAACTATGTTAAATACAGATAATAATAATACAATAAGAATAAGAT
CTATCAGTTAGTTGTTAAGGTAATGGCTTAACAAGACAGTGACGGATAACGGTATTACTTTGTAATATTC
CGGAGAAGGAGCCTGAGAGATTGCTACTAAGTCTAAGGATTGCAGCAGGGGCTAAACTTGACCTATGATA
TATTATTGAGGCAGTTATGAGTAGTATTTTATAATTATTGTAATATTGTAAGTATATATTACAAGATGAA
TCGGAGGGCAAATCGAGTGCCAACAGCCGGGGGAATGCGGGGGGCGATAGTGTGTGTGATGATTGATGGA
GGGTGGGAGTCTGGAGGAGGAATGAGGATAAGGATGGGAGGGTATATTGGGGGGTTAGGAGAGAGACGAA
ATGTGATAACCCTAACTGGATGAACCGAAGCGAAAGCTATATTCTTTATTGTTTTATTAGAACAAGGTCG
TTTGTTTTGAGGTTTGAAGATGCTCAGATTCCTC'''
result_handle = NCBIWWW.qblast("blastn", "nr/nt", record,
                               megablast=False,
                               expect=10,
                               word_size=11,
                               nucl_reward=2,
                               nucl_penalty=-3,
                               gapcosts="5 2",
                               short_query=True,
                               entrez_query='microsporidians (taxid:6029)')
for res in NCBIXML.parse(result_handle):
    for d in res.descriptions:
        print(d.title,d.score,d.e)
BLAST Biopython • 192 views
ADD COMMENT
1
Entering edit mode

I can get a close approximation using the following command line search using the sequence above.. Translate as needed for your python query.

blastn -task blastn -db nt -query test1.fa -entrez_query "microsporidians" -out test.html -html -remote -max_target_seqs 10
ADD REPLY

Login before adding your answer.

Traffic: 2176 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