geneContribution: Gene contribution or proportion of genes in pedigree by...

Description Usage Arguments Value Author(s) See Also Examples

Description

geneContribution calculates gene contribution as proportion of genes in pedigree by individual with higher number of descendants will have higher values.

Usage

1
geneContribution(x, relative=TRUE)

Arguments

x

pedigree

relative

logical, should results be presented relative to number of individuals in the pedigree

Value

Gene contribution values i.e. higher the values higher the contribution of genes by particular individual in the pedigree. When relative=FALSE, values represent number of individuals (in conceptually additive manner i.e. 0.5 + 0.75 = 1.25 individual) in the pedigree that carry genes of a particular individual. With relative=TRUE, values represent the same result as ratios to all individuals in the pedigree. Value 0 indicates that individual did not pass its genes to next generations.

Author(s)

Gregor Gorjanc

See Also

Pedigree

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  ped <- generatePedigree(nId=5, nGeneration=4, nFather=1, nMother=2)
  geneContribution(ped)
  geneContribution(ped, relative=FALSE)
  ## geneContribution(ped[5:15, ]) ## needs [ method

  ## More than one father example
  ped <- data.frame(     id=c(1, 2, 3, 4, 5, 6, 7),
                    father1=c(0, 0, 0, 2, 1, 1, 2),
                    father2=c(0, 0, 0, 0, 0, 2, 0),
                     mother=c(0, 0, 0, 0, 3, 3, 3),
                    generat=c(1, 1, 1, 2, 2, 2, 2))
  ped <- Pedigree(ped, ascendant=c("father1", "father2", "mother"),
                  ascendantSex=c(1, 1, 2), ascendantLevel=c(1, 1, 1),
                  unknown=0, generation="generat")
  geneContribution(ped)


Search within the GeneticsPed package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.