PivotTransformData: "PivotTransformation"

Description Usage Arguments Details Value Examples

View source: R/Functions.R

Description

The PivotTransformation function converts a data frame with multiple rows per gene into a .csv file with one row per gene. This is the first step in data transformation to apply the REIDS function on a HPC Cluster.

Usage

1
2
PivotTransformData(Data, GeneID = NULL, ExonID = NULL, savecsv = FALSE,
  Name = NULL, location = NULL)

Arguments

Data

The data frame to be transformed.

GeneID

A character vector of the the gene IDs that correspond to the rows of the data frame. Necessary if no GeneID column is present in the data frame

ExonID

A character vector of the the gene IDs that correspond to the rows of the data frame. Necessary if no ExonID column is present in the data frame

savecsv

Logical. Should the file be saved as a .csv?

Name

The name of the file if it is saved a a .csv file.

location

The location where the file should be saved. The value NULL default to the current working directory.

Details

All information concerning one gene is gathered. The first column of the returned data frame is the gene ID, the second column contains the exon IDs of all exons of that gene. The third colum indicates the number of probes per exon, the fourth contains the values of thos probes per sample and the last column contains the sample names.This way a .csv file is created for processing on a HPC cluster.

Value

A data.frame with one row per gene. This row contains the values for each exon per sample and is convenient for processing on a HPC cluster.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
data=data.frame(GeneID=c("1","1","1","2","2","3","3","3","3"),
ExonID=c("a","b","b","c","c","d","d","e","e"),
Sample1=c(1.2,3.5,6.2,8.5,9.6,7.8,2.2,2.1,6.3),
Sample2=c(1.5,1.2,1.3,2.9,2.5,2.4,7.6,7.2,7.3))

PivotTransformData(Data=data,GeneID=NULL,ExonID=NULL,savecsv=TRUE,
Name="test",location=NULL)

## End(Not run)

REIDS documentation built on May 2, 2019, 4:45 p.m.