snpgdsGDS2PED: Conversion from GDS to PED

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/SNPRelate_Main.r

Description

Convert a GDS file to a PLINK ped file.

Usage

1
2
snpgdsGDS2PED(gdsobj, ped.fn, sample.id=NULL, snp.id=NULL, use.snp.rsid=TRUE,
	format=c("A/G/C/T", "A/B", "1/2"), verbose=TRUE)

Arguments

gdsobj

a GDS file object (gds.class)

ped.fn

the file name of output

sample.id

a vector of sample id specifying selected samples; if NULL, all samples are used

snp.id

a vector of snp id specifying selected SNPs; if NULL, all SNPs are used

use.snp.rsid

if TRUE, use "snp.rs.id" instead of "snp.id" if available

format

specify the coding: "A/G/C/T" – allelic codes stored in "snp.allele" of the GDS file; "A/B" – A and B codes; "1/2" – 1 and 2 codes

verbose

if TRUE, show information

Details

GDS – Genomic Data Structures, the extended file name used for storing genetic data, and the file format used in the gdsfmt package.

PED – the PLINK text ped format.

Value

None.

Author(s)

Xiuwen Zheng

References

Purcell S, Neale B, Todd-Brown K, Thomas L, Ferreira MAR, Bender D, Maller J, Sklar P, de Bakker PIW, Daly MJ & Sham PC. 2007. PLINK: a toolset for whole-genome association and population-based linkage analysis. American Journal of Human Genetics, 81.

http://corearray.sourceforge.net/

See Also

snpgdsGDS2BED

Examples

1
2
3
4
5
6
7
8
# open an example dataset (HapMap)
genofile <- openfn.gds(snpgdsExampleFileName())

snpset <- snpgdsSelectSNP(genofile, missing.rate=0.95)
snpgdsGDS2PED(genofile, ped.fn="tmp", snp.id=snpset)

# close the genotype file
closefn.gds(genofile)

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