AlleleShare {mixIndependR} | R Documentation |
Calculate numbers of sharing alleles each pair at each locus
Description
Calculate numbers of sharing alleles each pair at each locus
Usage
AlleleShare(df,sep,replacement=FALSE)
Arguments
df |
a dataframe of genotype data with rownames of sample ID and column names of markers. |
sep |
allele separator in the imported genotype data. Note: when using the special character like "|", remember to protect it as "\|"(default). |
replacement |
a logical variable. If it is TRUE, the pairs are sampled with replacement; if FALSE (default), the pairs are sampled without replacement. |
Details
This function calculates the numbers of shared alleles between each pair of individuals for a dataset.
Value
a dataframe of numbers of shared alleles. Each row denotes each pair; Each column denotes each locus.
Examples
df <- data.frame(SNP1=c("A|A","T|T","A|T","A|T"),
STR1=c("12|12","13|14","13|13","14|15"))
AlleleShare(df,"\\|",replacement=FALSE)
[Package mixIndependR version 1.0.0 Index]