Description Usage Arguments Value Author(s)

Given a vector of minor-allele frequencies (maf) for a number of markers and a number of markers to assign an effect to, the function randomly selects N markers below or above provided maf threshold (default 1 from Beta distribution with given parameters so that the magnitude of the effect depends on the allele frequency. Desired fraction of the effects will be negative. Monomorphic markers with 'maf = 0' will be automatically excluded from sampling!

1 2 3 4 5 6 7 8 9 10 | ```
get_effects(
maf,
N,
get_betas_fun = dbeta,
get_betas_args = list(shape1 = 1, shape2 = 25),
thr = 0.01,
rare = T,
frac_negative = 0,
seed = F
)
``` |

`maf` |
- vector of minor-allele frequencies |

`N` |
- number of markers to be assigned an effect |

`get_betas_fun` |
- name of a function for getting Beta parameters given a vector x of MAFs. |

`get_betas_args` |
- a list with additional function parameters for the function defined in 'get_betas' |

`thr` |
- threshold for maf. All markers with maf <= thr will be treated as rare. |

`rare` |
- a boolean, if TRUE, markers below and equal to the 'thr' will be sampled, i.e. the rare variants |

`frac_negative` |
- fraction of effects to be set to negative |

`seed` |
- set seed for sampling, if FALSE, default 'sample' seed will be used |

a list with two elements: 'marker_idx' is a vector of indices of the markers assigned an effect and 'effects' is a vector of effects, one for each marker

Marcin Kierczak <marcin.kierczak_NO_SPAM_scilifelab.se>

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.