Error in R Commands
1
0
Entering edit mode
5.4 years ago
786 ▴ 50

Hi I'm working on error and got the following error can anyone pinpoint the error it'll be very helpful fr me...

> study1 = "GSE71416" 
> gse71416dat = getGEO('GSE71416') 
Found 1 file(s)
GSE71416_series_matrix.txt.gz
trying URL 'ftp://ftp.ncbi.nlm.nih.gov/pub/geo/DATA/SeriesMatrix/GSE71416/GSE71416_series_matrix.txt.gz'
ftp data connection made, file length 3862808 bytes
opened URL
downloaded 3.7 Mb

File stored at: 
C:\Users\NADAMU~1\AppData\Local\Temp\RtmpSMMQry/GPL570.soft
> gse71416raw= getGEOSuppFiles(study1) 
[1] "ftp://ftp.ncbi.nlm.nih.gov/pub/geo/DATA/supplementary/series/GSE71416/"
trying URL 'ftp://ftp.ncbi.nlm.nih.gov/pub/geo/DATA/supplementary/series/GSE71416//GSE71416_RAW.tar'
ftp data connection made, file length 92989440 bytes
opened URL
downloaded 88.7 Mb

trying URL 'ftp://ftp.ncbi.nlm.nih.gov/pub/geo/DATA/supplementary/series/GSE71416//filelist.txt'
ftp data connection made, file length 3638 bytes
opened URL
downloaded 3638 bytes

> tarfile <- grep("\\.tar$", rownames(gse71416raw), value = TRUE)
> untar(tarfile, exdir="study1")
> celFiles <- unlist(list.files("study1", pattern = "\\.CEL.gz", full.names = TRUE)) 
> gse71416preset = ReadAffy(filenames = celFiles)
> rmaData = rma(gse71416preset) 

Background correcting
Normalizing
Calculating Expression
Warning message:
package ‘hgu133plus2cdf’ was built under R version 2.15.1 
> gse71416eset= exprs(rmaData)
> groups = pData(phenoData(gse71416dat[[1]]))$source_name_ch1
> groups=as.character(groups) 
> groups[groups=="OAT_Obese and non-diabetic"]="control"
> groups[groups=="OAT_Obese and diabetic"]="diabetic"
> f = factor(groups, levels=c("control","diabetic")) 
> design_gse71416 = model.matrix(~0+f) 
> colnames(design_gse71416) = levels(f) 
> cont.matrix = makeContrasts(diabetic-control, levels=design_gse71416) 
Error:
> fit = lmFit(gse71416eset, design_gse71416)
Coefficients not estimable: control diabetic 
Error in lm.fit(design, t(M)) : 0 (non-NA) cases
R Affy Limma Bioconductor • 1.5k views
ADD COMMENT
0
Entering edit mode

could you please post head(groups); head(f); head(design_gse71416) and check your spelling on 'OAT_Obese...'

ADD REPLY
0
Entering edit mode

spelling are correct..

> groups = pData(phenoData(gse71416dat[[1]]))$source_name_ch1
> groups=as.character(groups) 
> groups[groups=="OAT_Obese and non-diabetic"]="control"
> groups[groups=="OAT_Obese and diabetic"]="diabetic" 

> f = factor(groups, levels=c("control","diabetic")) 

> design_gse71416 = model.matrix(~0+f)
ADD REPLY
1
Entering edit mode

thanks for reposting the stuff that was in your original question......

ADD REPLY
0
Entering edit mode

I'm afraid he is just trying some commands without knowing enough R to understand what's going on or how to troubleshoot when things don't go as planned.

ADD REPLY
1
Entering edit mode
5.4 years ago

Not sure why you made two threads for this issue, but I'll post my reply twice then:

Had to download some data to reproduce your problem, turns out the 'groups' are not what you think they are. Have a look at the groups variable after you do:

groups = pData(phenoData(gse71416dat[[1]]))$source_name_ch1

There is nothing like 'OAT_Obese and non-diabetic" or "OAT_Obese and diabetic".

I checked the variable 'pData(phenoData(gse71416dat[[1]]))' and what you need is:

groups = pData(phenoData(gse71416dat[[1]]))$title

Good luck, and I suggest to make yourself comfortable with R before proceeding.

ADD COMMENT

Login before adding your answer.

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