View source: R/convertNcdfGds.R
convertNcdfGds | R Documentation |
convertNcdfGds
converts a NetCDF file to GDS
format.
convertGdsNcdf
converts a GDS file to NetCDF format.
checkNcdfGds
checks whether a genotype NetCDF file and a GDS
file contain identical data.
convertNcdfGds(ncdf.filename, gds.filename, snp.annot = NULL,
precision = "single", compress = "LZMA_RA", verbose = TRUE)
convertGdsNcdf(gds.filename, ncdf.filename,
precision = "single", verbose = TRUE)
checkNcdfGds(ncdf.filename, gds.filename, verbose = TRUE)
ncdf.filename |
name of the NetCDF file |
gds.filename |
name of the GDS file |
snp.annot |
a |
precision |
A character value indicating whether floating point numbers should be stored as "double" or "single" precision. |
compress |
The compression level for variables in a GDS file (see
|
verbose |
whether to show progress information |
convertNcdfGds
assumes any variables other than "sampleID",
"chromosome", and "position" have dimensions SNP x sample.
If snp.annot
has columns "rsID", "alleleA", "alleleB", these
will be stored in the GDS file as "snp.rs.id" and "snp.allele" (the
latter has the format "A/B").
Chromosome codes from snp.annot
(for autosomes, X, Y, etc.)
will be stored in the GDS file.
convertGdsNcdf
assumes any variables not starting with "snp" or
"sample" have dimensions SNP x sample.
checkNcdfGds
returns TRUE
if the NetCDF and GDS files
contain identical data. If the files differ, it will print a
diagnostic message and return FALSE
.
Xiuwen Zheng, Stephanie Gogarten
gdsfmt, ncdf4-package
library(GWASdata)
ncfile <- system.file("extdata", "illumina_geno.nc", package="GWASdata")
data(illuminaSnpADF)
gdsfile <- tempfile()
convertNcdfGds(ncfile, gdsfile, snp.annot=illuminaSnpADF)
checkNcdfGds(ncfile, gdsfile)
ncfile2 <- tempfile()
convertGdsNcdf(gdsfile, ncfile2)
file.remove(gdsfile, ncfile2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.