uqrmaie1 / admixtools

https://uqrmaie1.github.io/admixtools
71 stars 14 forks source link

slice_sample error in find_graphs #45

Open rossibarra opened 1 year ago

rossibarra commented 1 year ago

In running find_graphs() I regularly get this slice_sample error. It is not always after the first graph, and sometimes it runs through to completion with no error with exactly the same command/f2/etc. I note that I can calculate f4 stats, use qpgraph to estimate edges/admixtures, and qpgraph_resample_multi to compare trees all with no problem with the same set of populations and f2_blocks.

> bob<-find_graphs(
+            f2_blocks,
+            max_admix=5,
+            outpop="diploperennis",
+            verbose=TRUE
+          ) %>% slice_min(score, with_ties = FALSE)
✔ 1: score 338.978  best score 338.978  none    tot 1
Error in `slice_sample()`:
! `n` must be a round number, not the number 3.5.
uqrmaie1 commented 1 year ago

Thanks for pointing this out, it should be fixed now!