Limma Package to read cDNA data
4
0
Entering edit mode
Joyce Gu ▴ 200
@joyce-gu-611
Last seen 9.6 years ago
I tried the command to read my .txt file into R for limma analysis, but I got the following error message: Error in file(con, "r") : unable to open connection In addition: Warning message: cannot open file `os677AT.txt' I could not figure out what's wrong? Any suggestion is greatly appreciated! >===== Original Message From Matthew Ritchie <mritchie@wehi.edu.au> ===== >Hi Joyce, > >The function read.maimages() should be able to handle your custom format >data. You can specify the columns you want to read in for the red >foreground and background (Rf, Rb) and green foreground and background >(Gf, Gb) using the 'columns' argument, which takes a list with >components Rf="red foreground column name", Gf="green foreground column >name", Rb="red background column name" and Gb="green background column >name". > >For example, if I have 2 image analysis output files (array1.txt and >array2.txt in tab delimited text format) in the current working >directory, and I want the columns "F635 Mean" and "F532 Mean" for the >red and green foregrounds and "B635 Median" and "B532 Median" for the >red and green backgrounds, then the following commands: > >files <- dir(pattern=".txt") >files ># [1] "array1.txt" "array2.txt" >RG <- read.maimages(files, columns=list(Rf="F635 Mean", Rb="B635 >Median", Gf="F532 Mean", Gb="B532 Median")) > >will read in the relevant columns and store them in an RGList object. > Alternatively, if your image analysis data is from one of the packages >Spot, GenePix, SMD, Imagene, Arrayvision or Quantarray, then you can >specify this using the 'source' argument. The relevant columns (Rf, Rb, >Gf and Gb) are extracted automatically when 'source' is specified. For >example > >RG <- read.maimages(files, source="genepix") > >is equivalent to the previous call. For more information on this >function, try > >?read.maimages > >or > >help.start() > >and take the 'Packages', 'limma' and '3.ReadingData' links. >Best wishes, > >Matt Ritchie
limma limma • 1.5k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 3 hours ago
WEHI, Melbourne, Australia
At 08:45 AM 5/03/2004, Joyce Gu wrote: >I tried the command to read my .txt file into R for limma analysis, What command, exactly? > but I got >the following error message: > >Error in file(con, "r") : unable to open connection >In addition: Warning message: >cannot open file `os677AT.txt' This means your data file doesn't exist. Type dir() and if you don't see the file, then neither can R. Did you type the name correctly? Do you need to specify a path? Do you need to set the working directory? Gordon >I could not figure out what's wrong? >Any suggestion is greatly appreciated! > > >===== Original Message From Matthew Ritchie <mritchie@wehi.edu.au> ===== > >Hi Joyce, > > > >The function read.maimages() should be able to handle your custom format > >data. You can specify the columns you want to read in for the red > >foreground and background (Rf, Rb) and green foreground and background > >(Gf, Gb) using the 'columns' argument, which takes a list with > >components Rf="red foreground column name", Gf="green foreground column > >name", Rb="red background column name" and Gb="green background column > >name". > > > >For example, if I have 2 image analysis output files (array1.txt and > >array2.txt in tab delimited text format) in the current working > >directory, and I want the columns "F635 Mean" and "F532 Mean" for the > >red and green foregrounds and "B635 Median" and "B532 Median" for the > >red and green backgrounds, then the following commands: > > > >files <- dir(pattern=".txt") > >files > ># [1] "array1.txt" "array2.txt" > >RG <- read.maimages(files, columns=list(Rf="F635 Mean", Rb="B635 > >Median", Gf="F532 Mean", Gb="B532 Median")) > > > >will read in the relevant columns and store them in an RGList object. > > Alternatively, if your image analysis data is from one of the packages > >Spot, GenePix, SMD, Imagene, Arrayvision or Quantarray, then you can > >specify this using the 'source' argument. The relevant columns (Rf, Rb, > >Gf and Gb) are extracted automatically when 'source' is specified. For > >example > > > >RG <- read.maimages(files, source="genepix") > > > >is equivalent to the previous call. For more information on this > >function, try > > > >?read.maimages > > > >or > > > >help.start() > > > >and take the 'Packages', 'limma' and '3.ReadingData' links. > >Best wishes, > > > >Matt Ritchie
ADD COMMENT
0
Entering edit mode
Joyce Gu ▴ 200
@joyce-gu-611
Last seen 9.6 years ago
Hi, I did have my file in R environment, first I use this command to get my file into my current directory, > file<-dir(path="D:/BioconductorProject/OScaseAnalysis",pattern="*.tx t") and I check it is there, > file [1] "os677AT.txt" then I used the following command to read my data into R RG<-read.maimages(file,columns=list(Rf="Ch2 Median",Rb="Ch2 B Median",Gf="Ch1 Median",Gb=" Ch1 B Median")) Unfortunately, I got the following error message, Error in file(con, "r") : unable to open connection In addition: Warning message: cannot open file `os677AT.txt' The file os677AT.txt is there, why they still can not find them. Thanks >===== Original Message From Gordon Smyth <smyth@wehi.edu.au> ===== >At 08:45 AM 5/03/2004, Joyce Gu wrote: >>I tried the command to read my .txt file into R for limma analysis, > >What command, exactly? > >> but I got >>the following error message: >> >>Error in file(con, "r") : unable to open connection >>In addition: Warning message: >>cannot open file `os677AT.txt' > >This means your data file doesn't exist. Type dir() and if you don't see >the file, then neither can R. Did you type the name correctly? Do you need >to specify a path? Do you need to set the working directory? > >Gordon > >>I could not figure out what's wrong? >>Any suggestion is greatly appreciated! >> >> >===== Original Message From Matthew Ritchie <mritchie@wehi.edu.au> ===== >> >Hi Joyce, >> > >> >The function read.maimages() should be able to handle your custom format >> >data. You can specify the columns you want to read in for the red >> >foreground and background (Rf, Rb) and green foreground and background >> >(Gf, Gb) using the 'columns' argument, which takes a list with >> >components Rf="red foreground column name", Gf="green foreground column >> >name", Rb="red background column name" and Gb="green background column >> >name". >> > >> >For example, if I have 2 image analysis output files (array1.txt and >> >array2.txt in tab delimited text format) in the current working >> >directory, and I want the columns "F635 Mean" and "F532 Mean" for the >> >red and green foregrounds and "B635 Median" and "B532 Median" for the >> >red and green backgrounds, then the following commands: >> > >> >files <- dir(pattern=".txt") >> >files >> ># [1] "array1.txt" "array2.txt" >> >RG <- read.maimages(files, columns=list(Rf="F635 Mean", Rb="B635 >> >Median", Gf="F532 Mean", Gb="B532 Median")) >> > >> >will read in the relevant columns and store them in an RGList object. >> > Alternatively, if your image analysis data is from one of the packages >> >Spot, GenePix, SMD, Imagene, Arrayvision or Quantarray, then you can >> >specify this using the 'source' argument. The relevant columns (Rf, Rb, >> >Gf and Gb) are extracted automatically when 'source' is specified. For >> >example >> > >> >RG <- read.maimages(files, source="genepix") >> > >> >is equivalent to the previous call. For more information on this >> >function, try >> > >> >?read.maimages >> > >> >or >> > >> >help.start() >> > >> >and take the 'Packages', 'limma' and '3.ReadingData' links. >> >Best wishes, >> > >> >Matt Ritchie
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 21 hours ago
United States
You did not have the file in your current directory. To set your directory, you have to use setwd(). What you did was just find the name of a file in a particular directory. Try setwd("D:/BioconductorProject/OScaseAnalysis") file <- list.files(pattern="\\.txt") and then proceed with your analysis. Best, Jim James W. MacDonald Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 >>> Joyce Gu <jwgu@bcm.tmc.edu> 03/05/04 10:28AM >>> Hi, I did have my file in R environment, first I use this command to get my file into my current directory, > file<-dir(path="D:/BioconductorProject/OScaseAnalysis",pattern="*.txt" ) and I check it is there, > file [1] "os677AT.txt" then I used the following command to read my data into R RG<-read.maimages(file,columns=list(Rf="Ch2 Median",Rb="Ch2 B Median",Gf="Ch1 Median",Gb=" Ch1 B Median")) Unfortunately, I got the following error message, Error in file(con, "r") : unable to open connection In addition: Warning message: cannot open file `os677AT.txt' The file os677AT.txt is there, why they still can not find them. Thanks >===== Original Message From Gordon Smyth <smyth@wehi.edu.au> ===== >At 08:45 AM 5/03/2004, Joyce Gu wrote: >>I tried the command to read my .txt file into R for limma analysis, > >What command, exactly? > >> but I got >>the following error message: >> >>Error in file(con, "r") : unable to open connection >>In addition: Warning message: >>cannot open file `os677AT.txt' > >This means your data file doesn't exist. Type dir() and if you don't see >the file, then neither can R. Did you type the name correctly? Do you need >to specify a path? Do you need to set the working directory? > >Gordon > >>I could not figure out what's wrong? >>Any suggestion is greatly appreciated! >> >> >===== Original Message From Matthew Ritchie <mritchie@wehi.edu.au> ===== >> >Hi Joyce, >> > >> >The function read.maimages() should be able to handle your custom format >> >data. You can specify the columns you want to read in for the red >> >foreground and background (Rf, Rb) and green foreground and background >> >(Gf, Gb) using the 'columns' argument, which takes a list with >> >components Rf="red foreground column name", Gf="green foreground column >> >name", Rb="red background column name" and Gb="green background column >> >name". >> > >> >For example, if I have 2 image analysis output files (array1.txt and >> >array2.txt in tab delimited text format) in the current working >> >directory, and I want the columns "F635 Mean" and "F532 Mean" for the >> >red and green foregrounds and "B635 Median" and "B532 Median" for the >> >red and green backgrounds, then the following commands: >> > >> >files <- dir(pattern=".txt") >> >files >> ># [1] "array1.txt" "array2.txt" >> >RG <- read.maimages(files, columns=list(Rf="F635 Mean", Rb="B635 >> >Median", Gf="F532 Mean", Gb="B532 Median")) >> > >> >will read in the relevant columns and store them in an RGList object. >> > Alternatively, if your image analysis data is from one of the packages >> >Spot, GenePix, SMD, Imagene, Arrayvision or Quantarray, then you can >> >specify this using the 'source' argument. The relevant columns (Rf, Rb, >> >Gf and Gb) are extracted automatically when 'source' is specified. For >> >example >> > >> >RG <- read.maimages(files, source="genepix") >> > >> >is equivalent to the previous call. For more information on this >> >function, try >> > >> >?read.maimages >> > >> >or >> > >> >help.start() >> > >> >and take the 'Packages', 'limma' and '3.ReadingData' links. >> >Best wishes, >> > >> >Matt Ritchie _______________________________________________ Bioconductor mailing list Bioconductor@stat.math.ethz.ch https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
Joyce Gu ▴ 200
@joyce-gu-611
Last seen 9.6 years ago
Hi Jim, I followed your instruction, it works. But,I have another question, since there are 20 lines which I want to skip, I tried to use skip=20 during file process or RG process, neither works. Do you have any suggestions? Thank you so much!! Joyce >===== Original Message From "James MacDonald" <jmacdon@med.umich.edu> ===== >You did not have the file in your current directory. To set your >directory, you have to use setwd(). What you did was just find the name >of a file in a particular directory. > >Try > >setwd("D:/BioconductorProject/OScaseAnalysis") >file <- list.files(pattern="\\.txt") > >and then proceed with your analysis. > >Best, > >Jim > > > >James W. MacDonald >Affymetrix and cDNA Microarray Core >University of Michigan Cancer Center >1500 E. Medical Center Drive >7410 CCGC >Ann Arbor MI 48109 >734-647-5623 > >>> Joyce Gu <jwgu@bcm.tmc.edu> 03/05/04 10:28AM >>> >Hi, >I did have my file in R environment, first I use this command to get my >file >into my current directory, >> >file<-dir(path="D:/BioconductorProject/OScaseAnalysis",pattern="*.txt ") >and I check it is there, >> file >[1] "os677AT.txt" >then I used the following command to read my data into R >RG<-read.maimages(file,columns=list(Rf="Ch2 Median",Rb="Ch2 B >Median",Gf="Ch1 >Median",Gb=" Ch1 B Median")) >Unfortunately, I got the following error message, >Error in file(con, "r") : unable to open connection >In addition: Warning message: >cannot open file `os677AT.txt' > >The file os677AT.txt is there, why they still can not find them. >Thanks > >>===== Original Message From Gordon Smyth <smyth@wehi.edu.au> ===== >>At 08:45 AM 5/03/2004, Joyce Gu wrote: >>>I tried the command to read my .txt file into R for limma analysis, >> >>What command, exactly? >> >>> but I got >>>the following error message: >>> >>>Error in file(con, "r") : unable to open connection >>>In addition: Warning message: >>>cannot open file `os677AT.txt' >> >>This means your data file doesn't exist. Type dir() and if you don't >see >>the file, then neither can R. Did you type the name correctly? Do you >need >>to specify a path? Do you need to set the working directory? >> >>Gordon >> >>>I could not figure out what's wrong? >>>Any suggestion is greatly appreciated! >>> >>> >===== Original Message From Matthew Ritchie <mritchie@wehi.edu.au> >===== >>> >Hi Joyce, >>> > >>> >The function read.maimages() should be able to handle your custom >format >>> >data. You can specify the columns you want to read in for the red >>> >foreground and background (Rf, Rb) and green foreground and >background >>> >(Gf, Gb) using the 'columns' argument, which takes a list with >>> >components Rf="red foreground column name", Gf="green foreground >column >>> >name", Rb="red background column name" and Gb="green background >column >>> >name". >>> > >>> >For example, if I have 2 image analysis output files (array1.txt >and >>> >array2.txt in tab delimited text format) in the current working >>> >directory, and I want the columns "F635 Mean" and "F532 Mean" for >the >>> >red and green foregrounds and "B635 Median" and "B532 Median" for >the >>> >red and green backgrounds, then the following commands: >>> > >>> >files <- dir(pattern=".txt") >>> >files >>> ># [1] "array1.txt" "array2.txt" >>> >RG <- read.maimages(files, columns=list(Rf="F635 Mean", Rb="B635 >>> >Median", Gf="F532 Mean", Gb="B532 Median")) >>> > >>> >will read in the relevant columns and store them in an RGList >object. >>> > Alternatively, if your image analysis data is from one of the >packages >>> >Spot, GenePix, SMD, Imagene, Arrayvision or Quantarray, then you >can >>> >specify this using the 'source' argument. The relevant columns >(Rf, Rb, >>> >Gf and Gb) are extracted automatically when 'source' is specified. >For >>> >example >>> > >>> >RG <- read.maimages(files, source="genepix") >>> > >>> >is equivalent to the previous call. For more information on this >>> >function, try >>> > >>> >?read.maimages >>> > >>> >or >>> > >>> >help.start() >>> > >>> >and take the 'Packages', 'limma' and '3.ReadingData' links. >>> >Best wishes, >>> > >>> >Matt Ritchie > >_______________________________________________ >Bioconductor mailing list >Bioconductor@stat.math.ethz.ch >https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
ADD COMMENT
0
Entering edit mode
Hi Joyce, I'd suggest you leave out the skip argument from read.maimages() as it's unnecessary. When you include skip=20, I guess you get an error like Error in read.table(fullname, skip = skip, header = TRUE, sep = sep, quote = quote, : formal argument "skip" matched by multiple actual arguments The function read.maimages() automatically works out how many lines to skip before it reads in the data. Best wishes, Matt Ritchie > Hi Jim, > I followed your instruction, it works. > But,I have another question, since there are 20 lines which I want to > skip, I tried to use skip=20 during file process or RG process, neither > works. Do you have any suggestions? > Thank you so much!! > Joyce >>===== Original Message From "James MacDonald" <jmacdon@med.umich.edu> >> ===== You did not have the file in your current directory. To set your >>directory, you have to use setwd(). What you did was just find the name >> of a file in a particular directory. >> >>Try >> >>setwd("D:/BioconductorProject/OScaseAnalysis") >>file <- list.files(pattern="\\.txt") >> >>and then proceed with your analysis. >> >>Best, >> >>Jim >> >> >> >>James W. MacDonald >>Affymetrix and cDNA Microarray Core >>University of Michigan Cancer Center >>1500 E. Medical Center Drive >>7410 CCGC >>Ann Arbor MI 48109 >>734-647-5623
ADD REPLY

Login before adding your answer.

Traffic: 455 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