Hi Joao,
I tried to modify the Plot_line file provided with popABC but I get
the following message error I get after typing the command line:
> plot_line(rej="NZFS5rej.rej",pri="NZFS5rej.pri")
Erreur dans plot.window(...) : valeurs finies requises pour 'ylim'
De plus : Messages d'avis :
1: In lfproc(x, y, weights = weights, cens = cens, base = base, geth =
geth, :
procv: density estimate, empty integration region
2: In lfproc(x, y, weights = weights, cens = cens, base = base, geth =
geth, :
procv: density estimate, empty integration region
3: In min(x) : aucun argument trouvé pour min ; Inf est renvoyé
4: In max(x) : aucun argument pour max ; -Inf est renvoyé
Here's the first bit of the modified script:
"plot_line <- function(rej_file , pri_file){
#import locfit library
library(locfit)
#demographic parameters' priors (minimum and maximum values)
mintev1 <- 0
maxtev1 <- 10000
mintev2 <- 0
maxtev2 <- 10000
minNe1 <- 0
maxNe1 <- 100000
minNe2 <- 0
maxNe2 <- 100000
minNe3 <- 0
maxNe3 <- 100000
minNeAnc1 <- 0
maxNeAnc1 <- 100000
minNeAnc2 <- 0
maxNeAnc2 <- 100000
minmig1 <- 0
maxmig1 <- 0.0001
minmig2 <- 0
maxmig2 <- 0.0001
minmig3 <- 0
maxmig3 <- 0.0001
minmigAnc1 <- 0
maxmigAnc1 <- 0.0001
#import the .rej file
abc.rej <- data.matrix(read.table(rej_file))
#import the .pri files
priors <- data.matrix(read.table(pri_file))
# Plot line for sequence DNA mutation rate and save it in a .eps file
plot(locfit(~abc.rej[,2]),main="prior (black) and posterior (blue)
distributions",xlab="mut rate",col="blue")
plot(locfit(~priors[,2]),col="black",add=T)
dev.copy2eps(file="mutrate_line.eps", horizontal=F)
print("mut rate done.")
# Plot line for sequence DNA recombination rate and save it in a .eps
file
plot(locfit(~abc.rej[,4]),main="prior (black) and posterior (blue)
distributions",xlab="rec rate",col="blue")
plot(locfit(~priors[,4]),col="black",add=T)
dev.copy2eps(file="recrate_line.eps", horizontal=F)
print("rec rate done.")
# Plot line for splitting time 1 and save it in a .eps file
plot(locfit(~abc.rej[,6],xlim=c(mintev1,maxtev1)),main="prior (black)
and posterior (blue) distributions",xlab="tev1",col="blue")
plot(locfit(~priors[,6],xlim=c(mintev1,maxtev1)),col="black",add=T)
dev.copy2eps(file="tev1_line.eps", horizontal=F)
print("tev1 done.")
# Plot line for splitting time 2 and save it in a .eps file
plot(locfit(~abc.rej[,7],xlim=c(mintev2,maxtev2)),main="prior (black)
and posterior (blue) distributions",xlab="tev2",col="blue")
plot(locfit(~priors[,7],xlim=c(mintev2,maxtev2)),col="black",add=T)
dev.copy2eps(file="tev2_line.eps", horizontal=F)
print("tev2 done.")
......"
Is the problem due to the priors range in the plot_line script?
Thanks!