Search
Question: How to manipulate assayData in MSnSetList
0
gravatar for kamal.fartiyal84
8 months ago by
Cancer Research UK Cambridge Institute
kamal.fartiyal8410 wrote:

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

 

ADD COMMENTlink modified 8 months ago • written 8 months ago by kamal.fartiyal8410
0
gravatar for Laurent Gatto
8 months ago by
Laurent Gatto1.0k
United Kingdom
Laurent Gatto1.0k wrote:

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 COMMENTlink written 8 months ago by Laurent Gatto1.0k
0
gravatar for kamal.fartiyal84
8 months ago by
Cancer Research UK Cambridge Institute
kamal.fartiyal8410 wrote:

Thanks Laurent. It works.

ADD COMMENTlink written 8 months ago by kamal.fartiyal8410
Please log in to add an answer.

Help
Access

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