Problem Subsetting ExpressionSet
1
0
Entering edit mode
Tom Oates ▴ 60
@tom-oates-5703
Last seen 7.3 years ago

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

I download an ExpressionSet from GEO to be object a1

pa1<-pData(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:

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

Returns

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

locale:
[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

 

 

expressionset biobase bioconductor • 1.3k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 6 hours ago
United States

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

ADD COMMENT

Login before adding your answer.

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