Comments (1)
The IBD coefficients (kappa) are defined only for non-inbred individuals. In your example the grandfather is inbred, hence all kappas involving him come out as NA. As shown below, a warning about this is printed if you add verbose = T
in the call. (Perhaps this should be the default behaviour!)
BTW, the function linearPed()
is useful for creating (great)grandparent relationships. Also note that pedtools
is loaded automatically with ribd
.
library(ribd, warn = F)
#> Loading required package: pedtools
x = linearPed(2)
founderInbreeding(x, 1) = 0.1
# Undefined kappas since 1 in inbred
kappaIbd(x, ids = c(1, 5), verbose = T)
#> Warning: kappa coefficients are only defined for non-inbred individuals.
#> 1: f = 0.100000
#> [1] NA NA NA
# All pairs at once
kappaIbd(x)
#> id1 id2 kappa0 kappa1 kappa2
#> 1 1 2 NA NA NA
#> 2 1 3 NA NA NA
#> 3 1 4 NA NA NA
#> 4 1 5 NA NA NA
#> 5 2 3 0.0 1.0 0
#> 6 2 4 1.0 0.0 0
#> 7 2 5 0.5 0.5 0
#> 8 3 4 1.0 0.0 0
#> 9 3 5 0.0 1.0 0
#> 10 4 5 0.0 1.0 0
Created on 2019-06-14 by the reprex package (v0.3.0)
from ribd.
Related Issues (15)
- NA-s and more HOT 1
- ibd_identity() error in halfSibStack HOT 1
- `ibd_inbreeding` and founders HOT 1
- ibd_kappa and sibs with inbred, unrelated, parents HOT 1
- 0 or NA? HOT 1
- twoLocusIBD HOT 1
- `twoLocusIdentity()` example suggested HOT 2
- `twoLocusIdentity` fails for founders HOT 1
- `constructPedigree` output
- Shorter kinship lines HOT 2
- Comments on README HOT 1
- Input detailed2condensed
- `showInTriangle`
- `kinship()` and `inbreeding()` should catch duplicated labels HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ribd.