tgvaughan / TransmissionChainAnalyses

Scripts needed to reproduce phylodynamic analyses from Nadeau et al. 2021.
GNU General Public License v3.0
2 stars 0 forks source link

Error in UseMethod("pivot_longer") #2

Closed liamxg closed 3 months ago

liamxg commented 4 months ago

Dear @tgvaughan,

When I run postprocessing.R file for CH, it printed as below:

image
tgvaughan commented 3 months ago

Hi Liam, the error must be before this: pivot_longer is being given an empty object. Are there any other errors?

liamxg commented 3 months ago

Hi @tgvaughan,

no error, but there are also no outputs. The figures is empty.

image
tgvaughan commented 3 months ago

Have you followed the instructions at the top of the script? Namely, certain files must already be available. It might help to evaluate the script in a piecewise manner within the interpreter.

liamxg commented 3 months ago

Yes, I have run all the 4 steps. But no figures are generated yet.

tgvaughan commented 3 months ago

I now see that you mentioned that the results directory is empty. The beast 2 analyses should have filled that directory with results of the MCMC runs. Can you please confirm that you've run beast without error? If this hasn't been done, this is likely the source of the problem. (Note that, as described in the README.md file, figures are left in the figures directory, not results.)

liamxg commented 3 months ago

sorry, the results file are all log files, please see below:

image
liamxg commented 3 months ago

However, the figures file is empty:

image
tgvaughan commented 3 months ago

The script expects a particular particular log file name format: Re_skyline.{max,min}_chains.sampUB{0.05,1.0}.*.log. I don't think the log files you have currently in results follow this format? (What is the 1000 following Re_skyline?)

liamxg commented 3 months ago

Dear @tgvaughan, very sorry to cause you confusion.

I changed the chain length to 1000 so it be used more short time to finish runs.

tgvaughan commented 3 months ago

Hi Liam, for the figure generation it doesn't matter too much what the chain length is (although 1000 is extremely short and will likely just contain nonsense; you'll need a few million steps at least). What is a problem is that you've modified the filename format to include this number. I'd revert this format to its original value and try again.

liamxg commented 3 months ago

Dear @tgvaughan,

Thanks again for your tips, now four figures are generated, please see below:

image
tgvaughan commented 3 months ago

Fantastic! I will now close this issue.

liamxg commented 3 months ago

Thanks, please.