Question: Problem Subsetting ExpressionSet
gravatar for Tom Oates
17 months ago by
Tom Oates60
Tom Oates60 wrote:

I am having trouble subsetting an ExpressionSet via an integer vector as follows:

I download an ExpressionSet from GEO to be object a1


And then grep the title column of pa1 to retain only a filtered part of the dataset

  title geo_accession
GSM475618 Uncontrolled astma GSM475618
GSM475619 Rhinitis GSM475619
GSM475621 Healthy C1 GSM47562
filInd <- c(grep("asthma",t(pa1["title"])),grep("Healthy",t(pa1["title"])))

Subsequent attempt to subset fails thus:

exprs(fa1) <- exprs(a1)[,filInd]


Error in .validate_assayDataElementReplace(obj, value) : 
  object and replacement value have different dimensions

I am trying to adapt the code here

Any help is gratefully received

> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

[1] LC_COLLATE=English_United Kingdom.1252 
[2] LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] parallel  stats     graphics  grDevices utils     datasets  methods  
[8] base     

other attached packages:
[1] limma_3.30.13        GEOquery_2.40.0      Biobase_2.34.0      
[4] BiocGenerics_0.20.0  BiocInstaller_1.24.0



ADD COMMENTlink modified 17 months ago by James W. MacDonald48k • written 17 months ago by Tom Oates60
gravatar for James W. MacDonald
17 months ago by
United States
James W. MacDonald48k wrote:

The phenoData slot contains information about the columns of your ExpressionSet, not the rows.

ADD COMMENTlink written 17 months ago by James W. MacDonald48k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 360 users visited in the last hour