sawsimeon / BT_PCM

0 stars 2 forks source link

Scripts that create input data. #2

Open likit opened 9 years ago

likit commented 9 years ago

How did you generate all these files? It didn't seem like you download them from somewhere. You should also include scripts that create data too. The pipeline should start at the beginning of the analysis.

C <- read.csv("data/Compound.csv", header=TRUE) P <- read.csv("data/Protein.csv", header=TRUE) Y <- read.csv("data/Activity.csv", header=TRUE)

Also, please do not you a single character for a variable name. It's not meaningful and hard to understand.

sawsimeon commented 9 years ago

Hi, The Fingerprint Descriptors were created using .jar file from Padel. http://padel.nus.edu.sg/software/padeldescriptor/ There is a way to open and use .jar file in R. But my level in R is low. T_T http://stackoverflow.com/questions/20291904/how-can-i-run-an-executable-jar-file-in-an-r-script For the Activity, I think we create a column of activity value in a csv file. its gonna be fun

likit commented 9 years ago

There is no need to run jar file in R. You can just write a batch script for Windows and Shell script for Unix/Linux that runs the jar file. After that you can write .R script that runs the entire pipeline and use R CMD command to run it outside R. Make sense?

On Apr 10, 2015, at 11:20 AM, Saw Simeon notifications@github.com wrote:

Hi, The Fingerprint Descriptors were created using .jar file from Padel. http://padel.nus.edu.sg/software/padeldescriptor/ There is a way to open and use .jar file in R. But my level in R is low. T_T http://stackoverflow.com/questions/20291904/how-can-i-run-an-executable-jar-file-in-an-r-script For the Activity, I think we create a column of activity value in a csv file. its gonna be fun

— Reply to this email directly or view it on GitHub.

sawsimeon commented 9 years ago

I just type the following on the command line: java -jar PaDEL-Descriptor.jar

And the GUI interface popups and i just manually click it. I think I should learn how to use common line to do that.

sawsimeon commented 9 years ago

Anyway, i will just attach the .smi and .fasta files as a data set as well.

likit commented 9 years ago

Yes, find the way to use the command line to do that. I’m positive that they provide the command line interface too.

On Apr 10, 2015, at 7:22 PM, Saw Simeon notifications@github.com wrote:

I just type the following on the command line: java -jar PaDEL-Descriptor.jar

And the GUI interface popups and i just manually click it. I think I should learn how to use common line to do that.

— Reply to this email directly or view it on GitHub.

sawsimeon commented 9 years ago

Hey I try to do that with the command line using the Padel Java Clients.

http://padel.nus.edu.sg/software/padeldescriptor/

with the following line.

 java -jar PaDEL-Descriptor.jar -removesalt -standardizenitro -standardizetautomers -dir <~/Desktop/github/T2R>  -file  <~/downloads/PaDEL-Descriptor  -fingerprints substructure

Instead of getting a cdv file i got this errors.

padeldescriptor.PaDELDescriptorApp launchCommandLine
WARNING: no argument for:dir
likit commented 9 years ago

Try removing < and > from the command line. Most of the time they just represent required arguments and should not be included in the command.

likit commented 9 years ago

By the way, you should start using file path based on your project directory. Just think about what your command should be like so that it will run on other machines with different directory structure.

sawsimeon commented 9 years ago

hey thanks, what is file path based? you mean like <~path/BT_PCM>?

likit commented 9 years ago

For instance, if your project is in ~/Desktop/BT_PCM and your data are in ~/Desktop/BT_PCM/data, and you run the script inside BT_PCM (why not?), so when you want to refer to data/ just use data/ instead of ~/Desktop/BT_PCM/data. So, if you have whateverapp program with --dir for a path to data directory, your command should be like:

java whateverapp --dir data/

instead of

java whateverapp --dir ~/Desktop/BT_PCM/data/

make sense?

likit commented 9 years ago

Also, you can specify a path to PaDEL-Descriptor.jar in your command too so that you can put PaDEL-Descriptor.jar somewhere else.