Description Usage Arguments Details Value Examples

View source: R/genotypeFunctions.R

Estimate kinship from standardised genotypes or read pre-computed kinship
file. Standardised genotypes can be obtained via
`standardiseGenotypes`

.

1 2 3 |

`N` |
Number [integer] of samples to simulate. |

`sampleID` |
Prefix [string] for naming samples (will be followed by sample number from 1 to N when constructing id_samples). |

`X` |
[NrSamples x totalNrSNPs] Matrix of (standardised) genotypes. |

`kinshipfile` |
path/to/kinshipfile [string] to be read; either X or kinshipfile must be provided. |

`id_samples` |
Vector of [NrSamples] sample IDs [string]; if not provided constructed by paste(sampleID, 1:N, sep=""). |

`standardise` |
[boolean] If TRUE genotypes will be standardised before kinship estimation. |

`sep` |
Field separator [string] of kinship file. |

`header` |
[boolean], If TRUE kinship file has header information. |

`verbose` |
[boolean]; If TRUE, progress info is printed to standard out |

The kinship is estimated as *K = XX_T*, with X the standardised
genotypes of the samples. When estimating the kinship from the provided
genotypes, the kinship is normalised by the mean of its diagonal
elements and 1e-4 added to the diagonal for numerical stability.

[NrSamples x NrSamples] Matrix of kinship estimate.

1 2 3 4 5 6 7 8 | ```
geno <- simulateGenotypes(N=10, NrSNP=50)
K_fromGenotypesNormalised <- getKinship(N=10, X=geno$genotypes,
standardise=TRUE)
kinshipfile <- system.file("extdata/kinship",
"kinship.csv",
package = "PhenotypeSimulator")
K_fromFile <- getKinship(N=50, kinshipfile=kinshipfile)
``` |

PhenotypeSimulator documentation built on Oct. 25, 2018, 5:04 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.