[R] Using R to format a file using a server (PDB to PQR file)

2010-02-10 Thread Amitoj S. Chopra

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.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Using R to format a file using a server (PDB to PQR file)

2010-02-10 Thread Barry Rowlingson
On Wed, Feb 10, 2010 at 6:16 AM, Amitoj S. Chopra amit...@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

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Using R to format a file using a server (PDB to PQR file)

2010-02-10 Thread Martin Morgan
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

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Using R to format a file using a server (PDB to PQR file)

2010-02-09 Thread Dieter Menne


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.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.