Question: (Closed) blast against genomes in biopython
0
gravatar for halima.loulou
4.9 years ago by
Germany
halima.loulou0 wrote:
from Bio import Entrez, SeqIO
from Bio.Blast import NCBIXML
from Bio.Blast import NCBIWWW
result_handle = NCBIWWW.qblast("blastn","nr", "CACTTATTTAGTTAGCTTGCAACCCTGGATTTTTGTTTACTGGAGAGGCC",entrez_query='"Beutenbergia cavernae DSM 12333" [Organism]')
blast_records = NCBIXML.parse(result_handle)
    for blast_record in blast_records:
        for alignment in blast_record.alignments:
           for hsp in alignment.hsps:
               print(hsp.query[0:75] + '...')
               print(hsp.match[0:75] + '...')
               print(hsp.sbjct[0:75] + '...')

 

this does not give me an output, although the sequence is actually a sequence of the genome, so i must get a result. where is the error? the query is correct?

qblast blast biopython genome • 2.2k views
ADD COMMENTlink written 4.9 years ago by halima.loulou0

Are you sure you get a result? I guess that your result is empty, print the number of records and alignments received.

did you try "nt" instead of nr? try to remove/edit entrez_query.

ADD REPLYlink written 4.9 years ago by Michael Dondrup46k

in blast interface i get a result... the sequence is actually a sequence of

Beutenbergia cavernae DSM 12333 genome.. when i remove entrez_query it return result... i thing the entrz_query is wrong..

ADD REPLYlink written 4.9 years ago by halima.loulou0

There is no alignment.

ADD REPLYlink written 4.9 years ago by Hugues250

This is cross-posted on SO. Either answer this yourself or delete it, so that it will not waste others' time.

ADD REPLYlink written 4.9 years ago by Zhaorong1.2k

Hello halima.loulou!

It appears that your post has been cross-posted to another site: http://stackoverflow.com/questions/24695028/blast-against-genomes-in-biopython

This is typically not recommended as it runs the risk of annoying people in both communities.

ADD REPLYlink written 4.9 years ago by Michael Dondrup46k

Hello halima.loulou!

We believe that this post is does not fit the main topic of this site.

closing

For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.

Cheers!

ADD REPLYlink written 4.9 years ago by Michael Dondrup46k
Please log in to add an answer.
The thread is closed. No new answers may be added.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 732 users visited in the last hour