Hi Sean, you were right... there are some inf in my data. Thanks a lot for
your help!

On Thu, Jan 27, 2011 at 6:04 AM, Sean Davis <sdavis2@mail.nih.gov> wrote:

>
>
> On Thu, Jan 27, 2011 at 12:00 AM, avehna <avhena@gmail.com> wrote:
>
>> Hi All,
>>
>> I'm trying to cluster 21657 genes that are differentially expressed in my
>> microarray data, but it's actually not working for me. After reading the
>> normalized signal and calculating the mean for each treatment I proceed to
>> read the list of genes differentially expressed (previously calculated
>> using
>> limma). The problem occurs during "hclust" function (please see below my
>> code and corresponding error). Is it possible for this error to be due to
>> the number of genes? when I use the same code for only 1000 genes it works
>> pretty well.
>>
>> How could I solve this problem? I need this figure for my paper...
>>
>> Thank you for your help!
>>
>> Sincerely,
>> Avhena
>>
>>
>>
>> ************************************************
>> > signal<-signal[-grep("AFFX",rownames(signal)), ,drop=FALSE]
>> > pDatam <- read.AnnotatedDataFrame('pdatam.txt', row.names = 1, header =
>> TRUE, sep = '\t')
>> > pData <- read.AnnotatedDataFrame('pdata.txt', row.names = 1, header =
>> TRUE, sep = '\t')
>> > expset <- new("ExpressionSet", exprs = signal, phenoData = pData)
>>
>> > means1 <- means(pairwise.comparison(expset, "Type", c("Control", "BMP"),
>> method="logged", logged=FALSE))
>> > means2 <- means(pairwise.comparison(expset, "Type", c("BMP.VPA",
>> "SHH.1D"), method="logged", logged=FALSE))
>> > means3 <- means(pairwise.comparison(expset, "Type", c("SHH.6H",
>> "SHH.VPA.1D"), method="logged", logged=FALSE))
>> > all_means<-cbind(means1,means2,means3)
>> > expmeans <- new("ExpressionSet", exprs = all_means, phenoData = pDatam)
>> > subset<-get.array.subset(expmeans, "Type", c("Control", "BMP", "SHH.1D",
>> "SHH.VPA.1D"))
>> > genes<-read.table("affy_ids_diff_exprs05.dat")
>> > mysubset<-exprs(subset)[match(levels(genes[,]),
>> rownames(exprs(subset))),]
>>
>> > hr <- hclust(as.dist(1-cor(t(mysubset), method="spearman")),
>> method="complete")
>>
>> Error in hclust(as.dist(1 - cor(t(mysubset), method = "spearman")), method
>> =
>> "complete") :
>> NA/NaN/Inf in foreign function call (arg 11)
>>
>
> Looks like you might have some NAs or Inf in your data.  Try
> summary(mysubset) to see.
>
> Sean
>
>
>> Calls: hclust -> .Fortran
>> In addition: Warning message:
>> In cor(t(mysubset), method = "spearman") : the standard deviation is zero
>> Execution halted
>>
>>        [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> Bioconductor mailing list
>> Bioconductor@r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioconductor
>> Search the archives:
>> http://news.gmane.org/gmane.science.biology.informatics.conductor
>>
>
>

	[[alternative HTML version deleted]]

