Hey Erez,
I don't know any reason why you are getting that error, but maybe this will
help. You may want to check out the Biopython (biopython.org) interface to
Clustalw. I'm using rpy together with the Clustalw biopython package, and
everything seems to work fine. My package versions are:
http://www.ocf.berkeley.edu/~tdhock/rpy-windows.html
Sincerely,
Toby Dylan Hocking
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Erez Lieberman
Sent: Tuesday, April 17, 2007 12:57 PM
To: rpy-list@lists.sourceforge.net
Subject: [Rpy] os.system() fails after importing rpy
Hey All -
I'd really love to get some insight into this, I'm just totally puzzled!
I'm trying to make system calls to clustalw, a sequence aligner which takes
arguments like filenames. The main point is just that I need to make a system
call, and I need to have a blank space before the arguments begin.
So what I do is:
import os
os.system('Z:\Data\ClustalW\clustalw Z:\Data\Output\junk.fasta')'
and this works just fine and clustalw runs and everything is fine.
Now the trouble is that when I do
import rpy
import os
os.system('Z:\Data\ClustalW\clustalw Z:\Data\Output\junk.fasta')'
Then clustalw executes and immediate fails, saying "Error: unknown option
/Z:\Data\Output\junk.fasta" First, that's not the error clustalw gives for a
missing file, but the one for an incorrect keyword. Second, it actually shows
you the slash in the error message. Basically, I've concluded that it's somehow
adding a slash after the blank space.
I tried many workarounds,
a) importing less or more of rpy
b) writing a script which writes a batch file with my system call and then runs
the batch file (so the Python system call has no spaces)
c) calling r.system() from python and seeing if I can run the system call
through r.
Nothing works at all, every method seems to fail identically. When I put the
system() command in R directly (though I have to add slashes to ensure the path
is formatted correctly) it works but then same string doesn't work with
r.system, e.g..
system('Z:\\Data\\ClustalW\\clustalw /Z:\\Data\\Output\\junk.fasta')
works when put directly into R, but
r.system('Z:\\Data\\ClustalW\\clustalw /Z:\\Data\\Output\\junk.fasta')
fails, with the same unknown option error, when put into Python.
I have no idea what to do. I'm totally mystified.
Anyone has any ideas as to what is going on here? I would be greatly
appreciative.
Thanks so much!
-Erez
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list