align.snpdata.coding(params, snpdata, ploidy = 2, missing.snp = "fail")ploidy-x.$params and $snpdata slots, contain the
input arguments with additional columns. The input params has
an extra
column data.coded.freq and the input snpdata$data has
extra column(s) for doses of the specified coded alleles.
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
cannot find.
The 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
chromosome).
The 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.
data(mthfrex)
"rs1537514_G" %in% names(mthfrex$data) # FALSE
mthfrex <- align.snpdata.coding(mthfr.params, mthfrex)$snpdata
"rs1537514_G" %in% names(mthfrex$data) # TRUE
Run the code above in your browser using DataLab