ReadAffy() function
2
0
Entering edit mode
Ron Ophir ▴ 60
@ron-ophir-3919
Last seen 10.3 years ago
Dear list users, I am running ReadAffy() function under R version 2.10.0 (2009-10-26) i386-pc-mingw32 locale: [1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255 [3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C [5] LC_TIME=Hebrew_Israel.1255 attached base packages: [1] stats graphics grDevices utils datasets methods [7] base other attached packages: [1] RColorBrewer_1.0-2 Heatplus_1.16.0 limma_3.2.1 [4] affy_1.24.2 Biobase_2.6.1 loaded via a namespace (and not attached): [1] affyio_1.14.0 preprocessCore_1.8.0 tools_2.10.0 > >From some reason the following code works C.anno = read.delim(file="gal/Citrus.gal",stringsAsFactors=FALSE) targets = read.delim(file="targets/Targets.txt",stringsAsFactors=FALSE) C.raw = ReadAffy(filenames = targets$FileName, celfile.path = "data", sampleNames = paste(targets$Target,targets$Repeat,sep="") ) C.raw@phenoData = new("AnnotatedDataFrame",data = targets) C.raw@featureData = new("AnnotatedDataFrame",data = C.anno) whereas this one C.raw = ReadAffy(filenames = targets$FileName, celfile.path = "data", sampleNames = paste(targets$Target,targets$Repeat,sep=""), phenoData = new("AnnotatedDataFrame",data = targets), featureData = new("AnnotatedDataFrame",data =C.anno) ) does not. I get the following error message: Error: the following are not valid files: data/new("AnnotatedDataFrame", data = C.anno) In addition: Warning message: In AllButCelsForReadAffy(..., filenames = filenames, widget = widget, : sampleNames not same length as filenames. Using filenames as sampleNames instead !! Targets and C.anno are data.frames, since they were read by read.delim() function. Can you think of why is that? Thanks, Ron This mail was sent via Mail-SeCure System. [[alternative HTML version deleted]]
• 2.9k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 13 hours ago
United States
Hi Ron, Ron Ophir wrote: > Dear list users, > > > > I am running ReadAffy() function under > > > > R version 2.10.0 (2009-10-26) > > i386-pc-mingw32 > > > > locale: > > [1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255 > > [3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C > > [5] LC_TIME=Hebrew_Israel.1255 > > > > attached base packages: > > [1] stats graphics grDevices utils datasets methods > > [7] base > > > > other attached packages: > > [1] RColorBrewer_1.0-2 Heatplus_1.16.0 limma_3.2.1 > > [4] affy_1.24.2 Biobase_2.6.1 > > > > loaded via a namespace (and not attached): > > [1] affyio_1.14.0 preprocessCore_1.8.0 tools_2.10.0 > > > > >>From some reason the following code works > > > > C.anno = read.delim(file="gal/Citrus.gal",stringsAsFactors=FALSE) > > targets = read.delim(file="targets/Targets.txt",stringsAsFactors=FALSE) > > > > C.raw = ReadAffy(filenames = targets$FileName, > > celfile.path = "data", > > sampleNames = > paste(targets$Target,targets$Repeat,sep="") > > ) > > > > C.raw at phenoData = new("AnnotatedDataFrame",data = targets) > > C.raw at featureData = new("AnnotatedDataFrame",data = C.anno) > > > > whereas this one > > > > C.raw = ReadAffy(filenames = targets$FileName, > > celfile.path = "data", > > sampleNames = > paste(targets$Target,targets$Repeat,sep=""), > > phenoData = new("AnnotatedDataFrame",data = targets), > > featureData = new("AnnotatedDataFrame",data =C.anno) > > ) > > > > > > does not. > > > > I get the following error message: > > > > Error: the following are not valid files: > > data/new("AnnotatedDataFrame", data = C.anno) > > In addition: Warning message: > > In AllButCelsForReadAffy(..., filenames = filenames, widget = widget, : > > sampleNames not same length as filenames. Using filenames as > sampleNames instead > > > > > > !! Targets and C.anno are data.frames, since they were read by > read.delim() function. > > > > Can you think of why is that? Sure. You are passing a non-existent argument to a function that has the ellipsis (...) as its first argument. In this case, the ellipsis is there to allow ReadAffy() to accept comma-delimited file names. What is happening is that featureData = new("AnnotatedDataFrame", data = C.anno) is being parsed and (attempted to be) added to the vector of file names. Since the parsed value isn't a valid file you get the first error. Since your sampleNames and filenames are now different, you get the second warning. Take home lesson: don't add fictitious arguments to ReadAffy(). Best, Jim > > > > > > Thanks, > > Ron > > > > > > > This mail was sent via Mail-SeCure System. > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician Douglas Lab University of Michigan Department of Human Genetics 5912 Buhl 1241 E. Catherine St. Ann Arbor MI 48109-5618 734-615-7826 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
ADD COMMENT
0
Entering edit mode
Ron Ophir ▴ 60
@ron-ophir-3919
Last seen 10.3 years ago
# -----Original Message----- # From: James W. MacDonald [mailto:jmacdon at med.umich.edu] # Sent: Tuesday, February 02, 2010 7:22 PM # To: Ron Ophir # Cc: bioconductor at stat.math.ethz.ch # Subject: Re: [BioC] ReadAffy() function # # Hi Ron, # # Ron Ophir wrote: # > Dear list users, # > # > # > # > I am running ReadAffy() function under # > # > # > # > R version 2.10.0 (2009-10-26) # > # > i386-pc-mingw32 # > # > # > # > locale: # > # > [1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255 # > # > [3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C # > # > [5] LC_TIME=Hebrew_Israel.1255 # > # > # > # > attached base packages: # > # > [1] stats graphics grDevices utils datasets methods # > # > [7] base # > # > # > # > other attached packages: # > # > [1] RColorBrewer_1.0-2 Heatplus_1.16.0 limma_3.2.1 # > # > [4] affy_1.24.2 Biobase_2.6.1 # > # > # > # > loaded via a namespace (and not attached): # > # > [1] affyio_1.14.0 preprocessCore_1.8.0 tools_2.10.0 # > # > # > # > # >>From some reason the following code works # > # > # > # > C.anno = read.delim(file="gal/Citrus.gal",stringsAsFactors=FALSE) # > # > targets = read.delim(file="targets/Targets.txt",stringsAsFactors=FALSE) # > # > # > # > C.raw = ReadAffy(filenames = targets$FileName, # > # > celfile.path = "data", # > # > sampleNames = # > paste(targets$Target,targets$Repeat,sep="") # > # > ) # > # > # > # > C.raw at phenoData = new("AnnotatedDataFrame",data = targets) # > # > C.raw at featureData = new("AnnotatedDataFrame",data = C.anno) # > # > # > # > whereas this one # > # > # > # > C.raw = ReadAffy(filenames = targets$FileName, # > # > celfile.path = "data", # > # > sampleNames = # > paste(targets$Target,targets$Repeat,sep=""), # > # > phenoData = new("AnnotatedDataFrame",data = targets), # > # > featureData = new("AnnotatedDataFrame",data =C.anno) # > # > ) # > # > # > # > # > # > does not. # > # > # > # > I get the following error message: # > # > # > # > Error: the following are not valid files: # > # > data/new("AnnotatedDataFrame", data = C.anno) # > # > In addition: Warning message: # > # > In AllButCelsForReadAffy(..., filenames = filenames, widget = widget, : # > # > sampleNames not same length as filenames. Using filenames as # > sampleNames instead # > # > # > # > # > # > !! Targets and C.anno are data.frames, since they were read by # > read.delim() function. # > # > # > # > Can you think of why is that? # # Sure. You are passing a non-existent argument to a function that has the # ellipsis (...) as its first argument. In this case, the ellipsis is # there to allow ReadAffy() to accept comma-delimited file names. # # What is happening is that featureData = new("AnnotatedDataFrame", data = # C.anno) is being parsed and (attempted to be) added to the vector of # file names. Since the parsed value isn't a valid file you get the first # error. Since your sampleNames and filenames are now different, you get # the second warning. # # Take home lesson: don't add fictitious arguments to ReadAffy(). # # Best, # # Jim # # [Ron Ophir] oops! That's a good idea not to add fictitious arguments to ReadAffy(). I took it from an old script I wrote. Where I had prepared new ExpressionSet object - some of the arguments are synonyms and that's where the mistake come from. It happens. Thanks for the explanation! R. # > # > # > # > # > # > Thanks, # > # > Ron # > # > # > # > # > # > # > This mail was sent via Mail-SeCure System. # > # > # > # > [[alternative HTML version deleted]] # > # > _______________________________________________ # > Bioconductor mailing list # > Bioconductor at stat.math.ethz.ch # > https://stat.ethz.ch/mailman/listinfo/bioconductor # > Search the archives: # http://news.gmane.org/gmane.science.biology.informatics.conductor # # -- # James W. MacDonald, M.S. # Biostatistician # Douglas Lab # University of Michigan # Department of Human Genetics # 5912 Buhl # 1241 E. Catherine St. # Ann Arbor MI 48109-5618 # 734-615-7826 # ********************************************************** # Electronic Mail is not secure, may not be read every day, and should not # be used for urgent or sensitive issues # # # This mail was received via Mail-SeCure System. # This mail was sent via Mail-SeCure System.
ADD COMMENT

Login before adding your answer.

Traffic: 730 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6