Issue with MCMCtree summarizing MCMC posterior

124 views
Skip to first unread message

Skip

unread,
Feb 26, 2020, 5:34:39 PM2/26/20
to PAML discussion group
Hi,

I'm running dating analyses us approximate likelihood estimation and I'm an issue with MCMCtree calculating the 95% CIs and mapping them onto the tree. At the end of the run, I get the below error.

Summarizing MCMC samples . ..

First line has variable names, 112 variables

file format error: 224 fields in line 9002 while 112 fields in first line.

Error: error in scanfile().

-------------------------------------------------------

Primary job  terminated normally, but 1 process returned

a non-zero exit code. Per user-direction, the job has been aborted.


I'm getting this for two entirely different datasets and I've never had this issue before while using MCMCtree. I've tried rerunning these iterations to no avail. Upon examination of the mcmc output, it looks like some nodes were not estimated for some iterations and other iterations have too many values. Either that or the missing estimates were appended to another generation. The posterior is too large to attach, so if you need to see it, I can share via google drive.


Does anyone have any idea what's going on here and how to fix it? Any help would be greatly appreciated.


- Skip

tianhua liao

unread,
Feb 27, 2020, 3:20:15 AM2/27/20
to PAML discussion group

I guess it might because of the rerunning. 

The MCMCtree would not deleted mcmc.txt at first if it exists previously. It will directly write into the file line by line. 

From the error information, I guess previous running have 112 variable output at the first line of mcmc.txt. But then your rerun it without delete the mcmc.txt file. When the program finished, it want to summarize the mcmc.txt and get a output file. But at the line 9002, it found 224 columns maybe? 
The 224 seems like the twice times of 112. It might be the mistake of the line break?
I am not sure, just my guess.

Skip

unread,
Feb 27, 2020, 2:31:16 PM2/27/20
to PAML discussion group
Tianhua,

Thanks, but I always rerun my MCMCtree analyses in a new directory, so there are not files to write over. Furthermore, I have this problem on the first run.

Ziheng

unread,
Apr 4, 2020, 12:04:46 PM4/4/20
to PAML discussion group
This does sound like some problems with the file, and indeed it is curious that 224 is twice 112.  the error message is saying that you have 112 variables, but on line 9002, 224 are found.  in theory the mcmc sample file should have the same number of values or variables on each line.
can you use small values for nsample etc. to do short mcmc runs, and see whether the problem persists.
if you can't figure it out, you can send me the three data files for me to take a look: the control file, sequence data file, and tree file.  if you use in.BV, please include that as well.  also mention the version number.
ziheng

Reply all
Reply to author
Forward
0 new messages