[BioC] data() function problem

ZRG (Zeren Gao) gaoz at zgi.com
Fri May 9 14:25:07 MEST 2003


Hi there,
This time I used "sep" in my read.table command, still get the same resutls as showing below:
> test <- read.table("C:/My Download Files/microarray/PGA-HCL/PGA-HCL_UA_dat_r.txt", header = TRUE, sep = "\t")
> igenes <- c(19202)
> closeg <- genefinder(test, igenes, 10, method = "euc", scale = "none")
Error in genefinder(test, igenes, 10, method = "euc", scale = "none") : 
        No direct or inherited method for function "genefinder" for this call

Any suggestion why is this happening? what is direct or inherited method here? 
thanks a lot for helping. 
Zeren gao
 

-----Original Message-----
From: John Zhang [mailto:jzhang at jimmy.harvard.edu]
Sent: Friday, May 09, 2003 5:37 AM
To: ZRG (Zeren Gao); bioconductor at stat.math.ethz.ch
Subject: RE: [BioC] data() function problem



>Hi there,
>Here is the detail of my problem. 
>1) I am try to find genes with expression level correlates to a specified gene. 
>2) Therefore, I try to fun genefinder, whcih will find genes 'close' to 
specified genes, I am not sure what close meant here, is the absolute expression 
level close or have correlation. I assume is the later.
>3) I try to run it as describe in the example. following is my command line
>with window verion.
>>library(genefilter)
>>data(C://.......file.txt)
>it become "load...." automatically, instead of read.table.
>Therefore I read in the data file
>>file <- read.table(C://....file.txt, header=TRUE)

What is the separator for the file? The default for read.table is "" but your 
file seems to have a tab ("\t") separator. Try file <- 
read.table(C://....file.txt, header=TRUE, sep = "\t")

>>igenes <-c(19202)
>>closeg <- genefinder(file, igenes, 10, method= "euc", scale = "none")
>I got an error message:
>Error in genefinder(file, igenes, 10, method = "euc", scale = "none") : 
>No direct or inherited method for function "genefinder" for this call

genefinder expects file to be a matrix, which may not be true if file is not 
read correctly.


>
>So I don't know what is going on. 
>1)I have run the example with supplied data 'eset', works fine. 
>2)I am not sure if data() did anything to the file make genefinder works 
>3)I am not sure why data() refuse to read file.txt
>
>more help needed. 
>
>Thanks a lot.
>
>Zeren Gao 
>
>-----Original Message-----
>From: John Zhang [mailto:jzhang at jimmy.harvard.edu]
>Sent: Thursday, May 08, 2003 7:33 AM
>To: ZRG (Zeren Gao); bioconductor at stat.math.ethz.ch
>Subject: Re: [BioC] data() function problem
>
>
>
>
>>I try to run example of genefilter and the data() has following error 
>>Error: bad restore file magic number (file may be corrupted)-- no data loaded
>
>Can you be more specific on what example you were running on what data set?
>
>>it works fine with sample data set 'eset', therefore, it clearly needs to some 
>how change my data format. 
>>My data format is 
>>probe		exp1		exp2	...
>>1037_at		23		34	...
>
>Were you using data() to read your own data set? data() works like this:
>
>        1.  files ending `.R' or `.r' are `source()'d in, with the R
>            working directory changed temporarily to the directory
>            containing the respective file.
>
>        2.  files ending `.RData' or `.rda' are `load()'ed.
>
>        3.  files ending `.tab', `.txt' or `.TXT' are read using
>           `read.table(..., header = TRUE)', and hence result in a data
>           frame.
>
>        4.  files ending `.csv' or `.CSV' are read using
>           `read.table(..., header = TRUE, sep = ";")', and also result
>           in a data frame.
>
>Do you have the correct extension?
>
>>
>>any comments?
>>Thanks.
>>Zeren Gao
>>
>>_______________________________________________
>>Bioconductor mailing list
>>Bioconductor at stat.math.ethz.ch
>>https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
>
>Jianhua Zhang
>Department of Biostatistics
>Dana-Farber Cancer Institute
>44 Binney Street
>Boston, MA 02115-6084
>
>_______________________________________________
>Bioconductor mailing list
>Bioconductor at stat.math.ethz.ch
>https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor

Jianhua Zhang
Department of Biostatistics
Dana-Farber Cancer Institute
44 Binney Street
Boston, MA 02115-6084



More information about the Bioconductor mailing list