Search
Question: `exprs<-` Allows setting assay data matrix size that doesn't match se.exprs
0
gravatar for psmirnov2000
15 months ago by
psmirnov20000 wrote:

When subsetting by column the eSet class, I came across this difficult to diagnose error: 

Error in `sampleNames<-`(`*tmp*`, value = c("910910", "1287381", "906862",  : 
  'value' length (965) must equal sample number in AssayData (965)

I discovered that it was due to the fact that I had previously set the assayData of an existing ExpressionSet object using `exprs<-`, while the object also had the se.exprs matrix filled. The exprs setting function let me mismatch the dimensions between exprs and se.exprs, leading to errors when later trying to subset the data. It seems like the exprs function should check for a mismatch in dimensions between exprs and se.exprs, and issue a warning when the matrix dimensions mismatch.

 

ADD COMMENTlink modified 15 months ago by Kasper Daniel Hansen6.3k • written 15 months ago by psmirnov20000
0
gravatar for Martin Morgan
15 months ago by
Martin Morgan ♦♦ 20k
United States
Martin Morgan ♦♦ 20k wrote:

Thanks Biobase 2.33.1 (in devel; will be ported to release after seeing consequences in the builds) insists that the dimensions and dimnames of the incoming object match or can be made to match (e.g., NULL or sampled) those of the current object.

ADD COMMENTlink written 15 months ago by Martin Morgan ♦♦ 20k
0
gravatar for Kasper Daniel Hansen
15 months ago by
United States
Kasper Daniel Hansen6.3k wrote:

This has impact on my code (in minfi).  Specifically, in my class constructor, I create an object via "new()" and then subsequently modify the assayData elements.  This is done based on the profiling reported here: http://www.hansenlab.org/rstats/2014/01/30/lineprof

I can fix this relatively easily (at the cost of a performance overhead).  But to me, this is a case of whether we should allow creation of invalid objects, which can often be useful.  I think the proposed fix is too stringent, or I would like some way of disabling it for internal purpose (say force=FALSE default parameter to the replacement function).  But perhaps I am the only one affected and perhaps I am just too focused on my current issue.

Best,
Kasper

ADD COMMENTlink written 15 months ago by Kasper Daniel Hansen6.3k

I added an argument validate=TRUE to assayDataElement<- in 2.33.2.

ADD REPLYlink written 15 months ago by Martin Morgan ♦♦ 20k

Thanks with some additional characters that are required for posting.

ADD REPLYlink written 15 months ago by Kasper Daniel Hansen6.3k
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: 257 users visited in the last hour