Mega2gdsfmt: transcode mega2 to gdsfmt/SNP_ARRAY

View source: R/mega2gdsfmt.R

Mega2gdsfmtR Documentation

transcode mega2 to gdsfmt/SNP_ARRAY

Description

Reads the data frames in "envir" and builds a GDSFMT COREARRAY file from them.

Usage

Mega2gdsfmt(
  filename = "test.gds",
  markers = NULL,
  snp.order = FALSE,
  SeqArray = FALSE,
  envir = ENV
)

Arguments

filename

gdsfmt file to create

markers

data frame of markers to be processed

snp.order

TRUE indicates that the "genotype" data matrix has SNP as the first index which changes more quickly than subsequent indices. FALSE indicates that SAMPLE is the the first index.

SeqArray

TRUE uses SeqArray labels for the gdsfmt vector elements. FALSE it uses labels shown in SNPRelate

envir

'environment' containing SQLite database and other globals

Value

writes the "filename" file containing the CoreArray data. Then returns an internal pointer, class .gds, to the file data.

See Also

gdsfmt

Examples

db = system.file("exdata", "seqsimm.db", package="Mega2R")
ENV = read.Mega2DB(db)
gdsfmtfile = file.path(where_mega2rtutorial_data(), "test.gds")
append_genotype_a = TRUE
append_genotype_b = append_genotype_c = FALSE
gn = Mega2gdsfmt(gdsfmtfile, envir=ENV)
gn


Mega2R documentation built on May 29, 2024, 1:14 a.m.