[Biopython] alignment in biopython using `clustalW

Jakub Stanislaw Nowak jakub.nowak at ed.ac.uk
Thu Aug 28 23:06:08 UTC 2014


Hello,

I am trying to run alignment using ClustalW in python.

I have used this code to compile

> cline = ClustalwCommandline("clustalw2", infile="test.fasta")
> print(cline)
> stdout, stderr = cline()
> align = AlignIO.read("test.aln", "clustal")
> print(align)

But it is generating file. I think I have some problem with setting a proper pathway to  clustal.

This is the error:

> clustalw2 -infile=test.fasta
> Traceback (most recent call last):
>   File "/Users/user/Google Drive/Bioinformatics/smallRNAseq/Python U densities/trial4old.py", line 95, in <module>
>     stdout, stderr = cline()
>   File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/Bio/Application/__init__.py", line 513, in __call__
>     stdout_str, stderr_str)
> Bio.Application.ApplicationError: Non-zero return code 127 from 'clustalw2 -infile=test.fasta', message '/bin/sh: clustalw2: command not found'



Can you suggest some solution?

Thanks,

Jakub


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20140829/a220f4b5/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: not available
URL: <http://mailman.open-bio.org/pipermail/biopython/attachments/20140829/a220f4b5/attachment.ksh>


More information about the Biopython mailing list