Closed mahideel closed 5 years ago
Hi Novia,
it looks like the number of samples, ie individuals that you want to simulate data for, the N in getCausalSNPs exceeds the number of individuals in your genotype file specified by genoFilePrefix-genoFileSuffix.
Can you check if that is the case?
Hi Novia,
I also just realised, that the question you were asking, was not related to the error you were seeing. You specified the randomly chosen number of causal chromosomes and SNPs correctly with specifying NrChrCausal and cNrSNP.
Let me know if you need further clarification.
Hi Hannah,
Thanks for your reply. To clarify, you think there's a mismatch in my command and the genotype file? It's been awhile so I'll go back and check.
Yes, you are asking for 2000 samples to be simulated from your genotype data, but you only have 1000 samples in the genotype file.
Ah I see. I will go back and check. I thought my genotype file has 2000 samples - hence me baffled why the error kept popping up. Many thanks again for your help.
I am closing this now, let me know if you have additional questions about this.
Hi Hannah,
Is there any maximum number of NrCausalChr that PhenotypeSimulator can take? For my simulation, I need to compare different sizes of causal SNPs and causal chromosomes, and ideally the causal SNPs would be picked up arbitrarily from the causal chromosomes without me specifying which chromosomes to draw them from. Is this even possible?
This is my command: trial1strong <- runSimulation(N=2000, P=1, genoFilePrefix = genoFilePrefix, genoFileSuffix = genoFileSuffix, genoDelimiter=" ", cNrSNP = 10, NrChrCausal = 10, distBetaGenetic = "norm", mBetaGenetic = 1, sdBetaGenetic = 0.99, genVar = 0.1, h2b = 0, theta = 0, phi=1, pIndependentGenetic=1, verbose=TRUE, sampleID="id1", format="oxgen") Set seed: 219453
And this is the error: Error in getCausalSNPs(N = N, NrCausalSNPs = cNrSNP, chr = chr, NrChrCausal = NrChrCausal, : Sample number specified exceeds number of genotypes provided
Any idea on what does " Sample number specified exceeds number of genotypes provided" refer to? My sample is 2000 and I have 350,000 SNPs. Any help is much appreciated.
Many thanks in advance. Novia