Last data update: 2014.03.03

R: Annotation gene/SNP
data.to.list.gene.snpR Documentation

Annotation gene/SNP

Description

The data.to.list.gene.snp function generates the list containing for each gene the corresponding SNP ids from a txt file containing the SNP/gene annotation data. This list is required for the functions data.to.PIGE and ARTP.GE.

Usage

  data.to.list.gene.snp(file, header = TRUE, path = NULL)

Arguments

file

txt file containing the SNP/gene annotation (see Details for the format of the txt file).

header

a logical value indicating whether the file contains the names of the variables as its first line. By default header is set to TRUE.

path

linking to the directory containing the data (SNP/gene)

Details

The txt file containing the annotation data for the SNP/gene is a two columns matrix. The first colums is the name of each SNP. The second columns indicates the genes which the corresponding SNP (same row) belongs. It will be noted "Gene1/Gene4/Gene5", if for example a SNP belongs to the genes: Gene1, Gene4, Gene5.

Value

A list containing for each gene the names of the SNPs belonging to it. This list is required for using the function data.to.PIGE and the function ARTP.GE.

Author(s)

Benoit Liquet benoit.liquet@isped.u-bordeaux2.fr
Therese Truong therese.truong@inserm.fr

Examples

##Example : case-control study data
data(data.pige)
data(data.pathway)
path.in <- paste(system.file("sampleData", package="PIGE"),"/",sep="")
file <- "SNP-GENE-annotation.txt"
list.gene.snp <- data.to.list.gene.snp(file,path=path.in)
##Example Survival data
data("data.surv")
data("data.pathway.surv")
path.in <- paste(system.file("sampleData", package="PIGE"),"/",sep="")
file="snp.gene.surv.txt"
list.gene.snp.surv <- data.to.list.gene.snp(file,path=path.in)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(PIGE)
Loading required package: snowfall
Loading required package: snow
Loading required package: ARTP
Loading required package: xtable
Loading required package: survival
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PIGE/data.to.list.gene.snp.Rd_%03d_medium.png", width=480, height=480)
> ### Name: data.to.list.gene.snp
> ### Title: Annotation gene/SNP
> ### Aliases: data.to.list.gene.snp
> 
> ### ** Examples
> 
> ##Example : case-control study data
> data(data.pige)
> data(data.pathway)
> path.in <- paste(system.file("sampleData", package="PIGE"),"/",sep="")
> file <- "SNP-GENE-annotation.txt"
> list.gene.snp <- data.to.list.gene.snp(file,path=path.in)
> ##Example Survival data
> data("data.surv")
> data("data.pathway.surv")
> path.in <- paste(system.file("sampleData", package="PIGE"),"/",sep="")
> file="snp.gene.surv.txt"
> list.gene.snp.surv <- data.to.list.gene.snp(file,path=path.in)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>