snipar.scripts.simulate module

Simulates genotype-phenotype data using forward simulation. Phenotypes can be affected by direct genetic effects, indirect genetic effects (vertical transmission), and assortative mating.

Args:
‘-h’, ‘–help’, default===SUPPRESS==

show this help message and exit

: int

Number of causal loci

: float

Heritability due to direct effects in first generation

: str

Prefix for simulation output files

‘–bgen’str

Address of the phased genotypes in .bgen format. If there is a @ in the address, @ is replaced by the chromosome numbers in the range of chr_range for each chromosome (chr_range is an optional parameters for this script).

‘–chr_range’

number of the chromosomes to be imputed. Should be a series of ranges with x-y format or integers.

‘–nfam’int

Number of families to simulate. If inputting bgen and not given, will be one half of samples in bgen

‘–min_maf’float, default=0.05

Minimum minor allele frequency for simulated genotyped, which will be simulted from density proportional to 1/x

‘–maf’float

Minor allele frequency for simulated genotypes (not needed when providing bgen files)

‘–n_random’int

Number of generations of random mating

‘–n_am’int

Number of generations of assortative mating

‘–r_par’float

Phenotypic correlation of parents (for assortative mating)

‘–v_indir’float

Variance explained by parental indirect genetic effects as a fraction of the heritability, e.g 0.5

‘–r_dir_indir’float

Correlation between direct and indirect genetic effects

‘–beta_vert’float

Vertical transmission coefficient

‘–save_par_gts’

Save the genotypes of the parents of the final generation

‘–impute’

Impute parental genotypes from phased sibling genotypes & IBD

‘–unphased_impute’

Impute parental genotypes from unphased sibling genotypes & IBD

Results:

genotype data in .bed format; full pedigree including phenotype and genetic components for all generations

snipar.scripts.simulate.main(args)[source]

“Calling this function with args is equivalent to running this script from commandline with the same arguments. Args:

args: list

list of all the desired options and arguments. The possible values are all the values you can pass this script from commandline.