[BioPython] biopython clustalw command line take 2

Larry l.heisler at utoronto.ca
Wed Jul 30 13:11:21 EDT 2003


Hi Ashleighe,

not a biopython expert, but tried your code and was able to proceed by
making sure the variables were defined as strings

ie
cline.gap_open_pen="20"
cline.gap_ext_pen="10"

then i am able to run the str command, returning a command string

...not really having used this module, I'm not sure where to go from there,
but hopefully this will get you past that point in the problem

Larry

Lawrence Heisler, PhD
Department of Laboratory Medicine and Pathobiology
Faculty of Medicine
University of Toronto
Phone: 416-946-7921
email: l.heisler at utoronto.ca



----- Original Message -----
From: "ashleigh smythe" <absmythe at ucdavis.edu>
To: <biopython at biopython.org>
Sent: Wednesday, July 30, 2003 12:38 PM
Subject: [BioPython] biopython clustalw command line take 2


> Hello biopython experts.  At the risk of seeming like a pest, I'm
> reposting a question I asked a couple of days ago to see if I can get a
> bite this time.
>
> I'm trying to use clustalw through biopython for the first
> time.  I'm following the tutorial but it doesn't show the syntax for
> setting the multiple alignment parameters.  From the __init__ I figured
> out that it is something like gap_open_pen=desired value so I tried
> cline.gap_open_pen=20 but when I try to show that command line string I
> get an error:
>
> >>> cline=MultipleAlignCL(os.path.join(os.curdir, 'aligntest'))
> >>> cline.set_output('alignout.aln')
> >>> cline.gap_open_pen=20
> >>> cline.gap_ext_pen=10
> >>> str(cline)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib/python2.2/site-packages/Bio/Clustalw/__init__.py", line
> 420, in __str__
>     cline = cline + " -GAPOPEN=" + self.gap_open_pen
> TypeError: cannot concatenate 'str' and 'int' objects
>
> How do I set those values properly?
>
> Thanks very much for any suggestions.
>
> Ashleigh
> --
> ****************************
> Ashleigh B. Smythe
> Graduate Research Assistant
> Department of Nematology
> University of California,
> Davis, CA 95616
> email:absmythe at ucdavis.edu
> phone:530-754-4321
>
> _______________________________________________
>
>
>
> _______________________________________________
> BioPython mailing list  -  BioPython at biopython.org
> http://biopython.org/mailman/listinfo/biopython
>



More information about the BioPython mailing list