write_snprelate: Write a SNPRelate object from a tidy data frame

View source: R/snprelate.R

write_snprelateR Documentation

Write a SNPRelate object from a tidy data frame

Description

Write a SNPRelate object from a tidy data frame. Used internally in radiator and might be of interest for users.

Usage

write_snprelate(data, biallelic = TRUE, filename = NULL, verbose = TRUE)

Arguments

data

A tidy data frame object in the global environment or a tidy data frame in wide or long format in the working directory. How to get a tidy data frame ? Look into radiator tidy_genomic_data. The genotypes are biallelic.

biallelic

(logical, optional) If you already know that the data is biallelic use this argument to speed up the function. Default: biallelic = TRUE.

filename

(optional) The file name of the Genomic Data Structure (GDS) file. radiator will append .gds to the filename. If filename chosen is already present in the working directory, the default radiator_snprelate_datetime.gds is chosen. Default: filename = NULL.

verbose

(optional, logical) When verbose = TRUE the function is a little more chatty during execution. Default: verbose = TRUE.

Value

An object in the global environment of class "SNPGDSFileClass", "gds.class" and a file in the working directory.

Author(s)

Thierry Gosselin thierrygosselin@icloud.com

References

Zheng X, Levine D, Shen J, Gogarten SM, Laurie C, Weir BS. A high-performance computing toolset for relatedness and principal component analysis of SNP data. Bioinformatics. 2012;28: 3326-3328. doi:10.1093/bioinformatics/bts606

See Also

SNPRelate

Examples

## Not run: 
require(SNPRelate)
data.gds <- radiator::write_snprelate(data = "shark.rad")

## End(Not run)

thierrygosselin/radiator documentation built on May 5, 2024, 5:12 a.m.