hansenlab / minfi

Devel repository for minfi
58 stars 68 forks source link

Can I use RGChannelsetExtended for estimatecellcounts function? #100

Closed shantelw closed 7 years ago

shantelw commented 7 years ago

I am working with a combined dataset of 450k and EPIC data. My rgset is type RGChannelSetExtended and I used the combineArrays function. Can I use this new virutal array that has rgset type RGChannelSetExtended with the estimatecellcounts function in minfi? Or, will it only accept the RGChannelSet type?

Thx, Shantel

Jfortin1 commented 7 years ago

Hi Shantel,

The estimateCellCounts function only work with an RGChannelSet.

JP

kasperdanielhansen commented 7 years ago
  1. There should be no issue with converting to an RGChannelSet, running the function and then saving the cell type composition estimates and using them with RGChannelSetExtended.
  2. I don't understand why the function wouldn't work with RGChannelSetExtended as input. It should give an RGChannelSet as output, but the input should be fine.
Jfortin1 commented 7 years ago

Kasper: estimateCellCounts() calls combineArrays(), which calls combine(). The combine() function fails because the number of assays of the reference RGSet is 2, and 5 for the user's RGSetExtended. Error in .bind_Assays(unname(list(...)), acbind) : assays must have the same length

shantelw commented 7 years ago

Kasper: Yes, I was able to convert the RGChannelSetExtended to an RGChannelSet and then it worked just fine.

kasperdanielhansen commented 7 years ago

JP: we could cast the input as an RGChannelSet, effectively removing the additional assays.

kasperdanielhansen commented 7 years ago

We have fixed this in devel in the following sense: inputting an RGChannelSetExtended to estimateCellCounts will now silently convert the RGChannelSetExtended to an RGChannelSet and run.

This also means we now support

as(rgSetExt, "RGChannelSet")

for coercion.