-
Notifications
You must be signed in to change notification settings - Fork 64
/
README.REXPFIT
54 lines (38 loc) · 2.17 KB
/
README.REXPFIT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
Documentation for REXPFIT:
rexpfit.r is a program that can be used to fit an exponential distribution to the output of ROLLOFF. This program uses the nls function in R to determine the nonlinear (weighted) least-squares estimates of the parameters of a nonlinear model. It also uses the DEoptim package to pick the initial values of all the parameters (Katharine Mullen, David Ardia, David Gil, Donald Windover, James Cline (2011). DEoptim: An R Package for Global Optimization by Differential Evolution. Journal of Statistical Software, 40(6), 1-26. URL http://www.jstatsoft.org/v40/i06/).
More information on these functions and packages can be found at-
http://stat.ethz.ch/R-manual/R-patched/library/stats/html/nls.html
http://cran.r-project.org/web/packages/DEoptim/index.html
To run the program, you need R. R is a free software and can be downloaded from-
http://www.r-project.org/
################
Load the program in R (src/rexpfit.r):
source("rexpfit.r")
To run the program-
expfit(input, output, output_col, lval, hval, affine)
where-
input: ROLLOFF Output file name. As input the program takes the output of ROLLOFF.
output: Filename for the output of expfit.
output_col: column # of the output file which has correlation values. Default is 4.
lval: Lower (starting) value of genetic distance. Default is 0.5cM.
hval: Higher (end) value of genetic distance. Default is 100cM
affine: TRUE/ FALSE. Default is TRUE.
plot: TRUE/ FALSE. plot the output
jackknife: TRUE/ FALSE - jackknife option used in roloff or not.
example:
expfit(example.out, example, 4, 0.5, 100, TRUE, TRUE, FALSE)
Output files:
The program creates 3 output files:
output.log: contains the summary of the fit
fit_output: contains the fitted values generated by the model
output.pdf: pdf file which shows the ROLLOFF output and the fitted values.
where, output = output file name used in the expfit function call.
Common Errors:
If you get an error for library DEoptim, please install the library using -
install.packages("DEoptim")
library("DEoptim")
Load the program again -
source("rexpfit.r")
Nick Patterson
<nickp@broadinstitute.org>
------------------------------------------------------------------------------