Simulate SNP for all subjects and liabilities for family
G_func_fam.Rd
The function creates a bigsnpr object, saves it in a rds file and fills the file backed matrix generated with genotypes for each subject. The function also returns the genetic liabilities for the parents of the subject since the parents genotypes are not saved. The liabilities for the parents is therefore calculated in the same loop as the genotypes is simulated.
Arguments
- filename
Filename for file backed matrix(FBM) and rds file.
- beta
A vector containing the casual effect of each SNP.
- MAF
A vector containing minor allele frequencies.
- N
Amount of subjects.
- M
Amount of SNPs.
- block_size
Size of FBM to be processed in each iteration.
- n_sibs
Amount of siblings.