Description Usage Arguments Value See Also Examples
getIBDiR()
calculates a summary statistic for each SNP that can be used to assess the significance of excess IBD sharing at genomic loci,
thus identifying regions under positive selection.
First relatedness between isolates and SNP allele frequencies are accounted for, then normalization procedures are applied where we assume
our transformed summary statistic follows a chi-squared distribution with 1 degree of freedom.
This allows the calculation of -log10 (P-values) which we denote as the iR statistic.
SNPs with iR values greater than some threshold (i.e. -log10 (P-values) > -log10 (0.05)) provide evidence of positive selection.
getIBDiR
can return NA
iR statistics for a number of reasons, including trying to generate iR statistics when there are no IBD pairs
or when all pairs are IBD, or when only several isolates are analyzed.
1 |
ped.genotypes |
A list containing 2 objects. See the |
ibd.matrix |
A data frame containing the binary IBD information for each SNP and each pair.
See the returned |
groups |
A data frame with 3 columns of information:
where IBD proportions are calculated for
Group ID, for example, can be the geographic regions where the isolates were collected.
The default is |
A data frame the following 7 columns:
Chromosome (type "character"
, "numeric"
or "integer"
)
SNP identifiers (type "character"
)
Genetic map distance (centi morgans, cM) (type "numeric"
)
Base-pair position (type "integer"
)
Population (type "character"
or "numeric"
)
Subpopulation (type "character"
or "numeric"
)
iR statistic (type "numeric"
)
-log10 p vlaue (type "numeric"
)
where each row describes a unique SNP.
The column Population
is filled with 1s by default, while Subpopulation
contains the group IDs from groups
,
where the proportion of pairs IBD has been calculated for all pairs of isolates belonging to the same group as well as all pairs of
isolates where each isolate belongs to a different group.
If groups=NULL
then Subpopulation
will be filled with 0s also.
The population columns have been included for plotting purposes.
The data frame is headed chr, snp_id, pos_M, pos_bp, pop, subpop, iR
and log10_pvalue
respectively.
getGenotypes
, getIBDmatrix
and getIBDproportion
.
1 2 3 4 5 6 7 8 | # generate a binary IBD matrix
my_matrix <- getIBDmatrix(ped.genotypes = png_genotypes,
ibd.segments = png_ibd)
# calculate the significance of IBD sharing
my_iR <- getIBDiR(ped.genotypes = png_genotypes,
ibd.matrix = my_matrix,
groups = NULL)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.