Learn R Programming

MatrixEQTL (version 1.2.0)

SlicedData-class: Class SlicedData for storing large matrices

Description

This class is created for fast and memory efficient manipulations with large datasets presented in matrix form. It is used to load, store, and manipulate large datasets, e.g. genotype and gene expression matrices. When a dataset is loaded, it is sliced in blocks of 10,000 rows (default size). This allows to impute, standardize, and perform other operations with the data with minimal memory overhead.

Arguments

Extends

SlicedData is a reference classes (envRefClass). Its methods can change the values of the fields of the class.

References

For more information visit: http://www.bios.unc.edu/research/genomic_software/Matrix_eQTL/

See Also

This class is used to load data for eQTL analysis by Matrix_eQTL_engine.

Examples

Run this code
showClass("SlicedData")

SNP_file_name = 'Sample_Data/SNP.txt';
snps = SlicedData$new();
snps$fileDelimiter = "t"; # the TAB character
snps$fileOmitCharacters = "NA"; # denote missing values;
snps$fileSkipRows = 1; # one row of column labels
snps$fileSkipColumns = 1; # one column of row labels
snps$fileSliceSize = 10000; # read file in pieces of 10,000 rows
snps$LoadFile(SNP_file_name);

## Display the dimensions and the number of slices

snps$nRows()
snps$nCols()
snps$nSlices()

Run the code above in your browser using DataLab