[BioPython] clustalw problem using standalone or Bio.Clustalw

Emanuel Hey jodyhey at yahoo.com
Tue Jul 24 14:38:56 UTC 2007


Yes, it was indeed a path problem.  Thanks.

jhey

--- Peter <biopython at maubp.freeserve.co.uk> wrote:

> Emanuel Hey wrote:
> > I am running windows XP,  Python 2.5.1  and
> BioPython
> > trying to do a multiple alignment on a fasta file.
> > The file is not large, with just 10 sequences to
> try
> > things out.  I'm familiar with clustalw as a
> command
> > line program. 
> > 
> > With clustalw in the path the following works fine
> and
> > opens a command prompt window with the clustalw
> menu
> >>>> os.system('clustalw')
> 
> That suggests that clustalw is on the windows path,
> or in the current 
> directory. Great. (I personally use a full path to
> clustalw.exe when 
> working on Windows)
> 
> > However this line returns a '1' when it should do
> an
> > alignment on the sequences contained in c.faa
> >>>> os.system('clustalw c.faa')
> 
> Obvious question time - is the file c.faa in the
> current directory?
> i.e. Does this work?
> 
> import os
> assert os.path.isfile('c.faa')
> 
> > I also tried following the examples in the
> cookbook
> >
>
http://biopython.org/DIST/docs/tutorial/Tutorial.html
> > and the examples in the bioinformatics course
> >
>
http://www.pasteur.fr/recherche/unites/sis/formation/python/ch11s06.html#quest_run_clustalw
> > 
> > For example,  the following call to a constructed
> > command line 
> >>>> alignment = Clustalw.do_alignment(cline)
> > 
> > generates this error result
> > 
> > 
> > Traceback (most recent call last):
> >   File "<pyshell#82>", line 1, in <module>
> >     alignment = Clustalw.do_alignment(cline)
> >   File "C:\Program
> >
>
Files\Python25\Lib\site-packages\Bio\Clustalw\__init__.py",
> > line 117, in do_alignment
> >     % (out_file, command_line))
> > IOError: Output .aln file .\testalign.out not
> > produced, commandline: clustalw
> > .\chimp_hemoglobin.gb.faa -OUTFILE=.\testalign.out
> 
> This may be the same issue...
> 
> Could you try using fully qualified paths for both
> clustalw.exe and the 
> input fasta file?
> 
> Peter
> 
> 



       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 



More information about the Biopython mailing list