geneContribution         package:GeneticsPed         R Documentation

_G_e_n_e _c_o_n_t_r_i_b_u_t_i_o_n _o_r _p_r_o_p_o_r_t_i_o_n _o_f _g_e_n_e_s _i_n _p_e_d_i_g_r_e_e _b_y _i_n_d_i_v_i_d_u_a_l

_D_e_s_c_r_i_p_t_i_o_n:

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

_U_s_a_g_e:

     geneContribution(x, relative=TRUE)

_A_r_g_u_m_e_n_t_s:

       x: pedigree

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

_V_a_l_u_e:

     Gene contribution values i.e. higher the values higher the
     contribution of genes by particular subject 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 subject. With
     'relative=TRUE', values represent the same result as ratios to all
     individuals in the pedigree. Value 0 indicates that subject did
     not pass its genes to next generations.

_A_u_t_h_o_r(_s):

     Gregor Gorjanc

_S_e_e _A_l_s_o:

     'Pedigree'

_E_x_a_m_p_l_e_s:

       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)

