mlandistest / code

2 stars 0 forks source link

pathSampler & steppingStoneSampler "del" arguments, problems in MarginalLikelihoodEstimator with parsing columns [sf#12] #12

Open mlandis opened 10 years ago

mlandis commented 10 years ago

Reported by tracyh on 2014-07-01 23:41 UTC Both the pathSampler and steppingStoneSampler (in Rev language) functions require a delimiter argument for the power posterior file. The delimiter for the powerPosterior file is hard coded to be "\t". However, when you set del="\t" for either of the sampler functions, the MarginalLikelihoodEstimator constructor does not parse the columns correctly (returned from StringUtilities::stringSplit). It does work when you search/replace the "\t" for " " in the power posterior file and set del=" " for the sampler functions.

So the StringUtilities::stringSplit function may have a bug when del="\t" (I have not yet checked this because Xcode just crashed). Also, if the sampler functions require the user to set del, then it should be possible to change del in the power posterior constructor in Rev. If it will always be "\t", then it doesn't make sense to have the constructors for pathSampler & steppingStoneSampler to take the del argument.