Title: | Computes estimates of the probability of related individuals sharing a rare variant |
---|---|
Description: | Rare Variant Sharing (RVS) implements tests of association and linkage between rare genetic variant genotypes and a dichotomous phenotype, e.g. a disease status, in family samples. The tests are based on probabilities of rare variant sharing by relatives under the null hypothesis of absence of linkage and association between the rare variants and the phenotype and apply to single variants or multiple variants in a region (e.g. gene-based test). |
Authors: | Alexandre Bureau, Ingo Ruczinski, Samuel Younkin, Thomas Sherman |
Maintainer: | Alexandre Bureau <[email protected]> |
License: | GPL-2 |
Version: | 1.29.0 |
Built: | 2024-10-31 04:37:39 UTC |
Source: | https://github.com/bioc/RVS |
Computes, for each pair of final descendants in the pedigree structure contained in the pedigree object, the ratio of the difference between the inferred and expected kinship coefficient for the pair over the mean kinship among founders.
ComputeKinshipPropCoef(ped) ## S4 method for signature 'pedigree' ComputeKinshipPropCoef(ped)
ComputeKinshipPropCoef(ped) ## S4 method for signature 'pedigree' ComputeKinshipPropCoef(ped)
ped |
pedigree object (S3) |
The ratio for each pair of final descendants is computed using equation (A1) of Bureau et al. Dividing the difference between the inferred and expected kinship coefficient for each pair by this ratio gives a pair-specific estimate of the mean kinship among founders, which can then be averaged over all pairs of final descendants from the same population to obtain a global estimate of the mean kinship among founders.
a symmetric matrix of ratios for all pair of final descendants in the pedigree structure contained in the pedigree
Bureau, A., Younkin, S., Parker, M.M., Bailey-Wilson, J.E., Marazita, M.L., Murray, J.C., Mangold, E., Albacha-Hejazi, H., Beaty, T.H. and Ruczinski, I. (2014) Inferring rare disease risk variants based on exact probabilities of sharing by multiple affected relatives. Bioinformatics, 30(15): 2189-96, doi:10.1093/bioinformatics/btu198.
data(samplePedigrees) ComputeKinshipPropCoef(samplePedigrees$firstCousinTriple)
data(samplePedigrees) ComputeKinshipPropCoef(samplePedigrees$firstCousinTriple)
convert snpMatrix to a list of vectors of sharing
convertMatrix(snpMat, famIds, minorAllele)
convertMatrix(snpMat, famIds, minorAllele)
snpMat |
SnpMatrix |
famIds |
family ids corresponding to rows of the snpMap |
minorAllele |
vector specifying the minor allele of each variant |
list of boolean vectors indicating sharing pattern for each variant
Computes a p-value for all variants seen across all families
enrichmentPValue(snpMat, famInfo, sharingProbs, threshold = 0)
enrichmentPValue(snpMat, famInfo, sharingProbs, threshold = 0)
snpMat |
SnpMatrix |
famInfo |
data frame containing pedigree, member, father, mother, sex, affected fields for each sequenced subject |
sharingProbs |
vector of sharing probabilites, must be a named vector with famid's for each probability |
threshold |
minimum p-value threshold passed to multipleFamilyPValue |
For each variant, the families which have all sequenced subjects sharing the variant and the families which have some sequenced subjects sharing the variant are recorded. All unique (family, variant) pairs are accumulated into a single vector and passed to multipleFamilyPValue
p-value
Fu, J., Beaty, T.H., Scott, A.F., Hetmanski, J., Parker, M.M., Bailey-Wilson, J.E., Marazita, M.L., et al. 2017. Whole Exome Association of Rare Deletions in Multiplex Oral Cleft Families. Genetic Epidemiology 41 (1): 61–69. doi:10.1002/gepi.22010.
R backend for enrichmentPValue calculation
enrichmentPValue_R_Backend( snpMat, famIds, sharingProbs, minorAllele, threshold = 0 )
enrichmentPValue_R_Backend( snpMat, famIds, sharingProbs, minorAllele, threshold = 0 )
snpMat |
SnpMatrix |
famIds |
family ids corresponding to rows of the snpMap |
sharingProbs |
vector of sharing probabilites, must be a named vector with famid's for each probability |
minorAllele |
which variant value to count as the minor allele |
threshold |
minimum p-value threshold passed to multipleFamilyPValue |
p-value
matrix of pedigree information and genotype data from famVCF stored in the LINKAGE format
ex.ped.mat
ex.ped.mat
VCF objects containing genotype data for two families: fam15157 and fam28003 (corresponding to the secondCousinTriple and firstAndSecondCousinsTriple families in samplePedigrees)
fam15157.vcf
fam15157.vcf
VCF objects containing genotype data for two families: fam15157 and fam28003 (corresponding to the secondCousinTriple and firstAndSecondCousinsTriple families in samplePedigrees)
fam28003.vcf
fam28003.vcf
This function is deprecated with version >= 2.0 and should not be used, instead use RVsharing with nSim option
GeneDrop(...) GeneDropSim.allsubsets.fn(...) GeneDropSim.fn(...) GeneDropSimExcessSharing.fn(...)
GeneDrop(...) GeneDropSim.allsubsets.fn(...) GeneDropSim.fn(...) GeneDropSimExcessSharing.fn(...)
... |
arguments to the old function |
none
tryCatch(GeneDrop(), error = function(e) message(e))
tryCatch(GeneDrop(), error = function(e) message(e))
This function is deprecated with version >= 2.0 and should not be used, instead use multipleFamilyPValue
get.psubset(vec, not, pshare.data)
get.psubset(vec, not, pshare.data)
vec |
a vector of names of all families where a variant is seen |
not |
a vector of names of families where not all affected subjects share the rare variant |
pshare.data |
a data frame with at least two of the following columns: pshare: vector of RV sharing probabilities ped.tocompute.vec: vector of names of the families whose sharing probability is contained in pshare. The names in the arguments vec and not must be found in ped.tocompute.vec |
P-value of the exact rare variant sharing test requiring sharing by all affected subjects.
data(samplePedigrees) notSharedFams <- c(15159, 15053, 15157) famids <- sapply(samplePedigrees, function(p) p$famid[1]) notShared <- famids %in% notSharedFams probs <- sapply(samplePedigrees, RVsharing) get.psubset(famids, notShared, data.frame(pshare=probs, ped.tocompute.vec=famids))
data(samplePedigrees) notSharedFams <- c(15159, 15053, 15157) famids <- sapply(samplePedigrees, function(p) p$famid[1]) notShared <- famids %in% notSharedFams probs <- sapply(samplePedigrees, RVsharing) get.psubset(famids, notShared, data.frame(pshare=probs, ped.tocompute.vec=famids))
Computing probability of sharing of rare variants in a subset of families where rare variants are seen based on precomputed family-specific rare variant sharing probabilities.
multipleFamilyPValue(sharingProbs, observedSharing, minPValue = 0)
multipleFamilyPValue(sharingProbs, observedSharing, minPValue = 0)
sharingProbs |
named vector of sharing probabilties, where names correspond to famid value of pedigree |
observedSharing |
boolean vector describing if all affected subjects in the family share the variant (TRUE if all share) |
minPValue |
the minimum p-value threshold, once the true p-value is determined to be less than this, the computation stops and minPValue is returned - this prevents extremely long computations for extremely small p-values |
All the subsets of families of size equal or inferior to the length of not are created, and the joint probability of each such subset not sharing a rare variant and the remaining families sharing a rare variant is obtained as the product of the family-specific rare variant sharing probabilities or its complement. The function then sums the pattern probabilities inferior or equal to the probability of the observed pattern of the not families not sharing a rare variant and the remaining families sharing a rare variant.
P-value of the exact rare variant sharing test requiring sharing by all affected subjects
Bureau, A., Younkin, S., Parker, M.M., Bailey-Wilson, J.E., Marazita, M.L., Murray, J.C., Mangold, E., Albacha-Hejazi, H., Beaty, T.H. and Ruczinski, I. (2014) Inferring rare disease risk variants based on exact probabilities of sharing by multiple affected relatives. Bioinformatics, 30(15): 2189-96, doi:10.1093/bioinformatics/btu198.
data(samplePedigrees) probs <- sapply(samplePedigrees, RVsharing) notSharedFams <- c(15159, 15053, 15157) famids <- sapply(samplePedigrees, function(p) p$famid[1]) shared <- !famids %in% notSharedFams names(shared) <- names(probs) multipleFamilyPValue(probs, shared)
data(samplePedigrees) probs <- sapply(samplePedigrees, RVsharing) notSharedFams <- c(15159, 15053, 15157) famids <- sapply(samplePedigrees, function(p) p$famid[1]) shared <- !famids %in% notSharedFams names(shared) <- names(probs) multipleFamilyPValue(probs, shared)
R backend for multipleFamilyPValue calculation
multipleFamilyPValue_R_Backend(sharingProbs, observedSharing, minPValue = 0)
multipleFamilyPValue_R_Backend(sharingProbs, observedSharing, minPValue = 0)
sharingProbs |
named vector of sharing probabilties, where names correspond to famid value of pedigree |
observedSharing |
boolean vector describing if all affected subjects in the family share the variant (TRUE if all share) |
minPValue |
the minimum p-value threshold, once the true p-value is determined to be less than this, the computation stops and minPValue is returned - this prevents extremely long computations for extremely small p-values |
p-value
Computes a p-value for each variant sharing pattern across families
multipleVariantPValue( snpMat, famInfo, sharingProbs, minorAllele = NULL, filter = NULL, alpha = 0 )
multipleVariantPValue( snpMat, famInfo, sharingProbs, minorAllele = NULL, filter = NULL, alpha = 0 )
snpMat |
SnpMatrix |
famInfo |
data frame containing pedigree, member, father, mother, sex, affected fields for each sequenced subject |
sharingProbs |
vector of sharing probabilites, must be a named vector with famid's for each probability |
minorAllele |
vector specifying the minor allele of each variant |
filter |
criteria for filtering pvalues |
alpha |
parameter for filter |
For each variant, the families which have all sequenced subjects sharing the variant and the families which have some sequenced subjects sharing the variant are recorded. These values are passed to multipleFamilyPValue
list containing p-values and potential p-values for each variant
R backend for multipleVariantPValue calculation
multipleVariantPValue_R_Backend( snpMat, famIds, sharingProbs, minorAllele, filter = NULL, alpha = 0 )
multipleVariantPValue_R_Backend( snpMat, famIds, sharingProbs, minorAllele, filter = NULL, alpha = 0 )
snpMat |
SnpMatrix |
famIds |
family ids corresponding to rows of the snpMap |
sharingProbs |
vector of sharing probabilites, must be a named vector with famid's for each probability |
minorAllele |
vector specifying the minor allele of each variant |
filter |
criteria for filtering pvalues |
alpha |
parameter for filter |
list of p-values and potential p-values
This function is deprecated with version >= 2.0 and should not be used.
ped2trio(...)
ped2trio(...)
... |
arguments to the old function |
none
tryCatch(ped2trio(), error = function(e) message(e))
tryCatch(ped2trio(), error = function(e) message(e))
Extract key information from a pedigree object, which makes subsequent computations much easier.
processPedigree(ped, carriers = NULL) ## S4 method for signature 'pedigree' processPedigree(ped, carriers = NULL)
processPedigree(ped, carriers = NULL) ## S4 method for signature 'pedigree' processPedigree(ped, carriers = NULL)
ped |
pedigree object (S3) |
carriers |
subjects in which the rare variant is seen |
list containing relevant pedigree info
data(samplePedigrees) processPedigree(samplePedigrees$firstCousinPair)
data(samplePedigrees) processPedigree(samplePedigrees$firstCousinPair)
Computing probability of sharing of rare variants in a family sample within a genomic region such as a gene.
RVgene( data, ped.listfams, sites, fams, pattern.prob.list, nequiv.list, N.list, type = "alleles", minor.allele.vec, precomputed.prob = list(0), maxdim = 1e+09, partial.sharing = TRUE, ... )
RVgene( data, ped.listfams, sites, fams, pattern.prob.list, nequiv.list, N.list, type = "alleles", minor.allele.vec, precomputed.prob = list(0), maxdim = 1e+09, partial.sharing = TRUE, ... )
data |
A list of |
ped.listfams |
a list of |
sites |
a vector of the column indices of the variant sites to
test in |
fams |
an optional character vector of the names of families
in |
pattern.prob.list |
a list of precomputed rare variant sharing
probabilities for all possible sharing patterns in the families in
|
nequiv.list |
an optional vector of the number of configurations
of rare variant sharing by the affected subjects corresponding to the
same pattern and probability in |
N.list |
a vector of the number of affected subjects sharing a
rare variant in the corresponding pattern in |
type |
an optional character string taking value "alleles" or "count". Default is "alleles" |
minor.allele.vec |
an optional vector of the minor alleles at each
site in the |
precomputed.prob |
an optional list of vectors precomputed rare
variant sharing probabilities for families in |
maxdim |
upper bound on the dimension of the array containing the joint distribution of the sharing patterns for all families in fams (to avoid running out of memory) |
partial.sharing |
logical indicating whether the test allowing for sharing by a subset of affected subjects should be performed. If FALSE, only the test requiring sharing by all affected subjects is computed. Default is TRUE |
... |
other arguments to be passed to RVsharing |
The function extracts the carriers of the minor allele at each
entry in sites in each family where it is present in ped.mat (or in the
families specified in fams if that argument is specified). It then
computes exact rare variant sharing probabilities in each family for
each variant by calling RVsharing
. If multiple rare variants are seen
in the same family, the smallest sharing probability among all rare
variants is retained. The joint rare variant sharing probability over
all families is obtained as the product of the family-specific
probabilities. The p-value of the test allowing for sharing by a subset
of affected subjects over the rare variants in the genomic region is
then computed as the sum of the probabilities of the possible
combinations of sharing patterns among all families with a probability
less than or equal to the observed joint probability and a total number
of carriers greater than or equal to the sum of the number of carriers
in all families, using the values in pattern.prob.list
, nequiv.list
and
N.list
. The families where all affected subjects share a rare variant
are determined by verifying if the length of the carrier vector equals
the maximum value of N.list
for that family. The p-value of the test
requiring sharing by all affected subjects is computed by calling
multipleFamilyPValue
.
A list with items:
p
P-value of the exact rare variant sharing test allowing for sharing
by a subset of affected subjects.
pall
P-value of the exact rare variant sharing test requiring sharing
by all affected subjects.
potentialp
Minimum achievable p-value if all affected subjects were
carriers of a rare variant.
Bureau, A., Begum, F., Taub, M.A., Hetmanski, J., Parker, M.M., Albacha-Hejazi, H., Scott, A.F., et al. (2019) Inferring Disease Risk Genes from Sequencing Data in Multiplex Pedigrees Through Sharing of Rare Variants. Genet Epidemiol. 43(1):37-49. doi: 10.1002/gepi.22155.
data(samplePedigrees) data(ex.ped.mat) fam15157 <- samplePedigrees$secondCousinTriple fam15157.pattern.prob = c(RVsharing(fam15157,carriers=c(15,16,17)), RVsharing(fam15157,carriers=c(15,16)), RVsharing(fam15157,carriers=c(15))) fam15157.nequiv = c(1,3,3) # check that distribution sums to 1 sum(fam15157.pattern.prob*fam15157.nequiv) fam15157.N = 3:1 fam28003 <- samplePedigrees$firstAndSecondCousinsTriple fam28003.pattern.prob = c(RVsharing(fam28003,carriers=c(36,104,110)), RVsharing(fam28003,carriers=c(36,104)), RVsharing(fam28003,carriers=c(104,110)), RVsharing(fam28003,carriers=c(36)), RVsharing(fam28003,carriers=c(104))) fam28003.N = c(3,2,2,1,1) fam28003.nequiv = c(1,2,1,1,2) # check that distribution sums to 1 sum(fam28003.pattern.prob*fam28003.nequiv) # Creating lists ex.pattern.prob.list = list("15157"=fam15157.pattern.prob,"28003"=fam28003.pattern.prob) ex.nequiv.list = list("15157"=fam15157.nequiv,"28003"=fam28003.nequiv) ex.N.list = list("15157"=fam15157.N,"28003"=fam28003.N) ex.ped.obj = list(fam15157,fam28003) names(ex.ped.obj) = c("15157","28003") sites = c(92,119) minor.allele.vec=c(1,4) RVgene(ex.ped.mat,ex.ped.obj,sites, pattern.prob.list=ex.pattern.prob.list, nequiv.list=ex.nequiv.list,N.list=ex.N.list, minor.allele.vec=minor.allele.vec) # calling with a SnpMatrix list data(famVCF) fam15157.snp = suppressWarnings(VariantAnnotation::genotypeToSnpMatrix(fam15157.vcf)) fam28003.snp = suppressWarnings(VariantAnnotation::genotypeToSnpMatrix(fam28003.vcf)) ex.SnpMatrix.list = list(fam15157=fam15157.snp$genotypes,fam28003=fam28003.snp$genotypes) RVgene(ex.SnpMatrix.list,ex.ped.obj,sites, pattern.prob.list=ex.pattern.prob.list, nequiv.list=ex.nequiv.list, N.list=ex.N.list,minor.allele.vec=minor.allele.vec)
data(samplePedigrees) data(ex.ped.mat) fam15157 <- samplePedigrees$secondCousinTriple fam15157.pattern.prob = c(RVsharing(fam15157,carriers=c(15,16,17)), RVsharing(fam15157,carriers=c(15,16)), RVsharing(fam15157,carriers=c(15))) fam15157.nequiv = c(1,3,3) # check that distribution sums to 1 sum(fam15157.pattern.prob*fam15157.nequiv) fam15157.N = 3:1 fam28003 <- samplePedigrees$firstAndSecondCousinsTriple fam28003.pattern.prob = c(RVsharing(fam28003,carriers=c(36,104,110)), RVsharing(fam28003,carriers=c(36,104)), RVsharing(fam28003,carriers=c(104,110)), RVsharing(fam28003,carriers=c(36)), RVsharing(fam28003,carriers=c(104))) fam28003.N = c(3,2,2,1,1) fam28003.nequiv = c(1,2,1,1,2) # check that distribution sums to 1 sum(fam28003.pattern.prob*fam28003.nequiv) # Creating lists ex.pattern.prob.list = list("15157"=fam15157.pattern.prob,"28003"=fam28003.pattern.prob) ex.nequiv.list = list("15157"=fam15157.nequiv,"28003"=fam28003.nequiv) ex.N.list = list("15157"=fam15157.N,"28003"=fam28003.N) ex.ped.obj = list(fam15157,fam28003) names(ex.ped.obj) = c("15157","28003") sites = c(92,119) minor.allele.vec=c(1,4) RVgene(ex.ped.mat,ex.ped.obj,sites, pattern.prob.list=ex.pattern.prob.list, nequiv.list=ex.nequiv.list,N.list=ex.N.list, minor.allele.vec=minor.allele.vec) # calling with a SnpMatrix list data(famVCF) fam15157.snp = suppressWarnings(VariantAnnotation::genotypeToSnpMatrix(fam15157.vcf)) fam28003.snp = suppressWarnings(VariantAnnotation::genotypeToSnpMatrix(fam28003.vcf)) ex.SnpMatrix.list = list(fam15157=fam15157.snp$genotypes,fam28003=fam28003.snp$genotypes) RVgene(ex.SnpMatrix.list,ex.ped.obj,sites, pattern.prob.list=ex.pattern.prob.list, nequiv.list=ex.nequiv.list, N.list=ex.N.list,minor.allele.vec=minor.allele.vec)
Rare Variant Sharing (RVS) implements tests of association and linkage between rare genetic variant genotypes and a dichotomous phenotype, e.g. a disease status, in family samples. The tests are based on probabilities of rare variant sharing by relatives under the null hypothesis of absence of linkage and association between the rare variants and the phenotype and apply to single variants or multiple variants in a region (e.g. gene-based test).
computing probability that a rare variant is shared by a set of subjects in a pedigree using the gRain package
RVsharing( ped, carriers = NULL, alleleFreq = NA, kinshipCoeff = NA, nSim = NA, founderDist = NULL, useAffected = FALSE, kinshipOrder = 5, splitPed = FALSE, useFounderCouples = TRUE, ... ) ## S4 method for signature 'pedigree' RVsharing( ped, carriers = NULL, alleleFreq = NA, kinshipCoeff = NA, nSim = NA, founderDist = NULL, useAffected = FALSE, kinshipOrder = 5, splitPed = FALSE, useFounderCouples = TRUE, ... ) ## S4 method for signature 'list' RVsharing( ped, carriers = NULL, alleleFreq = NA, kinshipCoeff = NA, nSim = NA, founderDist = NULL, useAffected = FALSE, kinshipOrder = 5, splitPed = FALSE, useFounderCouples = TRUE, ... )
RVsharing( ped, carriers = NULL, alleleFreq = NA, kinshipCoeff = NA, nSim = NA, founderDist = NULL, useAffected = FALSE, kinshipOrder = 5, splitPed = FALSE, useFounderCouples = TRUE, ... ) ## S4 method for signature 'pedigree' RVsharing( ped, carriers = NULL, alleleFreq = NA, kinshipCoeff = NA, nSim = NA, founderDist = NULL, useAffected = FALSE, kinshipOrder = 5, splitPed = FALSE, useFounderCouples = TRUE, ... ) ## S4 method for signature 'list' RVsharing( ped, carriers = NULL, alleleFreq = NA, kinshipCoeff = NA, nSim = NA, founderDist = NULL, useAffected = FALSE, kinshipOrder = 5, splitPed = FALSE, useFounderCouples = TRUE, ... )
ped |
S3 pedigree object or a list of pedigree objects |
carriers |
subjects in pedigree that have the variant, if ped is a list, then this will also be a list of vectors specifying the carriers in each pedigree |
alleleFreq |
allele frequency among the founders |
kinshipCoeff |
mean kinship coefficient among the founders |
nSim |
number of simulations used in monte carlo calculation |
founderDist |
custom distribution among founders. Only used when simulating probability with nSim |
useAffected |
a logical value indicating whether to condition on seeing the variant among the affected subjects instead of the final descendants |
kinshipOrder |
order of the polynomial approximation to the distribtion of the number of distinct alleles in the founders (d in Bureau et al.). Must be <= 5 |
splitPed |
a logical value indicating whether to split the pedigree in subpedigrees below each founder to enable computations in pedigrees too large to be stored in a single Bayesian network |
useFounderCouples |
a logical value indicating whether to exploit the interchangeability of the mother and father from founder couples to save computations. Warning! This works only when all founders have only one spouse. Set to FALSE if at least one founder has two or more spouses. Only used when splitPed = TRUE |
... |
allows for additional arguments |
the function RVsharing computes the probability that all subjects identified as carriers of a rare variant in the vector carriers (or all final descendants in the pedigree if carriers == NULL) share that rare variant AND the final descendants not included in carriers do not carry it, given that the rare variant has been detected in any subject in the union of the carriers and the final descendants of the pedigree. A final descendant is defined as a subject without descendant in the pedigree, it it not necessarily in the youngest generation. If carriers enumerates a subset of pedigree members, the function will then compute the probability these carriers share the rare variant AND the final descendants not included in carriers do not carry it based on the above terms. To obtain the probability that a set of pedigree members carry a rare variant given it was seen in any of the set members (ignoring the carrier status of final descendants not in the set), the pedigree must be trimmed of the other final descendants before calling RVsharing.
sharing probability between all carriers in pedigree, or if splitPed = TRUE, a vector of sharing probabilities for all subsets of the carriers
Bureau, A., Younkin, S., Parker, M.M., Bailey-Wilson, J.E., Marazita, M.L., Murray, J.C., Mangold, E., Albacha-Hejazi, H., Beaty, T.H. and Ruczinski, I. (2014) Inferring rare disease risk variants based on exact probabilities of sharing by multiple affected relatives. Bioinformatics, 30(15): 2189-96, doi:10.1093/bioinformatics/btu198.
Sherman, T., Fu, J., Scharpf, R., Bureau, A., and Ruczinski, I. (2018) Detection of rare disease variants in extended pedigrees using RVS. Bioinformatics, 1-3, doi: 10.1093/bioinformatics/bty976
data("samplePedigrees") RVsharing(samplePedigrees$firstCousinPair)
data("samplePedigrees") RVsharing(samplePedigrees$firstCousinPair)
list of 8 sample pedigree objects
samplePedigrees
samplePedigrees
SnpMatrix with genotype information from famVCF for fam15157
snpMat
snpMat
creates a matrix in LINKAGE format using pedigree information from a list of pedigree objects and genotype information from a list of SnpMatrices
SnpMatrixToCount(matList, pedList)
SnpMatrixToCount(matList, pedList)
matList |
list of SnpMatrices |
pedList |
list of pedigrees |
matrix in LINKAGE format
data(samplePedigrees) data(snpMat) ped <- samplePedigrees$secondCousinTriple ex.ped.mat <- SnpMatrixToCount(list(snpMat), list(ped))
data(samplePedigrees) data(snpMat) ped <- samplePedigrees$secondCousinTriple ex.ped.mat <- SnpMatrixToCount(list(snpMat), list(ped))