powered by
Compute allele frequencies from genotype data.
getAlleleFrequencies(snp)
[N x 1] Vector of length [N] samples with genotypes of a single bi-allelic genetic variant/SNP encoded as 0,1 and 2.
Vector with ref (0-encoded) and alt (1-encoded) allele frequencies.
# NOT RUN { # create snp vector with minor allele frequency 0.3 snp <- rbinom(200, 2, 0.3) allelefreq <- getAlleleFrequencies(snp) # }
Run the code above in your browser using DataLab