Git Product home page Git Product logo

Comments (6)

JiscaH avatar JiscaH commented on July 17, 2024 1

Hi Oliver,
I found the issue, and it's definitely fixed now!
Cheers,
Jisca

from sequoia.

JiscaH avatar JiscaH commented on July 17, 2024

Hi Oliver,

Thanks for the bug report! The ones that only give problems for a few specific parameter combinations, and then only in a small proportion of replicates, are by far the hardest to find & fix.

I'll go over the code to see if I can spot the problem, but since this error is generated by a low-level function that's called nearly a hundred times in the Fortran code, I am not 100% sure that that will work. Could you perhaps email me the parameters / input / markdown chunk you used? I.e. enough info so that I can run it a few hundred times until it hits the error?

Cheers,
Jisca

from sequoia.

OliverPStuart avatar OliverPStuart commented on July 17, 2024

Hi Jisca,

I reran my code and modified to print out the genotype matrix, life history table and original pedigree for that iteration of the loop. Here is a set of inputs that produces the same error:
temp_life_hist.txt
temp_test_geno.txt
temp_test_ped.txt

The pedigree file is randomly generated with a certain amount of asexual reproduction. As such, there are individuals with only one parent. The founder's genotypes are from real individuals, then I take those and make new offspring genotypes based on the pedigree. The pedigree file has some additional information that is used in making new genotypes. In this case, there are quite a few asexually reproduced individuals in the pedigree and there are 7 generations post-founding. However, the first time I encountered this error, it was a shallow pedigree with only one or two asexually reproduced individuals.

Here is the command that produces the error from these inputs.

sequoia_out <- sequoia(GenoM=test_ped_genotypes,
                                          LifeHistData=life_hist_sim,
                                          Module="ped",
                                          Tfilter = -5,
                                          quiet=T,
                                          args.AP=list(Discrete = TRUE))

Best,
Ollie

Edit: here's another set of input files that consistenly produce the error
temp_test_geno2.txt
temp_life_hist2.txt
temp_test_ped2.txt

from sequoia.

JiscaH avatar JiscaH commented on July 17, 2024

Hi Oliver,

I've put an updated version of the package on here, but it is not a complete fix.

I have been getting the same error occasionally during the simulations I always run before uploading a new version to CRAN. It's the same issue as you had: I got an error but by default don't save the simulated genotypes; I just ran the same parameter combinations 200 times without getting the error again.

I'll let you know when I have a (hopefully) definite complete fix.

Cheers,
Jisca

from sequoia.

OliverPStuart avatar OliverPStuart commented on July 17, 2024

Thanks for that Jisca.

If it's any help, it appears to be a deterministic problem with specific simulated data. That is to say, re-running the program with the same input data always produces the error for me.

Is the installation method for the recently updated version any different to what is listed on the README file? I am trying remotes::install_github("JiscaH/sequoia", ref="stable") but it is not working:

Error in utils::download.file(url, path, method = method, quiet = quiet,  : 
  cannot open URL 'https://api.github.com/repos/JiscaH/sequoia/tarball/stable'

Best,
Ollie

from sequoia.

JiscaH avatar JiscaH commented on July 17, 2024

Hi Oliver,

Installation without 'ref="stable" ' should work!

And sequoia is fully deterministic - same input always gives same output. But with some bugs (esp. subscript out of array bounds), whether or not it gives an error may very rarely depend on the data you ran before, unless you use special debugging tools.

from sequoia.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.