timothyfrasier / related

8 stars 7 forks source link

Conductiong simulations crashes the R kernel #8

Open ltalignani opened 2 years ago

ltalignani commented 2 years ago

Dear Dr Frasier, I try to conduct simulations with a large dataset (1142 individuals). I followed your tutorial on the manual and use the commands: input <- readgenotypedata("ag1000g.3LR.GT.data.txt") sim <- familysim(input$freqs, 100) So far, everything is working well: the allele frequencies are well calculated and a dataframe is correctly generated. But when I'm trying output <- coancestry(sim, wang=1) the R kernel crashes and restart. I tried to downsample to 200 individuals and 100 SNPs, but I have the same problem. I add my input file; maybe there is a problem with it, not sure because when I calculate the coancestry with my individuals directly, I have no problems and I get a dataframe with the calculated relatedness.

Regards

ag1000g.3LR.200IDs.100SNPS.txt

timothyfrasier commented 2 years ago

Hi: Thank you for providing an example file. I tried running your commands on my computer (using the file you provided and the correct file name) and it ran fine (i.e., no crashing). That makes me think that it is a memory issue. Unfortunately, this is not uncommon. I wrote this package thinking of microsatellite data sets, and unfortunately some of the code does not scale well. That does not solve your problem though. Do you have a computer/server with more memory that you could run your analyses on?