Page 1 of 1

Log normalization

PostPosted: Mon Jul 14, 2014 11:14 am
by cwyoo
NAME
log_norm.pl - Log normalization perl script

SYNOPSIS
log_norm.pl

AVAILABILITY
Git repository (public)

DESCRIPTION
This scripts calculates log scores provided in a text file log_scores.txt in the same directory.

EXAMPLES

If you run the script with the text file log_scores.txt in the same directory with the following content:

2.972013412
1.557986984
4.648754528
3.506570268
-0.434294482
-2.694955206
-3.643825586
-0.508617802

You will get the following results:

Total score 5.09627312309116
Log score 2.972013412 is 11.952141590284 % of total score
Total score 5.09627312309116
Log score 1.557986984 is 2.90630945243736 % of total score
Total score 5.09627312309116
Log score 4.648754528 is 63.9212329928271 % of total score
Total score 5.09627312309116
Log score 3.506570268 is 20.398621619523 % of total score
Total score 5.09627312309116
Log score -0.434294482 is 0.396373861224409 % of total score
Total score 5.09627312309116
Log score -2.694955206 is 0.0413344848523151 % of total score
Total score 5.09627312309116
Log score -3.643825586 is 0.0160038089915447 % of total score
Total score 5.09627312309116
Log score -0.508617802 is 0.367982189860324 % of total score

The results show that log score of 3.506570268 is about 20.3986% of the sum of all log scores provided in log_scores.txt

FILES
log_scores.txt: a text file that has log score per line. The file should be in the same directory.

SEE ALSO
Log likelihood score, BDe score, Log score

Re: Log normalization

PostPosted: Thu Jul 17, 2014 4:24 pm
by meninonas
Professor,

What command do you need in order to execute this script?

In addition, for the PAH dataset, would you like to place all of the values from all of the runs in the log_scores.txt files or separate the log scores per run?

Re: Log normalization

PostPosted: Thu Jul 17, 2014 10:34 pm
by cwyoo
meninonas wrote:Professor,

What command do you need in order to execute this script?

In addition, for the PAH dataset, would you like to place all of the values from all of the runs in the log_scores.txt files or separate the log scores per run?


This is a perl script. Just type log_norm.pl and press enter in the command prompt in the terminal of the server or any machine that has perl installed. I believe Mac comes with perl installed, correct? Also you may search for information about how to run a perl script.

Re: Log normalization

PostPosted: Mon Nov 30, 2015 6:30 pm
by jramo033
I was trying to follow the instructions but "log_norm.pl" looks more like a file and not a command in perl. I got the message "it is not recognized as a command". It looks like the file with the information (numbers) needs to be read first but we need to write the complete script (reading plus log normalization commands). If anybody knows how to do it, I would appreciate it.

Re: Log normalization

PostPosted: Tue Dec 01, 2015 1:44 pm
by cwyoo
jramo033 wrote:I was trying to follow the instructions but "log_norm.pl" looks more like a file and not a command in perl. I got the message "it is not recognized as a command". It looks like the file with the information (numbers) needs to be read first but we need to write the complete script (reading plus log normalization commands). If anybody knows how to do it, I would appreciate it.


Try to type in "perl log_norm.pl" and press enter. Of course, you need to update log_scores.txt file with appropriate log scores.

Re: Log normalization

PostPosted: Fri Dec 04, 2015 12:03 pm
by mprec001
It appears windows has several versions of Perl available. Do you have a recommendation on which one to use?

Re: Log normalization

PostPosted: Fri Dec 04, 2015 8:45 pm
by cwyoo
mprec001 wrote:It appears windows has several versions of Perl available. Do you have a recommendation on which one to use?


Any perl will work. BTW, all severs have perl installed.

Re: Log normalization

PostPosted: Wed Dec 09, 2015 2:23 am
by mprec001
I have been trying to run log normalization script without success on the server.

I have created the .txt file within a working directory, but when I try to run the perl script by typing "perl log_norm.pl", it gives the error "Can't open perl script "log_norm.pl": No such file or directory.

I suspect the script needs to be created first, using what is explained on this website on how to run perl scripts:

http://perl.about.com/od/gettingstarted ... tm#showall

Is there a file on the server where the script is located? I tried accessing the Git Repository, but was denied access.

Any ideas?

Re: Log normalization

PostPosted: Wed Dec 09, 2015 6:30 pm
by cwyoo
mprec001 wrote:I have been trying to run log normalization script without success on the server.

I have created the .txt file within a working directory, but when I try to run the perl script by typing "perl log_norm.pl", it gives the error "Can't open perl script "log_norm.pl": No such file or directory.

I suspect the script needs to be created first, using what is explained on this website on how to run perl scripts:

http://perl.about.com/od/gettingstarted ... tm#showall

Is there a file on the server where the script is located? I tried accessing the Git Repository, but was denied access.

Any ideas?


I have attached the perl script and its related file on the original post.

Re: Log normalization

PostPosted: Thu Dec 10, 2015 1:59 am
by mprec001
Thank you Dr. Yoo. I was able to run the log normalization with the script provided.