[Biopython] blast against genomes in biopython

Jessica Grant jgrant at smith.edu
Sat Jul 12 12:13:35 UTC 2014


Hi Halima,

I think your script is fine, but the sequence isn't in the genome you are
blasting against.

If you remove the entrez_query you get results from other organisms and if
you change Beutenbergia to Acaryochloris (the best hit with no
entrez_query) you get results.

Also, I tried to blast online against the Beutenbergia genome and didn't
get good results.  Is it possible you aren't blasting the sequence you
intended?

Jessica


On Fri, Jul 11, 2014 at 7:23 AM, halima saker <hsaker at hotmail.com> 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?
>
>
> _______________________________________________
> Biopython mailing list  -  Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20140712/8ab02c7c/attachment.html>


More information about the Biopython mailing list