Learn R Programming

SPA3G (version 1.0)

WEIGHT_maf:

Returns minor allele frequency based weights

Description

WEIGHT_maf calculates a weighting scheme based on the minor allele frequency: 1/sqrt(maf)

Usage

WEIGHT_maf(G)

Arguments

G
matrix: genotypes data with columns as samples and rows as SNP markers

Value

Examples

Run this code


## The function is currently defined as
function (G) 
{
    qs <- apply(G, 1, sum)/nrow(G)
    return(1/sqrt(qs))
}

Run the code above in your browser using DataLab