How to manipulate assayData in MSnSetList
2
0
Entering edit mode
@kamalfartiyal84-7976
Last seen 5.9 years ago
Cancer Research UK Cambridge Institute

I want to perform some operation to the assay data of MSnSet within a MSnSetList but I think its now allowed. Could you please let me know how to do such a thing?

A simple example is shown below.

library(MSnbase)
library(pRolocdata)
data(dunkley2006)
dun <- split(dunkley2006, "replicate")
exprs(dun[[1]])[1,1] <- 1

Error in `[[<-`(`*tmp*`, 1, value = <S4 object of class "MSnSet">) :

  [[<- defined for objects of type "S4" only for subclasses of environment

 

Thanks.

Kamal

 

msnbase • 1.2k views
ADD COMMENT
0
Entering edit mode
@laurent-gatto-5645
Last seen 5 weeks ago
Belgium

Yes, indeed, this doesn't work because there is no replacement method for the assayData of an item in an MSnSetList. This however seems to work

exprs(dun@x[[1]])[1,1] <- 1

It is a bit ugly, but might sort you out for now. I'll see to add proper replacement methods.

ADD COMMENT
0
Entering edit mode
@kamalfartiyal84-7976
Last seen 5.9 years ago
Cancer Research UK Cambridge Institute

Thanks Laurent. It works.

ADD COMMENT

Login before adding your answer.

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