This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error in groups

Hi I was working on GSE38642 and got an error in defining phenotypic data while making groups for analyzing differential expression. I think I've defined groups properly but still getting error and it is as follows:

> groups = pData(phenoData(gse38642dat[[1]]))$status
> groups=as.character(groups) 
> groups[groups=="non-diabetic donors"]="control" 
> groups[groups=="T2D donors"]="T2D"
> f = factor(groups, levels=c("control","T2D"))
> f
 [1] <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
[16] <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
[31] <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
[46] <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA> <NA>
[61] <NA> <NA> <NA>
Levels: control T2D

Why it isn't recognizing the samples?Please help me in finding error. It'll be very helpful for me.

r affy limma geoquery phenotypic data

1 answer

The column that contains the information you want is accessed using:

groups = pData(gse38642dat[[1]])$characteristics_ch1.5

Then, you'll need to make some small changes to your code, but that should get you started.

thank u so much it worked :)

Log in to answer this question.