Sib-pair Command: kinship


ClassAnalysis and data manipulation command
Namekinship
Arguments [inbreeding [mc] [<quantitative trait>|
pairwise|write|dominance|roadtrips|
<binary trait> [==|^= <value>] | (<quantitative trait> >|>=|<|<=|==|^= <threshold>)]

Write the numerator relationship matrix (matrix of coefficients of relationship) for each pedigree in a lower triangular form or as a list of pairs (pairs). In the latter case, the coefficient of fraternity is also printed, along with an indicator as to whether a pair are full sibs. When the dominance keyword is present, a pairwise list is printed of bilineally-related pairs (defined as K>0) that are not full sibs.

Alternatively, if requested (inbreeding), print a list of individuals with a non-zero inbreeding coefficient (using a Monte Carlo estimator if the mc modifier is present). Further, if a quantitative trait is nominated, the inbreeding coefficient for each individual is saved to that variable.

If a binary trait is specified, the NRM is only for the affecteds if plevel=1. The "Delta7" (Δ7) matrix is also printed, along with a list of inbred cases and "sporadic" cases -- affected individuals who are not genetically related to any other case in that pedigree (eg marry-ins with no affected descendants).

For plevel=0, only a summary for each pedigree is printed: number of affecteds, number of "sporadic" cases, mean coefficients of relationship for affected relative pairs and of inbreeding for cases.

The roadtrips and write options write an unadorned pairwise list, which can be fed directly to a file by prefixing the call to kin with a call to the output command. ROADTRIPS requires kinships rather than coefficient of relationship, and inbreeding values rather than 1+F. The write command gives a format readable by other Sib-pair commands

Example:

>> read pedigree inline
# Lord Raglan
1 101 x   x   m 
1 102 x   x   f
1 103 x   x   f
1 104 x   x   f
# Mistletoe
1 201 101 102 f
# Champion of England
1 202 x   x   m
# Duchess of Gloster, 9th
1 203 101 103 f
# The Czar
1 204 101 104 m
1 205 x   x   f
# Mimulus
1 301 202 201 f
# Grand Duke of Gloster
1 302 202 203 m
# Carmine
1 303 204 205 f
# Royal Duke of Gloster
1 401 302 301 m
# Princess Royal
1 402 202 303 f
# Roan Gauntlet
1 501 401 402 m
;;;;
>> run
[...]
>> kinship

--------------------------------------------------
Coefficient of relationship for all relative pairs
--------------------------------------------------

Pedigree 1
101    1.00
102    0.00 1.00
103    0.00 0.00 1.00
104    0.00 0.00 0.00 1.00
202    0.00 0.00 0.00 0.00 1.00
205    0.00 0.00 0.00 0.00 0.00 1.00
201    0.50 0.50 0.00 0.00 0.00 0.00 1.00
203    0.50 0.00 0.50 0.00 0.00 0.00 0.25 1.00
204    0.50 0.00 0.00 0.50 0.00 0.00 0.25 0.25 1.00
301    0.25 0.25 0.00 0.00 0.50 0.00 0.50 0.12 0.12 1.00
302    0.25 0.00 0.25 0.00 0.50 0.00 0.12 0.50 0.12 0.31 1.00
303    0.25 0.00 0.00 0.25 0.00 0.50 0.12 0.12 0.50 0.06 0.06 1.00
402    0.12 0.00 0.00 0.12 0.50 0.25 0.06 0.06 0.25 0.28 0.28 0.50 1.00
401    0.25 0.12 0.12 0.00 0.50 0.00 0.31 0.31 0.12 0.66 0.66 0.06 0.28 1.16
501    0.19 0.06 0.06 0.06 0.50 0.12 0.19 0.19 0.19 0.47 0.47 0.28 0.64 0.72 1.14

>> kinship inbreeding

--------------------------------------------------
Individuals with non-zero inbreeding coefficient
--------------------------------------------------

Pedigree   Person         Father         Mother         F
---------- -------------- -------------- -------------- ------
1          401            302            301            0.1562
1          501            401            402            0.1406

Mean inbreeding coefficient =  0.032986 (based on 9 nonfounder individuals)
Number of inbred individuals= 2

>> kinship inbreeding mc

--------------------------------------------------
Individuals with non-zero inbreeding coefficient
--------------------------------------------------
Coefficients estimated using    200 MC iterations.

Pedigree   Person         Father         Mother         F       MC 95%CI
---------- -------------- -------------- -------------- ------  -------------
1          401            302            301            0.1150  0.0779-0.1666
1          501            401            402            0.1550  0.1114-0.2116

Mean inbreeding coefficient =  0.030000 (based on 9 nonfounder individuals)
Number of inbred individuals= 2

>> kin dom

--------------------------------------------------
Bilineally-related non-full-sibling relative pairs
--------------------------------------------------
Pedigree   Person-1       Person-2            R      K
1          302            301            0.3125 0.0625 Bi
1          402            301            0.2812 0.0312 Bi
1          402            302            0.2812 0.0312 Bi
1          401            201            0.3125 0.0156 Bi
1          401            203            0.3125 0.0156 Bi
1          401            301            0.6562 0.0781 Bi
1          401            302            0.6562 0.0781 Bi
1          401            402            0.2812 0.0156 Bi
1          501            201            0.1875 0.0039 Bi
1          501            203            0.1875 0.0039 Bi
1          501            204            0.1875 0.0078 Bi
1          501            301            0.4688 0.0469 Bi
1          501            302            0.4688 0.0469 Bi
1          501            303            0.2812 0.0078 Bi
1          501            402            0.6406 0.0703 Bi
1          501            401            0.7188 0.0923 Bi

Bilineal non-sibling pairs  = 16

>> kin wri
ped1 id1 ped2 id2 kin
1 101 1 101 1.0000
1 102 1 101 0.0000
1 102 1 102 1.0000
1 103 1 101 0.0000
...



>> draw 1

Results of applying the "draw" macro on the racehorse pedigree.

macro draw %1
select ped %1
write dot %%.dot
$ dot -Tpng -o %%.png %%.dot
$ display %%.png
file delete %%.png %%.dot
;;;;

Descendants of Lord Raglan

>> clear
>> include alopeciaex.in
>> kin alopecia

----------------------------------------------------
Relationships of probands with trait "alopecia"
----------------------------------------------------
Pedigree      Aff Sporad Inbred  mean R  mean F
---------- ------ ------ ------  ------  ------
AU             11      0      9  0.3014  0.0582

Mean relatedness of cases     =  0.301420 (based on 55 affected relative pairs)
Mean inbreeding of cases      =  0.058239 (based on 11 affected individuals)
Kinship correction 1/[1-E(r)] =  1.746898 (for 11 affected individuals)

Kinship in 200 permuted datasets:

Expected relatedness of cases =  0.213440 (SD=0.047682, Permutation P=0.0450)
Expected inbreeding of cases  =  0.032933 (SD=0.012056, Permutation P=0.0150)



>> clear
>> include hops.in
>> set plevel 1
>> kin trait

--------------------------------------------------
Relationships of probands with trait "trait     "
--------------------------------------------------

Pedigree hops (2 affected members)
R
273 1.099
275 0.082 1.071
K
273 1.000
275 0.003 1.000
Proband 273            is inbred.
Proband 275            is inbred.

Mean relatedness of cases     =  0.081898 (based on 1 affected relative pairs)
Mean inbreeding of cases      =  0.084841 (based on 2 affected individuals)
Kinship correction 1/[1-E(r)] =  4.008441 (for 2 affected individuals)

Kinship in 200 permuted datasets:

Expected relatedness of cases =  0.044785 (SD=0.085344, Permutation P=0.1750)
Expected inbreeding of cases  =  0.007061 (SD=0.010720, Permutation P=0.0)


<< (neff)Up to index>> (ibd)