speciationgenomics / scripts

Scripts for analysis used during the course
78 stars 61 forks source link

./plotModel.r -p early_geneflow -l EC,GOLAN #3

Closed jingydz closed 3 years ago

jingydz commented 5 years ago

Hi, when I try the plotModel.r, I got the error message like this: [root@GenEngine bestrun]# ./plotModel.r -p early_geneflow -l EC,GOLAN Error in (grep("Population effective sizes", tpl) + 1):(grep("//Haploid", : argument of length 0 Calls: plotModelBestParams Execution halted

Do you know how to deal with it?

joanam commented 4 years ago

It seems that plotModel.r does not find the texts "Population effective sizes" or "Haploid" in your tpl file. This R script was written for the course and is not very flexible. If you deleted or modified the comments in the tpl file containing these words, plotModel.r will struggle.

jingydz commented 4 years ago

image Hi, I am a rookie, this picture is my tpl file. So what should I use to replace the "Haploid" in your plotmodel.r? The line is https://github.com/speciationgenomics/scripts/blob/master/plotModel.r#L48 and https://github.com/speciationgenomics/scripts/blob/master/plotModel.r#L49

joanam commented 4 years ago

In your tpl file replace "//Samples sizes and samples age" by "//Haploid samples sizes and samples age". I have uploaded all the demographic model .est, .tpl and .obs files to data.

jingydz commented 4 years ago

Ok, I found it! Thank you!