[Biopython] Passing sequence to local BLAST

malvika sharan malvikasharan at gmail.com
Thu Jul 21 15:51:35 UTC 2011


Hi,

i have tried this tool for aligning 1 sequence ( 'aseq.fasta ') against 5
sequence present in other file ('bseq.fasta'). as expected aseq.fasta gives
pairwise alignment with every fasta sequence present in bseq.fasta.

the alignment works perfectly and saves the alignment output as well.

1> the question is if there is anyway to extraxt consensus out of all
pairwise alignments? I know its is possible with clustalw or muscle or other
alignment tool. but i do not want pairwise alignment between all the
sequence with each other. In this case Emboss seemed the better tool where i
can align all sequence only with 1 query. but the crucial part is to extract
the conserved residue from the alignment.

2> The best would be to align all the sequence together against 1 sequence
(aseq.fasta) like it happens in COBALT. and find the conserved residue
directly. but i did not find any commandline tool like that unfortunately.
It would be great if you can suggest a tool if you know any.

thank you !
Malvika



On Thu, Jul 21, 2011 at 11:56 AM, Peter Cock <p.j.a.cock at googlemail.com>wrote:

> On Thu, Jul 21, 2011 at 10:48 AM, Sheila the angel
> <from.d.putto at gmail.com> wrote:
> > Thanks Peter,
> > Yes I understand that I can't use 'stdin' twice so this is not going to
> work
> >
> >>You have to use either two input files, or stdin and one file, (or one
> >>file and stdin).
> >
> > But how can I specify two input files, or stdin
> >
>
> Two files is covered in the Tutorial example you originally started
> with, isn't it?:
>
> water_cline = WaterCommandline(asequence="alpha.fasta",
> bsequence="beta.fasta", gapopen=10, gapextend=0.5,
> outfile="water.txt")
> stdout, stderr =water_cline()
>
> You've already done stdin and file for a and b, and said that works:
>
> seq_record = SeqIO.read(open("alpha.fasta"), "fasta")  #or a sequence
> object
> water_cline = WaterCommandline(asequence="stdin",
> bsequence="beta.fasta", gapopen=10, gapextend=0.5,
> outfile="water.txt")
> stdout, stderr =water_cline(stdin=seq_record.format("fasta"))
>
> Doing it the other way round with a file and stdin for a and b would be
> just:
>
> seq_record = SeqIO.read(open("beta.fasta"), "fasta")  #or a sequence object
> water_cline = WaterCommandline(asequence="alpha.fasta",
> bsequence="stdin", gapopen=10, gapextend=0.5, outfile="water.txt")
> stdout, stderr =water_cline(stdin=seq_record.format("fasta"))
>
> Obviously if you already have the sequences in FASTA files, then just give
> the filenames to the EMBOSS tool (rather than needlessly loading them into
> python just to write them to stdin).
>
> Peter
> _______________________________________________
> Biopython mailing list  -  Biopython at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/biopython
>



More information about the Biopython mailing list