annotatedSNPset-class: annotatedSNPset objects

Description Constructor Accessors Examples

Description

This class is for data objects of annotatedSNPset-class

Constructor

annotatedSNPset(snp.df,snp.eq,eq.mat,eq.map,dim): Creates an object of annotatedSNPset class.

snp.df

A data.frame with input rsIDs as rownames and both chromosome number and base pair position as columns.

snp.eq

This is a numeric vector indicating which snp mapped to which equivalence class.

eq.mat

A list of binary matrix or matrices. Dimension of i^th matrix is no.of equivalence class by no.of annotations of i^th object.

eq.map

Either NULL or an integer matrix. It is NULL for a simple annotatedSNPset object. If more than one annotatedSNPset objects are merged into a composite object then this field holds a map matrix. Number of columns of the map matrix is the number of objects that are merged and the number of rows is the total number of new equivalence classes after merging.

dim

An R list of length 3. First element is a numeric vector of dimensions (number of SNPs no_snps, total number of equivalence classes no_eq_class,total number of annotation no_anno and total number of merged objects used_ob. Other two elements are either NULL(for simple object) or numeric vectors of length equal to the number of objects used for merging i.e. used_ob. These two vectors hold the number of rows and number of columns respectively of the binary matrices in the list eq.mat.

Accessors

In the code snippets below, x is a annotatedSNPset object.

getEQ(x):To extract 'snp.eq' slot

getDF(x):To extract 'snp.df' slot

getDIM(x):To extract first element 'dim' slot

getMAT(x):To extract equivalence class by annotation matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  obfile <- system.file("sampleData", "obData.rda", package="GKnowMTest")
  load(obfile) # loads a mapping object ob1 
  ob1

  res=getMAT(ob1) # use of acessor function 'getMAT'
  res[1:10,1:6]
  
  res=getDF(ob1)
  head(res)
  
  res=getDIM(ob1)
  res
  
  res=getEQ(ob1)
  head(res,20)

sbstatgen/GKnowMTest documentation built on May 27, 2019, 7:40 a.m.