findDupSamples: findDupSamples

View source: R/find-dup-samples.R

findDupSamplesR Documentation

findDupSamples

Description

Find the duplicated samples by look at the number of matching genotypes in all pair-wise samples

Usage

findDupSamples(geno, threshold = 0.99, in_text = FALSE)

Arguments

geno

the genotype data.frame of markers by samples from output of function correctGT

threshold

the frequency cut-off of number of matching genotypes out of all geneotypes for determining whether the pair of samples are duplicated, defaults to 0.99. NAs are regarded as same genotypes for two samples if they both have NA for a marker.

in_text

whether text of frequencies should be displayed in the heatmap cells

Value

The paris of duplicated samples.

Author(s)

Ruqian Lyu

Examples

data(snp_geno)
or_geno <- snp_geno[,grep("X",colnames(snp_geno))]
rownames(or_geno) <- paste0(snp_geno$CHR,"_",snp_geno$POS)
or_geno[,1] <- or_geno[,5]
cr_geno <- correctGT(or_geno,ref = snp_geno$C57BL.6J,
                    alt = snp_geno$FVB.NJ..i.)
dups <- findDupSamples(cr_geno)

ruqianl/comapr documentation built on Oct. 27, 2023, 5:12 a.m.