geneContribution {GeneticsPed} | R Documentation

## Gene contribution or proportion of genes in pedigree by individual

### Description

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

### Usage

    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

      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)

[Package GeneticsPed version 1.48.0 Index]