setUpGenoDatFile: Loads genotype data onto R

Description Usage Arguments Value Author(s) See Also Examples

View source: R/genoDatClass.R

Description

Loads onto an R session genotype data from text files or PLINK files.

Usage

1
2
setUpGenoDatFile(file = "GenoDat.txt", saveRes = FALSE, sortMinor = TRUE)
setUpGenoDatSNPmat(Chr, Geno, Annot, saveRes = FALSE, saveGeno = FALSE)

Arguments

file

character. File path with genotype information

saveRes

logical. Wether results should be saved into file gDat.RData

sortMinor

logical. Whether genotypes should be sorted by minor allele frequency.

Chr

numeric. Chromosome number

Geno

snpMatrix. Matrix of raw with genotype data

Annot

numeric. Annotation information read from an .bim file

saveGeno

logical. Wether .txt file should be saved with genotype information

Value

GenoDat object

Author(s)

Alejandro Caceres acaceres@creal.cat

See Also

GenoDat

Examples

1
2
3
gen <- system.file("extdata", "genotypes.txt", package = "inveRsion")
gDat <-setUpGenoDatFile(file=gen,sortMinor=TRUE,saveRes=FALSE)
gDat

Example output

Loading required package: haplo.stats


Hola!

welcome to inevRsion package. 
 
 

type: manual() for full manual 
      vignette("inveRsion") for a quick start 

-processing data from file:/usr/local/lib/R/site-library/inveRsion/extdata/genotypes.txt-
  reading file ...
  setting: common allele=0, variant allele=1
  setting up GenoDat
-Set up object of class: GenoDat- 
-Showing object of class: GenoDat- 

@genoDat: Genotype Data
   * integer matrix ~ 9 subjects by  10 probes
   * first elements = 
   [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
V1 0    1    1    0    1    0    1    1    0    0    
V2 1    0    1    1    1    0    0    1    0    0    
V3 0    0    2    0    2    0    0    2    0    0    
V4 1    0    1    1    1    0    0    1    0    0    
V5 0    0    1    1    1    0    0    1    0    0    
V6 0    0    0    0    0    0    0    0    0    0    
V7 1    0    0    0    0    1    0    0    1    1    
V8 0    0    2    0    2    0    0    2    0    0    
V9 0    0    0    0    1    0    0    1    0    0    

@lociPos: Probe Corrdinates
   * integer ~ 10 probes 
   * first 10 elements = 
  V1   V2   V3   V4   V5   V6   V7   V8   V9  V10 
 959 1268 1393 1467 1531 1761 1847 1987 2006 2030 

Other slots... 

@allaleSum: allele sum at each probe 
@noMissCount: number of no missings values 

-end showing GenoDat- 

inveRsion documentation built on Nov. 8, 2020, 5:08 p.m.