View source: R/calculate-dosage.R
convert.alleles.to.pgs.dosage | R Documentation |
Convert genotype calls in the form of witten out alleles (e.g. 'A/T') to dosages (0, 1, 2) based on provided risk alleles from a PGS.
convert.alleles.to.pgs.dosage(called.alleles, risk.alleles)
called.alleles |
A vector of genotypes in allelic notation separated by a slash or pipe. |
risk.alleles |
A vector of risk alleles from a polygenic score corresponding to each genotype (by locus) in called.alleles. |
A vector of dosages corresponding to each genotype in called.alleles. Hemizygous genotypes (one allele e.g. 'A') are counted as 1.
called.alleles <- c('A/A', 'A/T', 'T/T');
risk.alleles <- c('T', 'T', 'T');
convert.alleles.to.pgs.dosage(called.alleles, risk.alleles);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.