Question: Emboss In Biopython Asequence And Bsequence
0
gravatar for Maria
4.1 years ago by
Maria140
Maria140 wrote:

In biopython emboss applications, is it possible that asequence and bsequence attributes of needle/watercommandline object be a variable instead of fasta file ? i.e I want to write the sequence either directly or through variable as shown below

bseq= "aaatttccggtt"
    needle_cline = NeedleCommandline(asequence="acgtggcc", bsequence=bseq,
    ...                                  gapopen=10, gapextend=0.5, outfile="needle.txt")

Is it possible to do it ?

python biopython • 2.2k views
ADD COMMENTlink modified 4.1 years ago by Peter5.6k • written 4.1 years ago by Maria140
2
gravatar for Peter
4.1 years ago by
Peter5.6k
Scotland, UK
Peter5.6k wrote:

This isn't a Biopython specific thing, but an EMBOSS trick - you can use their pretend file format to give the sequence in place of a filename using asis:aaatttccggtt, see also http://emboss.sourceforge.net/docs/themes/SequenceFormats.html - e.g.

>>> from Bio.Emboss.Applications import NeedleCommandline
>>> aseq = "acgtggcc"
>>> bseq = "aaatttccggtt"
>>> needle_cline = NeedleCommandline(asequence="asis:"+aseq, bsequence="asis:"+bseq, gapopen=10, gapextend=0.5, outfile="needle.txt")
>>> stdout, stderr = needle_cline()
>>> print stdout + stderr
Needleman-Wunsch global alignment of two sequences

Also you might be able to specify you want to read the a-sequences from stdin rather than a file, and supply this when you actually run Needle, e.g. with needle_cline(stdin=aseq) (not tested).

ADD COMMENTlink modified 2.2 years ago • written 4.1 years ago by Peter5.6k

is there equivalent in MafftCommandline?

ADD REPLYlink written 18 months ago by Medhat7.4k
Please log in to add an answer.

Help
Access

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