Amitoj S. Chopra
2010-Feb-10 06:16 UTC
[R] Using R to format a file using a server (PDB to PQR file)
I am trying to write a program that uses R and takes a pdb file, and converts it to a pqr file. This task is simple generally, using the website, http://pdb2pqr-1.wustl.edu/pdb2pqr/. How do you use R to input a pdb file (that is on hand) into the upload pdb file input, and run the website and give the return file to be a pqr file. Thanks for your help. -- View this message in context: http://n4.nabble.com/Using-R-to-format-a-file-using-a-server-PDB-to-PQR-file-tp1475434p1475434.html Sent from the R help mailing list archive at Nabble.com.
Dieter Menne
2010-Feb-10 07:58 UTC
[R] Using R to format a file using a server (PDB to PQR file)
Amitoj S. Chopra wrote:> > I am trying to write a program that uses R and takes a pdb file, and > converts it to a pqr file. This task is simple generally, using the > website, http://pdb2pqr-1.wustl.edu/pdb2pqr/. How do you use R to input a > pdb file (that is on hand) into the upload pdb file input, and run the > website and give the return file to be a pqr file. >Try Curl http://curl.haxx.se/ and the RCurl package. It not complicated, but can be a lot of work in detail. Dieter -- View this message in context: http://n4.nabble.com/Using-R-to-format-a-file-using-a-server-PDB-to-PQR-file-tp1475434p1475473.html Sent from the R help mailing list archive at Nabble.com.
Barry Rowlingson
2010-Feb-10 10:30 UTC
[R] Using R to format a file using a server (PDB to PQR file)
On Wed, Feb 10, 2010 at 6:16 AM, Amitoj S. Chopra <amitojc at gmail.com> wrote:> > I am trying to write a program that uses R and takes a pdb file, and converts > it to a pqr file. This task is simple generally, using the website, > http://pdb2pqr-1.wustl.edu/pdb2pqr/. How do you use R to input a pdb file > (that is on hand) into the upload pdb file input, and run the website and > give the return file to be a pqr file. Thanks for your help.You can use RCurl to upload a file to an HTML form POST URL using postForm (and see also fileUpload). Then you need to poll the returned URL to see when the conversion is finished, so sleep for 30 seconds or so, and use getURL until the returned HTML looks like the completion page. Then find the link to the output file and use getURL to download it. RCurl is on CRAN, and docs are here - lots of examples: http://www.omegahat.org/RCurl/ Warning: this post contains small parts. Some assembly required. Barry
Martin Morgan
2010-Feb-10 13:58 UTC
[R] Using R to format a file using a server (PDB to PQR file)
On 02/09/2010 10:16 PM, Amitoj S. Chopra wrote:> > I am trying to write a program that uses R and takes a pdb file, and converts > it to a pqr file. This task is simple generally, using the website, > http://pdb2pqr-1.wustl.edu/pdb2pqr/. How do you use R to input a pdb file > (that is on hand) into the upload pdb file input, and run the website and > give the return file to be a pqr file. Thanks for your help.Maybe bio3d::write.pqr is for you? http://mccammon.ucsd.edu/~bgrant/bio3d/index.html Martin> >-- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793