Hi Jung,
First, thanks a lot for Martinâs help in answering questions
on gage.
A couple of general comments before I address you particular
questions: First, you need to read the help information on functions
(and
vignette) when you get problems with them. Second, you need to get
yourself
familiar with R/Bioc basics to use packages including gage
efficiently.
Â
For your problems, first the way you use readExpData gets
you a data.frame with gene symbols as the first column, you want a
ânumericâ data
matrix (or data.frame), therefore, you need to specify column 1as
row.names.
Micro_array_data <- readExpData(file =
"Micro_array_dataset.txt", row.names=1)
Â
To see help information of readExpData function:
?readExpData
Â
Second, you array data have 97 genes, which is kind of too
small. Although, most of you gene sets are big, they contain none or
very few
genes in your array data. In other words, you effective gene set sizes
are very
small, i.e. 0-7, which is well below the range you specified c(10,50).
Hence none
of these gene sets return you results. The following code tells you
this
problem:
array.genes=rownames(Micro_array_data)
effective.size=sapply(Gene_set, function(x) sum(x %in%
array.genes))
range(effective.size)
head(sort(effective.size, decreasing=T))
#output from above lines
> range(effective.size)
[1] 0 7
> head(sort(effective.size, decreasing=T))
 chr7q21 chr3p21 chr17q21 chr17q11 chr7q31 chr17p13
      7       4      Â
4Â Â Â Â Â Â Â 4Â Â Â Â Â Â Â 3Â Â Â Â Â Â Â
3
Â
You want to either use a real or more sensible microarray
dataset with at ~1000 or more genes. Or you can lower your effective
test size range
to c(3,50) if you stick to your current array data. The following line
works:
A1_compare_un <- gage(exprs = Micro_array_data, gsets =
Gene_set,set.size = c(3,50), ref=c(1,3,5), samp=c(2,4,6))
Â
One extra issue is that you want to transform your array
data to log or log2 scale as done in most array analysis package in
Bioc. The follow
code is an example:
range(Micro_array_data)
#[1]Â Â Â Â 0.00 16148.01
#add a small positive value like 0.1 to prevent log(0).
Micro_array_data=log2(Micro_array_data+0.1)
range(Micro_array_data)
#[1] -3.321928 13.979077
Â
Weijun
Â
--- On Sat, 1/28/12, Martin Morgan <mtmorgan@fhcrc.org> wrote:
From: Martin Morgan <mtmorgan@fhcrc.org>
Subject: Re: Error with GAGE
To: "Javerjung Sandhu" <jsandhu@bcgsc.ca>
Cc: "Luo Weijun" <luo_weijun@yahoo.com>, "bioconductor@r-project.org"
<bioconductor@r-project.org>, "vobencha@fhcrc.org"
<vobencha@fhcrc.org>
Date: Saturday, January 28, 2012, 12:39 AM
On 01/27/2012 12:52 PM, Javerjung Sandhu wrote:
> Dear list,
>
> I am getting the error shown in red below:
>
>Â > options(width=80)
>Â > Micro_array_data <- data.matrix(readExpData(file =
> "Micro_array_dataset.txt"))
you are expecting a matrix with 6 columns, and with row names equal to
gene symbols. Have you achieved this?
>Â > Gene_set <- readList("c1_all_v3_0_symbols.gmt")
>Â > A1_compare_un <- gage(exprs = Micro_array_data, gsets =
> Gene_set,set.size = c(10,50))
Your gene set includes genes that are not in your expression data, and
your expression data has genes not in your gene sets. Make them
consistent.
You specify a minimum gene set size of 10; do any of your gene sets,
updated to contain only genes in your expression data, satisfy this?
Are the expression values measured on a scale (e.g., log) appropriate
for gage?
gage expects more than one gene set.
> Error in if is.na(spval[i])) tmp[i] <- NA : argument is of length
zero
>Â > class(Micro_array_data)
> [1] "matrix"
>Â > dev.off()
> Error in dev.off() : cannot shut down device 1 (the null device)
>Â > detach("package:gage")
>Â >
>
> I have attached the input files used for this analysis. Help will be
> really appreciated.
>
> Thanks,
>
> Jung
>
--
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109
Location: M1-B861
Telephone: 206 667-2793
[[alternative HTML version deleted]]