View source: R/func__findMinIncClade.R
findMinIncClade | R Documentation |
This function finds out the minimal clade that contains all samples having a pair of patterns (representatives of alleles) co-occurring. It also computes the frequency of co-occurrence events and the maximal sample distance in each minimal clade. This function can be used for determining whether the distributions of a pair of identically distributed alleles are identical-by-descent (IBD). An NA vlaue appears when the patterns do not overlap (when min.co = 0).
By design, this function takes as input the outputs of the lmm or findPhysLink function when it is applied independently. It however serves as a subordinate function of lmm/findPhysLink as well.
findMinIncClade( lmms, allele.pam, clade.pam, clade.sizes = NULL, sample.dists, n.cores = -1 )
lmms |
Allele-level results from linear mixed models, generated by the function lmm or findPhysLink. |
allele.pam |
An allele-level presence-absence matrix. It is the element [["alleles"]][["A"]] in the output list of lmm or findPhysLink. |
clade.pam |
A matrix for the presence-absence of samples in each clade of an input tree. It can be obtained using the function tree2Clades of GeneMates. |
clade.sizes |
A named vector of integers for the number of samples in each clade. It can be obtained from the element "sizes" in the outputs of the function tree2Clades. Optional. |
sample.dists |
A square matrix for distances between samples. It can be acquired through the function projectSamples. |
n.cores |
An integer determining the number of cores used for parallel computing. Valid values are the same as those for the findPhysLink function. |
Yu Wan (wanyuac@126.com)
assoc <- findPhysLink(...) # Although this command calls the findMinIncClade function, however, a user wants to regenerate the clade inforamtion for some reasons. C <- projectSamples(...) clades <- tree2Clades(...) clonality <- findMinIncClade(lmms = assoc[["lmms"]], allele.pam = assoc[["alleles"]][["A"]], clade.pam = clades[["pam"]], clade.sizes = clades[["sizes"]], sample.dists = C[["d"]], n.cores = 16) Dependency: parallel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.