Question: How to manipulate assayData in MSnSetList
0
gravatar for kamal.fartiyal84
13 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

 

msnbase • 212 views
ADD COMMENTlink modified 13 months ago • written 13 months ago by kamal.fartiyal8410
Answer: How to manipulate assayData in MSnSetList
0
gravatar for Laurent Gatto
13 months ago by
Laurent Gatto1.1k
United Kingdom
Laurent Gatto1.1k 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 13 months ago by Laurent Gatto1.1k
Answer: How to manipulate assayData in MSnSetList
0
gravatar for kamal.fartiyal84
13 months ago by
Cancer Research UK Cambridge Institute
kamal.fartiyal8410 wrote:

Thanks Laurent. It works.

ADD COMMENTlink written 13 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 16.09
Traffic: 107 users visited in the last hour