Description Usage Arguments Details Value Author(s) Examples
The input parameterisation specify a desired coded allele for each SNP. This function examines the coded and noncoded alleles used in the input genotype data, and for each SNP where the the input genotype data are encoded as the dose of the opposite (desired noncoded allele) allele, an additional column is added to the output genotype data with the dose of the desired coded allele.
align.snpdata.coding(params, snpdata, ploidy = 2, missing.snp = "fail")
a data frame, see gtx.params.
a list with snpinfo and data, see snpdata.
if dosage for the noncoded allele is x, the dosage
for the coded allele is calculated as
character, either "fail" or "okay".
The PLINK convention of calling the coded allele “0” for monomorphic SNPs is handled transparently, by assuming that the absent allele in the input genotype data matches whatever allele in the desired parameterisation does not match the present allele in the input genotype data. This behaviour should not cause inadvertent strand flips.
You should not need to call this function, unless you are intending to
grs.onesnp.apply without calling
grs.make.scores first. Note that
grs.onesnp.apply has no way to check whether columns for
desired coded alleles are present and may return NA for codes it
ploidy argument defaults to 2, but should be set to 1 if
the input genotype data are haplotypes (either phased or male X or Y
missing.snp argument controls how to handle SNPs in the
desired paramterisation that are not present in the input genotype
data. If "okay" then SNPs listed in the desired parameterisation but
not present in the input genotype data are assumed to have dosage zero
for all individuals.
This function is one of the main computational bottlenecks and should be aggresively optimised in future releases.
$snpdata slots, contain the
input arguments with additional columns. The input
data.coded.freq and the input
extra column(s) for doses of the specified coded alleles.
Toby Johnson Toby.x.Johnson@gsk.com
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.