christianparobek / skeleSim

Null models, performance testing, and power estimation with population simulations
3 stars 6 forks source link

nrep<1 error in analysis.funcs #28

Closed stranda closed 8 years ago

stranda commented 8 years ago

Hi All,

Error in if (nrep < 1) keep.null <- FALSE : argument is of length zero

I get this when running rmetasim and microsatellite loci. It seems to be occurring in the analysis funcs, but I can't actually find this test in any of the codebase. Must be a result of class conformation tests?

EricArcher commented 8 years ago

This looks like a strataG thing. Would you make sure you've pulled the latest version and let me know if you get it again.

stranda commented 8 years ago

Have you made changes in the past two hours? I pulled new strataG, apex, hierfstat, and swfscMisc two hours ago.

EricArcher commented 8 years ago

no I haven't, so I should be able to find and fix this. I'll take a quick look after the telcon.


Eric Archer, Ph.D. Southwest Fisheries Science Center NMFS, NOAA 8901 La Jolla Shores Drive La Jolla, CA 92037 USA 858-546-7121 (work) 858-546-7003 (FAX)

Marine Mammal Genetics Group: swfsc.noaa.gov/mmtd-mmgenetics ETP Cetacean Assessment Program: swfsc.noaa.gov/mmtd-etp

"

The universe doesn't care what you believe. The wonderful thing about science is that it doesn't ask for your faith, it just asks for your eyes." - Randall Munroe

"Lighthouses are more helpful than churches."

On Wed, Mar 9, 2016 at 12:56 PM, stranda notifications@github.com wrote:

Have you made changes in the past two hours? I pulled new strataG, apex, hierfstat, and swfscMisc two hours ago.

— Reply to this email directly or view it on GitHub https://github.com/christianparobek/skeleSim/issues/28#issuecomment-194503771 .

stranda commented 8 years ago

I've added a selection in the ui for this parameter (general parameters tab). It is set to 1 by default. No longer dies

smhoban commented 8 years ago

Awesome!

On Wed, Mar 16, 2016 at 2:42 PM, stranda notifications@github.com wrote:

I've added a selection in the ui for this parameter (general parameters tab). It is set to 1 by default. No longer dies

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/christianparobek/skeleSim/issues/28#issuecomment-197510028

Sean Hoban Tree Conservation Biologist The Morton Arboretum http://www.mortonarb.org/ 4100 Illinois Rt 53, 3rd Floor Research Bldg, room 324, Lisle, IL 630-719-2419

New publications!! Accounting for the nested nature of genetic variation http://onlinelibrary.wiley.com/doi/10.1111/oik.02760/abstract Oikos 2016 Exploring seaweed population dynamics http://onlinelibrary.wiley.com/doi/10.1111/jpy.12366/abstract Journal of Phycology 2016 Loci under selection in expanding tree populations http://onlinelibrary.wiley.com/doi/10.1111/mec.13234/abstract Molecular Ecology 2015 Designing optimal seed collection protocols http://www.sciencedirect.com/science/article/pii/S0006320715001767 Biological Conservation 2015 Using ABC to understand invasive species establishment http://www.nature.com/hdy/journal/vaop/ncurrent/full/hdy201538a.html Heredity 2015

research webpage: http://sites.google.com/site/hoban3/ ResearchGate Profile: http://www.researchgate.net/profile/Sean_Hoban/ food blog: http://cuisineraveclevin.blogspot.it/ blog about invasive species: http://invasivore.org/

EricArcher commented 8 years ago

It should also work being set to 0 (no p-values calculated). I think I fixed strataG so it would have this behavior. NULL should produce the same result. I haven't sat down to set up the Shiny GUI recently, so could someone check this out?

christianparobek commented 8 years ago

I think this is related to a problem I'm running into (just pulled latest commits, but this was a problem before too). Under General Conf, in the "Number of simulation reps box" (this is what you all are talking about in this issue, right?), you're right Eric, I can now set it to 0, and it's fine with that. However, anytime that there is not a number in the box (for example, I delete the 1 so I can type 2), the interface crashes with this error:

Warning: Error in <Anonymous>: assignment of an object of class “logical” is not valid for @‘num.reps’ in an object of class “skeleSim.params”; is(value, "intOrNum") is not TRUE
Stack trace (innermost first):
    65: <Anonymous>
    64: observeEventHandler [make-skelesim-class.R#38]
     2: runApp
     1: skeleSimGUI
EricArcher commented 8 years ago

Christian, this is the skeleSim@num.rep slot which sets the number of simulation replicates. For the sake of clarity, I have changed it to @num.sim.rep in the skeleSim class and the code it is referenced in. I also wrapped it in as.numeric() to keep a blank from being treated as a logical in the shiny GUI. I don't get an error now.