reading data from Beadarray into R
2
0
Entering edit mode
@hajar-hassani-lahsinoui-4281
Last seen 9.7 years ago
Hello everyone, I'm new to R. I've received data from a bead array, consisting of 24 samples. I've installed the beadarray package from bioconductor. The problem is that whenever I try to read the data into R it gives me an error message. I don't know what I'm doing wrong (checked the directory) The txt files look like this: In R: library(beadarray) Loading required package: Biobase Welcome to Bioconductor Vignettes contain introductory material. To view, type 'openVignette()'. To cite Bioconductor, see 'citation("Biobase")' and for packages 'citation(pkgname)'. targets = read.table("BeadTypeFile.txt") Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file 'BeadTypeFile.txt': No such file or directory What am I doing wrong?? Please help. Thanks, H.Hassani MD, University of Amsterdam
beadarray beadarray • 2.0k views
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 14 months ago
United States
Hi, On Wed, Sep 29, 2010 at 3:16 PM, Hajar Hassani Lahsinoui <hajar.hassani at="" gmail.com=""> wrote: > Hello everyone, > > I'm new to R. I've received data from a bead array, consisting of 24 samples. > I've installed the beadarray package from bioconductor. > The problem is that whenever I try to read the data into R it gives me an error message. > I don't know what I'm doing wrong (checked the directory) *which* directory, is the question. > targets = read.table("BeadTypeFile.txt") > Error in file(file, "rt") : cannot open the connection > In addition: Warning message: > In file(file, "rt") : > ?cannot open file 'BeadTypeFile.txt': No such file or directory R is telling you that it can't find "BeadTypeFile.txt". You are giving R a relative path to a file, so it tries to find the file in the current directory R is running in. To see which directory that is, type: R> getwd() ## you'll see an answer here. Is your BeadTypeFile.txt in the directory that is returned from `getwd()`? If not, you can simply try to use the absolute path to the file for your `read.table` call. -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD COMMENT
0
Entering edit mode
@steve-lianoglou-2771
Last seen 14 months ago
United States
Hi Hajar, (please hit "reply-all" when replying to posts on this thread, so that the help provided will stay on the mailing list) Comments in line: On Wed, Sep 29, 2010 at 3:34 PM, Hajar Hassani Lahsinoui <hajar.hassani at="" gmail.com=""> wrote: > Thanks for the reply! > It gives me the right directory: > > getwd() > [1] "/Users/hajarhassani/Documents/Image Data/5513091009" > > This is the correct directory where my BeadTypeFile is. Is there another way to read the data? If that's true, are the permissions on the file messed up then, or something? Does: R> file.exists('BeadTypeFile.txt') return TRUE? I'm guessing not, in which case something is still wrong with the directory you are in, and where you think the file is in. What if you try: R> targets = read.table("/Users/hajarhassani/Documents/Image Data/5513091009/BeadTypeFile.txt") -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD COMMENT
0
Entering edit mode
On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: > argets = read.table("/Users/hajarhassani/Documents/Image > Data/5513091009/BeadTypeFile.txt") Hi Steve, You were right: file.exists('BeadTypeFile.txt') [1] FALSE > targets = read.table("/Users/hajarhassani/Documents/Image + Data/5513091009/BeadTypeFile.txt") Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file '/Users/hajarhassani/Documents/Image Data/5513091009/BeadTypeFile.txt': No such file or directory I tried changing the directory to the DVD they gave me the data on (instead of my HD), but still the same message. The thing is that I can open the txt files if I click on them from my HD (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... Hajar
ADD REPLY
0
Entering edit mode
Hi, On Wed, Sep 29, 2010 at 4:05 PM, Hajar Hassani Lahsinoui <hajar.hassani at="" gmail.com=""> wrote: > > On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: > >> argets = read.table("/Users/hajarhassani/Documents/Image >> Data/5513091009/BeadTypeFile.txt") > Hi Steve, > > You were right: > > file.exists('BeadTypeFile.txt') > [1] FALSE > >> targets = read.table("/Users/hajarhassani/Documents/Image > + Data/5513091009/BeadTypeFile.txt") > Error in file(file, "rt") : cannot open the connection > In addition: Warning message: > In file(file, "rt") : > ?cannot open file '/Users/hajarhassani/Documents/Image > Data/5513091009/BeadTypeFile.txt': No such file or directory > > I tried changing the directory to the DVD they gave me the data on (instead of my HD), but still the same message. The thing is that I can open the txt files if I click on them from my HD (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... Maybe it's the space-in-the-directory thing. Try creating some "experiment" folder on your desktop and copy all the files you need into it, then: R> targets <- read.table('/Users/hajarhassani/Desktop/experiment/BeadTypeFile.txt') -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD REPLY
0
Entering edit mode
Still not working.... getwd() [1] "/Users/hajarhassani/Desktop/Experiment" > targets <- read.table('/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt') Error in file(file, "rt") : cannot open the connection In addition: Warning message: In file(file, "rt") : cannot open file '/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt': No such file or directory I put 14 files in the experiment folder. The files look right: > -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen shot 2010-09-29 at 11.00.35 PM.png Type: image/png Size: 13202 bytes Desc: not available URL: <https: stat.ethz.ch="" pipermail="" bioconductor="" attachments="" 20100929="" 0c5b93bf="" attachment.png=""> -------------- next part -------------- Could there be something wrong with the way the files were saved? R seems to work just fine with SAMExample practice dataset from bioconductor. On Sep 29, 2010, at 10:32 PM, Steve Lianoglou wrote: > Hi, > > On Wed, Sep 29, 2010 at 4:05 PM, Hajar Hassani Lahsinoui > <hajar.hassani at="" gmail.com=""> wrote: >> >> On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: >> >>> argets = read.table("/Users/hajarhassani/Documents/Image >>> Data/5513091009/BeadTypeFile.txt") >> Hi Steve, >> >> You were right: >> >> file.exists('BeadTypeFile.txt') >> [1] FALSE >> >>> targets = read.table("/Users/hajarhassani/Documents/Image >> + Data/5513091009/BeadTypeFile.txt") >> Error in file(file, "rt") : cannot open the connection >> In addition: Warning message: >> In file(file, "rt") : >> cannot open file '/Users/hajarhassani/Documents/Image >> Data/5513091009/BeadTypeFile.txt': No such file or directory >> >> I tried changing the directory to the DVD they gave me the data on (instead of my HD), but still the same message. The thing is that I can open the txt files if I click on them from my HD (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... > > Maybe it's the space-in-the-directory thing. > > Try creating some "experiment" folder on your desktop and copy all the > files you need into it, then: > > R> targets <- read.table('/Users/hajarhassani/Desktop/experiment/BeadTypeFile.txt') > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > | Memorial Sloan-Kettering Cancer Center > | Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD REPLY
0
Entering edit mode
Hi, Just a sanity check - is one of the 14 files you put in the experiment folder called "beadTypeFile.txt"? You can check by doing: > setwd( "/Users/hajarhassani/Desktop/Experiment") > dir() This will list out all the file names in the working directory. I often do this then copy and paste to make sure I've got a file name correct. Jenny At 04:12 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >Still not working.... > >getwd() >[1] "/Users/hajarhassani/Desktop/Experiment" > > > targets <- > read.table('/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt') >Error in file(file, "rt") : cannot open the connection >In addition: Warning message: >In file(file, "rt") : > cannot open file > '/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt': No such > file or directory > >I put 14 files in the experiment folder. The files look right: > > > > > > > >Could there be something wrong with the way the files were saved? >R seems to work just fine with SAMExample practice dataset from bioconductor. > > > > >On Sep 29, 2010, at 10:32 PM, Steve Lianoglou wrote: > > > Hi, > > > > On Wed, Sep 29, 2010 at 4:05 PM, Hajar Hassani Lahsinoui > > <hajar.hassani at="" gmail.com=""> wrote: > >> > >> On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: > >> > >>> argets = read.table("/Users/hajarhassani/Documents/Image > >>> Data/5513091009/BeadTypeFile.txt") > >> Hi Steve, > >> > >> You were right: > >> > >> file.exists('BeadTypeFile.txt') > >> [1] FALSE > >> > >>> targets = read.table("/Users/hajarhassani/Documents/Image > >> + Data/5513091009/BeadTypeFile.txt") > >> Error in file(file, "rt") : cannot open the connection > >> In addition: Warning message: > >> In file(file, "rt") : > >> cannot open file '/Users/hajarhassani/Documents/Image > >> Data/5513091009/BeadTypeFile.txt': No such file or directory > >> > >> I tried changing the directory to the DVD they gave me the data > on (instead of my HD), but still the same message. The thing is > that I can open the txt files if I click on them from my HD > (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... > > > > Maybe it's the space-in-the-directory thing. > > > > Try creating some "experiment" folder on your desktop and copy all the > > files you need into it, then: > > > > R> targets <- > read.table('/Users/hajarhassani/Desktop/experiment/BeadTypeFile.txt') > > > > -- > > Steve Lianoglou > > Graduate Student: Computational Systems Biology > > | Memorial Sloan-Kettering Cancer Center > > | Weill Medical College of Cornell University > > Contact Info: http://cbio.mskcc.org/~lianos/contact > > >_______________________________________________ >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
ADD REPLY
0
Entering edit mode
Hi, I think so, I removed a few files, so there are 6 now. This is what I get: dir() [1] "5513091009_A_beadTypeFile.txt" "5513091009_B_beadTypeFile.txt" "5513091009_C_beadTypeFile.txt" "5513091009_D_beadTypeFile.txt" "5513091009_E_beadTypeFile.txt" "5513091009_F_beadTypeFile.txt" > 5513091009_A_beadTypeFile.txt 5513091009_B_beadTypeFile.txt 5513091009_C_beadTypeFile.txt 5513091009_D_beadTypeFile.txt 5513091009_E_beadTypeFile.txt 5513091009_F_beadTypeFile.txt Hajar On Sep 29, 2010, at 11:30 PM, Jenny Drnevich wrote: > Hi, > > Just a sanity check - is one of the 14 files you put in the experiment folder called "beadTypeFile.txt"? You can check by doing: > > > setwd( "/Users/hajarhassani/Desktop/Experiment") > > dir() > > This will list out all the file names in the working directory. I often do this then copy and paste to make sure I've got a file name correct. > > Jenny > > At 04:12 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >> Still not working.... >> >> getwd() >> [1] "/Users/hajarhassani/Desktop/Experiment" >> >> > targets <- read.table('/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt') >> Error in file(file, "rt") : cannot open the connection >> In addition: Warning message: >> In file(file, "rt") : >> cannot open file '/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt': No such file or directory >> >> I put 14 files in the experiment folder. The files look right: >> >> >> > >> >> >> >> Could there be something wrong with the way the files were saved? >> R seems to work just fine with SAMExample practice dataset from bioconductor. >> >> >> >> >> On Sep 29, 2010, at 10:32 PM, Steve Lianoglou wrote: >> >> > Hi, >> > >> > On Wed, Sep 29, 2010 at 4:05 PM, Hajar Hassani Lahsinoui >> > <hajar.hassani at="" gmail.com=""> wrote: >> >> >> >> On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: >> >> >> >>> argets = read.table("/Users/hajarhassani/Documents/Image >> >>> Data/5513091009/BeadTypeFile.txt") >> >> Hi Steve, >> >> >> >> You were right: >> >> >> >> file.exists('BeadTypeFile.txt') >> >> [1] FALSE >> >> >> >>> targets = read.table("/Users/hajarhassani/Documents/Image >> >> + Data/5513091009/BeadTypeFile.txt") >> >> Error in file(file, "rt") : cannot open the connection >> >> In addition: Warning message: >> >> In file(file, "rt") : >> >> cannot open file '/Users/hajarhassani/Documents/Image >> >> Data/5513091009/BeadTypeFile.txt': No such file or directory >> >> >> >> I tried changing the directory to the DVD they gave me the data on (instead of my HD), but still the same message. The thing is that I can open the txt files if I click on them from my HD (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... >> > >> > Maybe it's the space-in-the-directory thing. >> > >> > Try creating some "experiment" folder on your desktop and copy all the >> > files you need into it, then: >> > >> > R> targets <- read.table('/Users/hajarhassani/Desktop/experiment/BeadTypeFile.txt') >> > >> > -- >> > Steve Lianoglou >> > Graduate Student: Computational Systems Biology >> > | Memorial Sloan-Kettering Cancer Center >> > | Weill Medical College of Cornell University >> > Contact Info: http://cbio.mskcc.org/~lianos/contact >> >> >> _______________________________________________ >> 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 >
ADD REPLY
0
Entering edit mode
Hi Hajar, There's your problem. You don't have a file just called "beadTypeFile.txt". To read in any one of these files, you have to specify it EXACTLY by name: > targets <- read.table("5513091009_A_beadTypeFile.txt") HTH, Jenny At 04:38 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >Hi, > >I think so, I removed a few files, so there are 6 now. >This is what I get: > >dir() >[1] "5513091009_A_beadTypeFile.txt" "5513091009_B_beadTypeFile.txt" >"5513091009_C_beadTypeFile.txt" "5513091009_D_beadTypeFile.txt" >"5513091009_E_beadTypeFile.txt" "5513091009_F_beadTypeFile.txt" > > 5513091009_A_beadTypeFile.txt >5513091009_B_beadTypeFile.txt >5513091009_C_beadTypeFile.txt >5513091009_D_beadTypeFile.txt >5513091009_E_beadTypeFile.txt >5513091009_F_beadTypeFile.txt > >Hajar > >On Sep 29, 2010, at 11:30 PM, Jenny Drnevich wrote: > > > Hi, > > > > Just a sanity check - is one of the 14 files you put in the > experiment folder called "beadTypeFile.txt"? You can check by doing: > > > > > setwd( "/Users/hajarhassani/Desktop/Experiment") > > > dir() > > > > This will list out all the file names in the working directory. I > often do this then copy and paste to make sure I've got a file name correct. > > > > Jenny > > > > At 04:12 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: > >> Still not working.... > >> > >> getwd() > >> [1] "/Users/hajarhassani/Desktop/Experiment" > >> > >> > targets <- > read.table('/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt') > >> Error in file(file, "rt") : cannot open the connection > >> In addition: Warning message: > >> In file(file, "rt") : > >> cannot open file > '/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt': No such > file or directory > >> > >> I put 14 files in the experiment folder. The files look right: > >> > >> > >> > > >> > >> > >> > >> Could there be something wrong with the way the files were saved? > >> R seems to work just fine with SAMExample practice dataset from > bioconductor. > >> > >> > >> > >> > >> On Sep 29, 2010, at 10:32 PM, Steve Lianoglou wrote: > >> > >> > Hi, > >> > > >> > On Wed, Sep 29, 2010 at 4:05 PM, Hajar Hassani Lahsinoui > >> > <hajar.hassani at="" gmail.com=""> wrote: > >> >> > >> >> On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: > >> >> > >> >>> argets = read.table("/Users/hajarhassani/Documents/Image > >> >>> Data/5513091009/BeadTypeFile.txt") > >> >> Hi Steve, > >> >> > >> >> You were right: > >> >> > >> >> file.exists('BeadTypeFile.txt') > >> >> [1] FALSE > >> >> > >> >>> targets = read.table("/Users/hajarhassani/Documents/Image > >> >> + Data/5513091009/BeadTypeFile.txt") > >> >> Error in file(file, "rt") : cannot open the connection > >> >> In addition: Warning message: > >> >> In file(file, "rt") : > >> >> cannot open file '/Users/hajarhassani/Documents/Image > >> >> Data/5513091009/BeadTypeFile.txt': No such file or directory > >> >> > >> >> I tried changing the directory to the DVD they gave me the > data on (instead of my HD), but still the same message. The thing > is that I can open the txt files if I click on them from my HD > (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... > >> > > >> > Maybe it's the space-in-the-directory thing. > >> > > >> > Try creating some "experiment" folder on your desktop and copy all the > >> > files you need into it, then: > >> > > >> > R> targets <- > read.table('/Users/hajarhassani/Desktop/experiment/BeadTypeFile.txt') > >> > > >> > -- > >> > Steve Lianoglou > >> > Graduate Student: Computational Systems Biology > >> > | Memorial Sloan-Kettering Cancer Center > >> > | Weill Medical College of Cornell University > >> > Contact Info: http://cbio.mskcc.org/~lianos/contact > >> > >> > >> _______________________________________________ > >> 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 > >
ADD REPLY
0
Entering edit mode
Hi Jenny and Steve, Thank you for your help clearing things up! At least it recognizes the file now. Do you know what R means by line 2?: targets <- read.table("5513091009_A_beadTypeFile.txt") Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 2 did not have 3 elements Hajar On Sep 29, 2010, at 11:47 PM, Jenny Drnevich wrote: > Hi Hajar, > > There's your problem. You don't have a file just called "beadTypeFile.txt". To read in any one of these files, you have to specify it EXACTLY by name: > > > targets <- read.table("5513091009_A_beadTypeFile.txt") > > HTH, > Jenny > > At 04:38 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >> Hi, >> >> I think so, I removed a few files, so there are 6 now. >> This is what I get: >> >> dir() >> [1] "5513091009_A_beadTypeFile.txt" "5513091009_B_beadTypeFile.txt" "5513091009_C_beadTypeFile.txt" "5513091009_D_beadTypeFile.txt" "5513091009_E_beadTypeFile.txt" "5513091009_F_beadTypeFile.txt" >> > 5513091009_A_beadTypeFile.txt >> 5513091009_B_beadTypeFile.txt >> 5513091009_C_beadTypeFile.txt >> 5513091009_D_beadTypeFile.txt >> 5513091009_E_beadTypeFile.txt >> 5513091009_F_beadTypeFile.txt >> >> Hajar >> >> On Sep 29, 2010, at 11:30 PM, Jenny Drnevich wrote: >> >> > Hi, >> > >> > Just a sanity check - is one of the 14 files you put in the experiment folder called "beadTypeFile.txt"? You can check by doing: >> > >> > > setwd( "/Users/hajarhassani/Desktop/Experiment") >> > > dir() >> > >> > This will list out all the file names in the working directory. I often do this then copy and paste to make sure I've got a file name correct. >> > >> > Jenny >> > >> > At 04:12 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >> >> Still not working.... >> >> >> >> getwd() >> >> [1] "/Users/hajarhassani/Desktop/Experiment" >> >> >> >> > targets <- read.table('/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt') >> >> Error in file(file, "rt") : cannot open the connection >> >> In addition: Warning message: >> >> In file(file, "rt") : >> >> cannot open file '/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt': No such file or directory >> >> >> >> I put 14 files in the experiment folder. The files look right: >> >> >> >> >> >> > >> >> >> >> >> >> >> >> Could there be something wrong with the way the files were saved? >> >> R seems to work just fine with SAMExample practice dataset from bioconductor. >> >> >> >> >> >> >> >> >> >> On Sep 29, 2010, at 10:32 PM, Steve Lianoglou wrote: >> >> >> >> > Hi, >> >> > >> >> > On Wed, Sep 29, 2010 at 4:05 PM, Hajar Hassani Lahsinoui >> >> > <hajar.hassani at="" gmail.com=""> wrote: >> >> >> >> >> >> On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: >> >> >> >> >> >>> argets = read.table("/Users/hajarhassani/Documents/Image >> >> >>> Data/5513091009/BeadTypeFile.txt") >> >> >> Hi Steve, >> >> >> >> >> >> You were right: >> >> >> >> >> >> file.exists('BeadTypeFile.txt') >> >> >> [1] FALSE >> >> >> >> >> >>> targets = read.table("/Users/hajarhassani/Documents/Image >> >> >> + Data/5513091009/BeadTypeFile.txt") >> >> >> Error in file(file, "rt") : cannot open the connection >> >> >> In addition: Warning message: >> >> >> In file(file, "rt") : >> >> >> cannot open file '/Users/hajarhassani/Documents/Image >> >> >> Data/5513091009/BeadTypeFile.txt': No such file or directory >> >> >> >> >> >> I tried changing the directory to the DVD they gave me the data on (instead of my HD), but still the same message. The thing is that I can open the txt files if I click on them from my HD (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... >> >> > >> >> > Maybe it's the space-in-the-directory thing. >> >> > >> >> > Try creating some "experiment" folder on your desktop and copy all the >> >> > files you need into it, then: >> >> > >> >> > R> targets <- read.table('/Users/hajarhassani/Desktop/experiment/BeadTypeFile.txt') >> >> > >> >> > -- >> >> > Steve Lianoglou >> >> > Graduate Student: Computational Systems Biology >> >> > | Memorial Sloan-Kettering Cancer Center >> >> > | Weill Medical College of Cornell University >> >> > Contact Info: http://cbio.mskcc.org/~lianos/contact >> >> >> >> >> >> _______________________________________________ >> >> 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 >> > >
ADD REPLY
0
Entering edit mode
On 09/29/2010 03:15 PM, Hajar Hassani Lahsinoui wrote: > Hi Jenny and Steve, > > Thank you for your help clearing things up! > > At least it recognizes the file now. Do you know what R means by line 2?: > > targets <- read.table("5513091009_A_beadTypeFile.txt") > Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : > line 2 did not have 3 elements Hi Hajar -- I think that what you are trying to do is to read a 'targets' file, with columns that describe (a) the file name; and (b) the sample associated with the file. But what you are actually doing is trying to read one of the data files itself. Time to back up and read the beadarray vignettes a second time. http://bioconductor.org/packages/2.6/bioc/html/beadarray.html Martin > > Hajar > > On Sep 29, 2010, at 11:47 PM, Jenny Drnevich wrote: > >> Hi Hajar, >> >> There's your problem. You don't have a file just called "beadTypeFile.txt". To read in any one of these files, you have to specify it EXACTLY by name: >> >>> targets <- read.table("5513091009_A_beadTypeFile.txt") >> >> HTH, >> Jenny >> >> At 04:38 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >>> Hi, >>> >>> I think so, I removed a few files, so there are 6 now. >>> This is what I get: >>> >>> dir() >>> [1] "5513091009_A_beadTypeFile.txt" "5513091009_B_beadTypeFile.txt" "5513091009_C_beadTypeFile.txt" "5513091009_D_beadTypeFile.txt" "5513091009_E_beadTypeFile.txt" "5513091009_F_beadTypeFile.txt" >>>> 5513091009_A_beadTypeFile.txt >>> 5513091009_B_beadTypeFile.txt >>> 5513091009_C_beadTypeFile.txt >>> 5513091009_D_beadTypeFile.txt >>> 5513091009_E_beadTypeFile.txt >>> 5513091009_F_beadTypeFile.txt >>> >>> Hajar >>> >>> On Sep 29, 2010, at 11:30 PM, Jenny Drnevich wrote: >>> >>>> Hi, >>>> >>>> Just a sanity check - is one of the 14 files you put in the experiment folder called "beadTypeFile.txt"? You can check by doing: >>>> >>>>> setwd( "/Users/hajarhassani/Desktop/Experiment") >>>>> dir() >>>> >>>> This will list out all the file names in the working directory. I often do this then copy and paste to make sure I've got a file name correct. >>>> >>>> Jenny >>>> >>>> At 04:12 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >>>>> Still not working.... >>>>> >>>>> getwd() >>>>> [1] "/Users/hajarhassani/Desktop/Experiment" >>>>> >>>>>> targets <- read.table('/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt') >>>>> Error in file(file, "rt") : cannot open the connection >>>>> In addition: Warning message: >>>>> In file(file, "rt") : >>>>> cannot open file '/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt': No such file or directory >>>>> >>>>> I put 14 files in the experiment folder. The files look right: >>>>> >>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> Could there be something wrong with the way the files were saved? >>>>> R seems to work just fine with SAMExample practice dataset from bioconductor. >>>>> >>>>> >>>>> >>>>> >>>>> On Sep 29, 2010, at 10:32 PM, Steve Lianoglou wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> On Wed, Sep 29, 2010 at 4:05 PM, Hajar Hassani Lahsinoui >>>>>> <hajar.hassani at="" gmail.com=""> wrote: >>>>>>> >>>>>>> On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: >>>>>>> >>>>>>>> argets = read.table("/Users/hajarhassani/Documents/Image >>>>>>>> Data/5513091009/BeadTypeFile.txt") >>>>>>> Hi Steve, >>>>>>> >>>>>>> You were right: >>>>>>> >>>>>>> file.exists('BeadTypeFile.txt') >>>>>>> [1] FALSE >>>>>>> >>>>>>>> targets = read.table("/Users/hajarhassani/Documents/Image >>>>>>> + Data/5513091009/BeadTypeFile.txt") >>>>>>> Error in file(file, "rt") : cannot open the connection >>>>>>> In addition: Warning message: >>>>>>> In file(file, "rt") : >>>>>>> cannot open file '/Users/hajarhassani/Documents/Image >>>>>>> Data/5513091009/BeadTypeFile.txt': No such file or directory >>>>>>> >>>>>>> I tried changing the directory to the DVD they gave me the data on (instead of my HD), but still the same message. The thing is that I can open the txt files if I click on them from my HD (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... >>>>>> >>>>>> Maybe it's the space-in-the-directory thing. >>>>>> >>>>>> Try creating some "experiment" folder on your desktop and copy all the >>>>>> files you need into it, then: >>>>>> >>>>>> R> targets <- read.table('/Users/hajarhassani/Desktop/experiment/BeadTypeFile.txt') >>>>>> >>>>>> -- >>>>>> Steve Lianoglou >>>>>> Graduate Student: Computational Systems Biology >>>>>> | Memorial Sloan-Kettering Cancer Center >>>>>> | Weill Medical College of Cornell University >>>>>> Contact Info: http://cbio.mskcc.org/~lianos/contact >>>>> >>>>> >>>>> _______________________________________________ >>>>> 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 >>>> >> > > _______________________________________________ > 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
ADD REPLY
0
Entering edit mode
Hi Hajar, Just to follow up on Martin's message, it is not clear that you are dealing with raw bead-level data, so beadarray might not be of much use to you. Illumina's iScan outputs files with the extension '_perBeadFile.txt' for this kind of data. I believe files with the extension '_beadTypeFile.txt' contain summary data. The beadarray package supports either raw bead-level data in text format or summary data output by BeadStudio/GenomeStudio. Best wishes, Matt > On 09/29/2010 03:15 PM, Hajar Hassani Lahsinoui wrote: >> Hi Jenny and Steve, >> >> Thank you for your help clearing things up! >> >> At least it recognizes the file now. Do you know what R means by line >> 2?: >> >> targets <- read.table("5513091009_A_beadTypeFile.txt") >> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, >> na.strings, : >> line 2 did not have 3 elements > > Hi Hajar -- > > I think that what you are trying to do is to read a 'targets' file, > with columns that describe (a) the file name; and (b) the sample > associated with the file. But what you are actually doing is trying to > read one of the data files itself. > > Time to back up and read the beadarray vignettes a second time. > > http://bioconductor.org/packages/2.6/bioc/html/beadarray.html > > Martin > >> >> Hajar >> >> On Sep 29, 2010, at 11:47 PM, Jenny Drnevich wrote: >> >>> Hi Hajar, >>> >>> There's your problem. You don't have a file just called >>> "beadTypeFile.txt". To read in any one of these files, you have to >>> specify it EXACTLY by name: >>> >>>> targets <- read.table("5513091009_A_beadTypeFile.txt") >>> >>> HTH, >>> Jenny >>> >>> At 04:38 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >>>> Hi, >>>> >>>> I think so, I removed a few files, so there are 6 now. >>>> This is what I get: >>>> >>>> dir() >>>> [1] "5513091009_A_beadTypeFile.txt" "5513091009_B_beadTypeFile.txt" >>>> "5513091009_C_beadTypeFile.txt" "5513091009_D_beadTypeFile.txt" >>>> "5513091009_E_beadTypeFile.txt" "5513091009_F_beadTypeFile.txt" >>>>> 5513091009_A_beadTypeFile.txt >>>> 5513091009_B_beadTypeFile.txt >>>> 5513091009_C_beadTypeFile.txt >>>> 5513091009_D_beadTypeFile.txt >>>> 5513091009_E_beadTypeFile.txt >>>> 5513091009_F_beadTypeFile.txt >>>> >>>> Hajar >>>> >>>> On Sep 29, 2010, at 11:30 PM, Jenny Drnevich wrote: >>>> >>>>> Hi, >>>>> >>>>> Just a sanity check - is one of the 14 files you put in the >>>>> experiment folder called "beadTypeFile.txt"? You can check by doing: >>>>> >>>>>> setwd( "/Users/hajarhassani/Desktop/Experiment") >>>>>> dir() >>>>> >>>>> This will list out all the file names in the working directory. I >>>>> often do this then copy and paste to make sure I've got a file name >>>>> correct. >>>>> >>>>> Jenny >>>>> >>>>> At 04:12 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >>>>>> Still not working.... >>>>>> >>>>>> getwd() >>>>>> [1] "/Users/hajarhassani/Desktop/Experiment" >>>>>> >>>>>>> targets <- >>>>>>> read.table('/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt') >>>>>> Error in file(file, "rt") : cannot open the connection >>>>>> In addition: Warning message: >>>>>> In file(file, "rt") : >>>>>> cannot open file >>>>>> '/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt': No such >>>>>> file or directory >>>>>> >>>>>> I put 14 files in the experiment folder. The files look right: >>>>>> >>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> Could there be something wrong with the way the files were saved? >>>>>> R seems to work just fine with SAMExample practice dataset from >>>>>> bioconductor. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Sep 29, 2010, at 10:32 PM, Steve Lianoglou wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> On Wed, Sep 29, 2010 at 4:05 PM, Hajar Hassani Lahsinoui >>>>>>> <hajar.hassani at="" gmail.com=""> wrote: >>>>>>>> >>>>>>>> On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: >>>>>>>> >>>>>>>>> argets = read.table("/Users/hajarhassani/Documents/Image >>>>>>>>> Data/5513091009/BeadTypeFile.txt") >>>>>>>> Hi Steve, >>>>>>>> >>>>>>>> You were right: >>>>>>>> >>>>>>>> file.exists('BeadTypeFile.txt') >>>>>>>> [1] FALSE >>>>>>>> >>>>>>>>> targets = read.table("/Users/hajarhassani/Documents/Image >>>>>>>> + Data/5513091009/BeadTypeFile.txt") >>>>>>>> Error in file(file, "rt") : cannot open the connection >>>>>>>> In addition: Warning message: >>>>>>>> In file(file, "rt") : >>>>>>>> cannot open file '/Users/hajarhassani/Documents/Image >>>>>>>> Data/5513091009/BeadTypeFile.txt': No such file or directory >>>>>>>> >>>>>>>> I tried changing the directory to the DVD they gave me the data on >>>>>>>> (instead of my HD), but still the same message. The thing is that >>>>>>>> I can open the txt files if I click on them from my HD >>>>>>>> (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... >>>>>>> >>>>>>> Maybe it's the space-in-the-directory thing. >>>>>>> >>>>>>> Try creating some "experiment" folder on your desktop and copy all >>>>>>> the >>>>>>> files you need into it, then: >>>>>>> >>>>>>> R> targets <- >>>>>>> read.table('/Users/hajarhassani/Desktop/experiment/BeadTypeFile.txt') >>>>>>> >>>>>>> -- >>>>>>> Steve Lianoglou >>>>>>> Graduate Student: Computational Systems Biology >>>>>>> | Memorial Sloan-Kettering Cancer Center >>>>>>> | Weill Medical College of Cornell University >>>>>>> Contact Info: http://cbio.mskcc.org/~lianos/contact >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> 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 >>>>> >>> >> >> _______________________________________________ >> 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 > > _______________________________________________ > 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 > ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:4}}
ADD REPLY
0
Entering edit mode
Hi Steve, Martin and Matt, Thanks again for all the help. I found the perBeadFiles in the data set! Hajar On Sep 30, 2010, at 3:30 AM, Matthew Ritchie wrote: > Hi Hajar, > > Just to follow up on Martin's message, it is not clear that you are > dealing with raw bead-level data, so beadarray might not be of much use to > you. > > Illumina's iScan outputs files with the extension '_perBeadFile.txt' for > this kind of data. I believe files with the extension '_beadTypeFile.txt' > contain summary data. The beadarray package supports either raw > bead-level data in text format or summary data output by > BeadStudio/GenomeStudio. > > Best wishes, > > Matt > >> On 09/29/2010 03:15 PM, Hajar Hassani Lahsinoui wrote: >>> Hi Jenny and Steve, >>> >>> Thank you for your help clearing things up! >>> >>> At least it recognizes the file now. Do you know what R means by line >>> 2?: >>> >>> targets <- read.table("5513091009_A_beadTypeFile.txt") >>> Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, >>> na.strings, : >>> line 2 did not have 3 elements >> >> Hi Hajar -- >> >> I think that what you are trying to do is to read a 'targets' file, >> with columns that describe (a) the file name; and (b) the sample >> associated with the file. But what you are actually doing is trying to >> read one of the data files itself. >> >> Time to back up and read the beadarray vignettes a second time. >> >> http://bioconductor.org/packages/2.6/bioc/html/beadarray.html >> >> Martin >> >>> >>> Hajar >>> >>> On Sep 29, 2010, at 11:47 PM, Jenny Drnevich wrote: >>> >>>> Hi Hajar, >>>> >>>> There's your problem. You don't have a file just called >>>> "beadTypeFile.txt". To read in any one of these files, you have to >>>> specify it EXACTLY by name: >>>> >>>>> targets <- read.table("5513091009_A_beadTypeFile.txt") >>>> >>>> HTH, >>>> Jenny >>>> >>>> At 04:38 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >>>>> Hi, >>>>> >>>>> I think so, I removed a few files, so there are 6 now. >>>>> This is what I get: >>>>> >>>>> dir() >>>>> [1] "5513091009_A_beadTypeFile.txt" "5513091009_B_beadTypeFile.txt" >>>>> "5513091009_C_beadTypeFile.txt" "5513091009_D_beadTypeFile.txt" >>>>> "5513091009_E_beadTypeFile.txt" "5513091009_F_beadTypeFile.txt" >>>>>> 5513091009_A_beadTypeFile.txt >>>>> 5513091009_B_beadTypeFile.txt >>>>> 5513091009_C_beadTypeFile.txt >>>>> 5513091009_D_beadTypeFile.txt >>>>> 5513091009_E_beadTypeFile.txt >>>>> 5513091009_F_beadTypeFile.txt >>>>> >>>>> Hajar >>>>> >>>>> On Sep 29, 2010, at 11:30 PM, Jenny Drnevich wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> Just a sanity check - is one of the 14 files you put in the >>>>>> experiment folder called "beadTypeFile.txt"? You can check by doing: >>>>>> >>>>>>> setwd( "/Users/hajarhassani/Desktop/Experiment") >>>>>>> dir() >>>>>> >>>>>> This will list out all the file names in the working directory. I >>>>>> often do this then copy and paste to make sure I've got a file name >>>>>> correct. >>>>>> >>>>>> Jenny >>>>>> >>>>>> At 04:12 PM 9/29/2010, Hajar Hassani Lahsinoui wrote: >>>>>>> Still not working.... >>>>>>> >>>>>>> getwd() >>>>>>> [1] "/Users/hajarhassani/Desktop/Experiment" >>>>>>> >>>>>>>> targets <- >>>>>>>> read.table('/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt') >>>>>>> Error in file(file, "rt") : cannot open the connection >>>>>>> In addition: Warning message: >>>>>>> In file(file, "rt") : >>>>>>> cannot open file >>>>>>> '/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt': No such >>>>>>> file or directory >>>>>>> >>>>>>> I put 14 files in the experiment folder. The files look right: >>>>>>> >>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Could there be something wrong with the way the files were saved? >>>>>>> R seems to work just fine with SAMExample practice dataset from >>>>>>> bioconductor. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sep 29, 2010, at 10:32 PM, Steve Lianoglou wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> On Wed, Sep 29, 2010 at 4:05 PM, Hajar Hassani Lahsinoui >>>>>>>> <hajar.hassani at="" gmail.com=""> wrote: >>>>>>>>> >>>>>>>>> On Sep 29, 2010, at 9:48 PM, Steve Lianoglou wrote: >>>>>>>>> >>>>>>>>>> argets = read.table("/Users/hajarhassani/Documents/Image >>>>>>>>>> Data/5513091009/BeadTypeFile.txt") >>>>>>>>> Hi Steve, >>>>>>>>> >>>>>>>>> You were right: >>>>>>>>> >>>>>>>>> file.exists('BeadTypeFile.txt') >>>>>>>>> [1] FALSE >>>>>>>>> >>>>>>>>>> targets = read.table("/Users/hajarhassani/Documents/Image >>>>>>>>> + Data/5513091009/BeadTypeFile.txt") >>>>>>>>> Error in file(file, "rt") : cannot open the connection >>>>>>>>> In addition: Warning message: >>>>>>>>> In file(file, "rt") : >>>>>>>>> cannot open file '/Users/hajarhassani/Documents/Image >>>>>>>>> Data/5513091009/BeadTypeFile.txt': No such file or directory >>>>>>>>> >>>>>>>>> I tried changing the directory to the DVD they gave me the data on >>>>>>>>> (instead of my HD), but still the same message. The thing is that >>>>>>>>> I can open the txt files if I click on them from my HD >>>>>>>>> (Illumicode,N,Mean GRN,Dev GRN), so they must be retreivable... >>>>>>>> >>>>>>>> Maybe it's the space-in-the-directory thing. >>>>>>>> >>>>>>>> Try creating some "experiment" folder on your desktop and copy all >>>>>>>> the >>>>>>>> files you need into it, then: >>>>>>>> >>>>>>>> R> targets <- >>>>>>>> read.table('/Users/hajarhassani/Desktop/experiment/BeadTypeFile.txt') >>>>>>>> >>>>>>>> -- >>>>>>>> Steve Lianoglou >>>>>>>> Graduate Student: Computational Systems Biology >>>>>>>> | Memorial Sloan-Kettering Cancer Center >>>>>>>> | Weill Medical College of Cornell University >>>>>>>> Contact Info: http://cbio.mskcc.org/~lianos/contact >>>>>>> >>>>>>> >>>>>>> _______________________________________________ >>>>>>> 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 >>>>>> >>>> >>> >>> _______________________________________________ >>> 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 >> >> _______________________________________________ >> 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 >> > > > > ______________________________________________________________________ > The information in this email is confidential and inte...{{dropped:6}}
ADD REPLY
0
Entering edit mode
On Wed, Sep 29, 2010 at 6:15 PM, Hajar Hassani Lahsinoui <hajar.hassani at="" gmail.com=""> wrote: > Hi Jenny and Steve, > > Thank you for your help clearing things up! > > At least it recognizes the file now. Do you know what R means by line 2?: > > targets <- read.table("5513091009_A_beadTypeFile.txt") > Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, ?: > ?line 2 did not have 3 elements It's referencing the actual lines in the file "..._beadTypeFile.txt". read.table expects the file it is reading has the same number of columns per line, for each line. it seems as if your first line has 3 columns, while your second line does not. "columns" are determined by the value of the `sep` parameter in read.table, which seems to default to any whitespace. you can eyeball your file to see if this is the case, and what's causing the hiccup. See, ?read.table for more info. -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD REPLY
0
Entering edit mode
In addition to what Jenny mentioned, note: On Wed, Sep 29, 2010 at 5:12 PM, Hajar Hassani Lahsinoui <hajar.hassani at="" gmail.com=""> wrote: > Still not working.... > > getwd() > [1] "/Users/hajarhassani/Desktop/Experiment" and >> targets <- read.table('/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt') > Error in file(file, "rt") : cannot open the connection > In addition: Warning message: > In file(file, "rt") : > ?cannot open file '/Users/hajarhassani/Desktop/experiment/beadTypeFile.txt': No such file or directory You have "Experiment" in one, and "experiment" in the other. I guess you're using OS X (?), which is not case sensitive by default, but ... just pointing out that you need to be extra careful. -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD REPLY

Login before adding your answer.

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