Description Usage Arguments Value See Also Examples
getIBDproportion()
calculates the proportion of pairs inferred IBD at each SNP.
1 | getIBDproportion(ped.genotypes, ibd.matrix, groups = NULL)
|
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, if specified, 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"
)
Proportion of pairs IBD (type "integer"
)
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 isolates belonging to the same group as well as all isolates from different groups.
If groups=NULL
then Subpopulation
will be filled with 1s also.
The population columns have been included for plotting purposes.
The data frame is headed chr, snp_id, pos_M, pos_bp, pop, subpop
and prop_ibd
respectively.
getGenotypes
, getIBDmatrix
and getIBDiR
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # generate a binary IBD matrix
my_matrix <- getIBDmatrix(ped.genotypes = png_genotypes,
ibd.segments = png_ibd)
# calculate the proportion of pairs IBD at each SNP
my_proportion <- getIBDproportion(ped.genotypes = png_genotypes,
ibd.matrix = my_matrix,
groups = NULL)
# creating a stratification dataset
my_groups <- png_genotypes[[1]][,1:3]
my_groups[1:10,"pid"] <- "a"
my_groups[11:25,"pid"] <- "b"
my_groups[26:38,"pid"] <- "c"
my_proportion <- getIBDproportion(ped.genotypes = png_genotypes,
ibd.matrix = my_matrix,
groups = my_groups)
head(my_proportion)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.