readGeneExp: readGeneExp: read gene expression values to a matrix

Description Usage Arguments See Also Examples

View source: R/MainFunctionWrap.R

Description

This method is used to read gene expression values from a file to a matrix in R workspace. So that the matrix can be used as input of other packages, such as edgeR. The input of the method is a file that contains gene expression values.

Usage

1
   readGeneExp(file, geneCol=1, valCol=2, label = NULL, header=TRUE, sep="")

Arguments

file

file containing gene expression values.

geneCol

gene id column in file.

valCol

expression value columns to be read in the file.

label

label for the columns.

header

a logical value indicating whether the file contains the names of the variables as its first line. See ?read.table.

sep

the field separator character. If sep = "" (the default for read.table) the separator is white space, that is one or more spaces, tabs, newlines or carriage returns. See ?read.table.

See Also

getGeneExp, GeneExpExample1000, GeneExpExample5000.

Examples

1
2
3
4
5
6
  ## If the data files are collected in a zip archive, the following
  ## commands will first extract them to the temporary directory.

  geneExpFile <- system.file("extdata", "GeneExpExample1000.txt", package="DEGseq")
  exp <- readGeneExp(file=geneExpFile, geneCol=1, valCol=c(7,9,12,15,18,8,10,11,13,16))
  exp[30:35,]

Example output

Loading required package: qvalue
Loading required package: samr
                EnsemblGeneID     R1L1Kidney R1L3Kidney R1L7Kidney R2L2Kidney
ENSG00000188976 "ENSG00000188976" "73"       "77"       "68"       "70"      
ENSG00000187961 "ENSG00000187961" "15"       "15"       "13"       "12"      
ENSG00000187583 "ENSG00000187583" "1"        "1"        "3"        "0"       
ENSG00000187642 "ENSG00000187642" "4"        "5"        "12"       "9"       
ENSG00000188290 "ENSG00000188290" "9"        "10"       "12"       "10"      
ENSG00000187608 "ENSG00000187608" "12"       "11"       "7"        "16"      
                R2L6Kidney R1L2Liver R1L4Liver R1L6Liver R1L8Liver R2L3Liver
ENSG00000188976 "82"       "34"      "56"      "45"      "55"      "42"     
ENSG00000187961 "15"       "8"       "13"      "11"      "12"      "20"     
ENSG00000187583 "3"        "0"       "1"       "0"       "0"       "2"      
ENSG00000187642 "9"        "0"       "0"       "2"       "1"       "4"      
ENSG00000188290 "13"       "2"       "3"       "1"       "2"       "1"      
ENSG00000187608 "13"       "15"      "17"      "5"       "10"      "16"     

DEGseq documentation built on Nov. 8, 2020, 5:33 p.m.