christianparobek / skeleSim

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

Shiny bad behavior #48

Closed MichelleDBG closed 8 years ago

MichelleDBG commented 8 years ago

I've had this problem on Windows. I try to change values in shiny boxes and they keep reverting back to the default or previous number. I'm currently trying to change the "Num. Alleles per locus..." following Sean's forecasting example and I can't get the locus value to stay at 5 or 8, they're jumping between 1 and 5... or not changing at all. Anyone else having this issue? Any fixes?

stranda commented 8 years ago

Not sure I've seen this. I have seen a race condition where you change the number of something really fast and then the software then gets into a loop-like situation. I didn't know it was happening with loci. I can change the locus input to mirror population number input where I saw the problem initially.

stranda commented 8 years ago

I made the change that I mentioned, but I'm not certain I fixed the problem you are talking about.

MichelleDBG commented 8 years ago

I have installed the changes and still have the loop-like problem. In Scenario Conf I can't change Migration Matrix numbers. It won't keep the number of loci... Then the Rmetasim Params locus details jumps from 1 allele to the amount I tried to enter and won't let me change the number of alleles per locus.

stranda commented 8 years ago

In every case, are you dealing with matrix or vector-like input? I just tried it on windows and found that I had to highlight the number in a cell and then type the new number. Backspace does not seem to work. Also the numbers in the migration matrix are only editable when model=user is selected.

Am I still missing the problem?

On Thu, Apr 21, 2016 at 12:47 PM, Michelle DePrenger-Levin < notifications@github.com> wrote:

I have installed the changes and still have the loop-like problem. In Scenario Conf I can't change Migration Matrix numbers. It won't keep the number of loci... Then the Rmetasim Params locus details jumps from 1 allele to the amount I tried to enter and won't let me change the number of alleles per locus.

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

MichelleDBG commented 8 years ago

I am having the problem with all input including the drop down - so I'd say yes to matrix and vector-like input. Trying to switch to 'user' and it's jumping/looping between user and island.

I was double clicking + backspace but now trying to highlight and type new number. That results in the same looping problem.

Maybe I need to update another package? Maybe I need to update R (I'm on 3.2.3)? Maybe my computer is too slow to keep up?

stranda commented 8 years ago

Hey Michelle, Finally got things set up on windows 7 and was easily able to replicate the problems you are having. I think I fixed it for the numpops and numloci parts of the scenario tab. Would you mind reinstalling and checking?

MichelleDBG commented 8 years ago

I'm in the field so downloaded everything new to the field laptop. It seems to be fixed! Yay, thanks Allan!

stranda commented 8 years ago

Cool beans, but I'm going to leave this one open/unresolved until you test on your other machine.

MichelleDBG commented 8 years ago

Good call on waiting. On my machine back in the office it started out nice but seems to be back in a loop. The 'set root directory' was way faster than normal.

I seemed to be ok setting General Conf things. Once I got to changing the Migration Model and Type of locus it started the loop - island to user and back, -sequence to microsatelite and back, and Number of loci from 1 to 100 (100 corresponding to the sequence length that is looping back and forth).

Now that it's in a loop, I can't change any Population characteristics or Among pop... or Locus char...

stranda commented 8 years ago

Though that sux, it makes me think I better understand the problem will take a hack tonight or tomorrow Thanks, a. On Fri, Apr 29, 2016 at 3:35 PM, Michelle DePrenger-Levin < notifications@github.com> wrote:

Good call on waiting. On my machine back in the office it started out nice but seems to be back in a loop. The 'set root directory' was way faster than normal.

I seemed to be ok setting General Conf things. Once I got to changing the Migration Model and Type of locus it started the loop - island to user and back, -sequence to microsatelite and back, and Number of loci from 1 to 100 (100 corresponding to the sequence length that is looping back and forth).

Now that it's in a loop, I can't change any Population characteristics or Among pop... or Locus char...

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

MichelleDBG commented 8 years ago

My computer is slow - it takes a while to populate the "Population characteristics" tab. This time I'm not changing the Migration Model first or the type of locus. I can change the populations sizes without it looping. To try to put in 'Locus characteristics' I've got to change from sequence to microsat to see if I can change locus sizes. I can switch to microsatellite and increase the number of loci with no looping (in this order) and then I can change the 'num. Alleles per locus...' at first... then it started looping. But only the num of alleles, the scenario conf things are stable. I can change from 'island' to 'user' and that's not looping (in this order), just number of alleles. The first four loci looped a few times and seem to have stopped so now only the last one I tried to change is looping and I can't change any more - it's now stuck.

stranda commented 8 years ago

Perfect. I'm pretty sure that I know the fix that is needed. Thanks, a. On Fri, May 6, 2016 at 11:43 AM, Michelle DePrenger-Levin < notifications@github.com> wrote:

My computer is slow - it takes a while to populate the "Population characteristics" tab. This time I'm not changing the Migration Model first or the type of locus. I can change the populations sizes without it looping. To try to put in 'Locus characteristics' I've got to change from sequence to microsat to see if I can change locus sizes. I can switch to microsatellite and increase the number of loci with no looping (in this order) and then I can change the 'num. Alleles per locus...' at first... then it started looping. But only the num of alleles, the scenario conf things are stable. I can change from 'island' to 'user' and that's not looping (in this order), just number of alleles. The first four loci looped a few times and seem to have stopped so now only the last one I tried to change is looping and I can't change any more - it's now stuck.

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

stranda commented 8 years ago

Can you reinstall from github? I've changed a lot of code that updates the entry fields and think that it helps

MichelleDBG commented 8 years ago

I reinstalled. It's slow and still gets into a loop but that eventually stops, mostly from waiting and/or selecting other tabs. But, when I run the simulation I still have 'NULL' in slots: rep.result, analysis.results, summary.results ... Where should I find results? I'm not sure how to troubleshoot the problem. If i try

> runSim(ssClass)
title.not.null at.least.1.rep 
          TRUE           TRUE 
                       [,1] [,2]
dem.matr.same.dims     TRUE TRUE
freqs.leng.num.alleles TRUE TRUE
nall.leng.num.loci     TRUE TRUE
afrqs.leng.num.loci    TRUE TRUE
mut.leng.num.loci      TRUE TRUE
nsizes.eq.npops        TRUE TRUE
nsamps.eq.npops        TRUE TRUE
at.lst.1.pop           TRUE TRUE
at.lst.1.loc           TRUE TRUE
at.lst.1.samp          TRUE TRUE
mut.rate.ok            TRUE TRUE
mig.fmt                TRUE TRUE
is.mig.square          TRUE TRUE
mig.btwn.0.1           TRUE TRUE
mig.diag.eq.0          TRUE TRUE

parameter check complete

Error in combinations(h, s, 1:h)[h:1, ] : subscript out of bounds
stranda commented 8 years ago

Try the newest version on github. I've definitely fixed the 'Error in combinations...' bug, and still making changes to avoid races