[Biopython] Blast Two Sequences

Jan T Kim jttkim at googlemail.com
Fri Mar 10 18:05:29 UTC 2017


Hi All,

after a quick look at this matter I'm rather puzzled by what the purpose
of all this is. Do you want to align the first sequence to the second
sequence? Then, doing that via NCBI BLAST is a really weird way of
achieving this, my suggestions would be to (1) consider using a pairwise
alignment program and (2) run the alignment locally on your computer --
e.g. install EMBOSS, then you can use BioPython's EMBOSS command line
adapters.

Or do you want to scan some NCBI database (non-redundant nucleotide or
protein, typically) using both sequences? That's not what that script does,
as far as I can tell, though.

Best regards, Jan


On Fri, Mar 10, 2017 at 05:15:33PM +0000, Peter Cock wrote:
> Good idea Lenna, but that only works within Python. Here we need to provide
> the FASTA format sequence data to NCBI BLAST.
> 
> If there was only one input file involved, Islam might be able to pipe that to
> BLAST using stdin. However, there there are two input files so I don't see
> any easy way to do this other than two temporary files.
> 
> Peter
> 
> On Thu, Mar 9, 2017 at 11:38 PM, Lenna Peterson
> <lenna.peterson at gmail.com> wrote:
> > Hi Islam,
> >
> > If you need to avoid writing the sequence to disk for whatever reason, you
> > could create an in-memory file using StringIO:
> > https://docs.python.org/2/library/stringio.html
> >
> > Lenna
> _______________________________________________
> Biopython mailing list  -  Biopython at mailman.open-bio.org
> http://mailman.open-bio.org/mailman/listinfo/biopython


More information about the Biopython mailing list