snpgdsSNPListStrand: Switch allele strand.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/SNPRelate_Main.r

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# open an example dataset (HapMap)
genofile <- openfn.gds(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 genotype file
closefn.gds(genofile)

SNPRelate documentation built on May 2, 2019, 4:56 p.m.