View source: R/chrom.fitness.score.R
chrom.fitness.score | R Documentation |
This function assigns a fitness score to a chromosome. It is a wrapper for the Rcpp function chrom_fitness_score.
chrom.fitness.score( case.genetic.data, complement.genetic.data, target.snps, ld.block.vec, weight.lookup, n.different.snps.weight = 2, n.both.one.weight = 1, recessive.ref.prop = 0.75, recode.test.stat = 1.64, epi.test = FALSE )
case.genetic.data |
The genetic data of the disease affected children
from case-parent trios or disease-discordant sibling pairs. If searching for
maternal SNPs that are related to risk of disease in the child, some of the
columns in |
complement.genetic.data |
A genetic dataset for the controls
corresponding to the genotypes in |
target.snps |
An integer vector of the columns corresponding to the collection of SNPs, or chromosome, for which the fitness score will be computed. |
ld.block.vec |
An integer vector specifying the linkage blocks of the
input SNPs. As an example, for 100 candidate SNPs, suppose we specify
|
weight.lookup |
A vector that maps a family weight to the weighted sum of the number of different SNPs and SNPs both equal to one. |
n.different.snps.weight |
The number by which the number of different SNPs between a case and complement/unaffected sibling is multiplied in computing the family weights. Defaults to 2. |
n.both.one.weight |
The number by which the number of SNPs equal to 1 in both the case and complement/unaffected sibling is multiplied in computing the family weights. Defaults to 1. |
recessive.ref.prop |
The proportion to which the observed proportion of informative cases with the provisional risk genotype(s) will be compared to determine whether to recode the SNP as recessive. Defaults to 0.75. |
recode.test.stat |
For a given SNP, the minimum test statistic required to recode and recompute the fitness score using recessive coding. Defaults to 1.64. |
epi.test |
A logical indicating whether the function should return the
information required to run function |
A list:
The chromosome fitness score.
The weighted mean difference vector corresponding to the chromosome, with each element divided by it's pseudo-standard error. The magnitudes of these values are not particularly important, but the sign is useful. A positive value for a given SNP indicates the minor allele is positively associated with disease status, while a negative value implies the reference (‘wild type’) allele is positively associated with the disease.
The number of cases with a risk-related genotype at each locus over the total number of cases or controls that have a full set of risk genotypes at each locus, among families where only one of the case or control has the full risk set.
A vector indicating the number risk alleles a case
or complement must have for each SNP in target.snps
for the case or
complement to be classified as having the proposed risk set. '1+' indicates
at least one copy of the risk allele is required, while '2' indicates 2
copies are needed. The risk allele can be determined based on the signs of
the elements of sum_dif_vecs
, where a negative value indicates the
major allele for a given SNP is the risk allele, while a positive value
implicates the minor allele.
An integer vector of the informative family rows.
Only returned if epi.test
= TRUE.
data(case) data(dad) data(mom) case <- as.matrix(case) dad <- as.matrix(dad) mom <- as.matrix(mom) comp <- mom + dad - case weight.lookup <- vapply(seq_len(6), function(x) 2^x, 1) storage.mode(weight.lookup) <- "integer" block.ld.vec <- cumsum(rep(25, 4)) chrom.fitness.score(case, comp, c(1, 4, 7), block.ld.vec, weight.lookup)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.