snpgdsSNPListStrand {SNPRelate}R Documentation

Switch allele strand.

Description

To get a logical vector, indicating whether allele references of snplist2 need to be switched, with respect to snplist1.

Usage

snpgdsSNPListStrand(snplist1, snplist2, same.strand=FALSE)

Arguments

snplist1

the first SNP list object “snpgdsSNPListClass”

snplist2

the second SNP list object “snpgdsSNPListClass”

same.strand

TRUE assuming alleles are on the same strand (e.g., forward strand); otherwise, FALSE not assuming whether on the same strand or not

Value

a logical vector, where TRUE indiciates the allele references need to be switched, and NA indiciates that locus is not in the common snp list.

Author(s)

Xiuwen Zheng

See Also

snpgdsSNPList, snpgdsSNPListStrand

Examples

# open an example dataset (HapMap)
genofile <- snpgdsOpen(snpgdsExampleFileName())

# to get a snp list object
snplist1 <- snpgdsSNPList(genofile)
snplist2 <- snpgdsSNPList(genofile)

# a common snp list
L <- snpgdsSNPListStrand(snplist1, snplist2)

table(L, exclude=NULL)

# close the file
snpgdsClose(genofile)

[Package SNPRelate version 1.10.2 Index]