How to set (or change) values in minfi::‘RGChannelSet’ object
0
0
Entering edit mode
17 months ago
Bosberg ▴ 50

I'm using a workflow that processes objects of type ‘RGChannelSet’ from Epic Arrays. Occasionally I'll get a problematic data set due to poor quality DNA (let's call it RGset_lowQuality). In these cases, getRed( RGset_lowQuality ) and getGreen( RGset_lowQuality ) both return all zero values.

The downstream functions I'm relying on unfortunately weren't designed to handle this edge-case, so they just crash with an error, leaving my whole workflow in an error-state. The only option this has left me is to create a synthetic dataset in these cases (like, e.g. 100% Green everywhere), so that I can flag the poor quality, but still follow through on the workflow and avoid the error state. This can be done in 1 of two ways:

1. is there any function like "setRed()/ setGreen()", to actively change, or set the values of RGset_lowQuality to something like 100 Green everywhere?

2. An alternative solution would be to create a new object:

synthRGset = RGChannelSet( Green  = getGreen( RGset_lowQuality )  + 100, 
                           Red    = getRed(   RGset_lowQuality )  + 1,
                           annotation = RGset_lowQuality@annotation  )

Unfortunately, my downstream function then returns this new error:

Error in `if (sex == "Male") ...`:
! missing value where TRUE/FALSE needed

So apparently I need to also set the sex variable in the new object to be the same as the original (in addition to the red and Green). Does anyone know where this is stored, and how to set it at the point of creating a new object?

Any suggestions to resolve either solutions [1] or [2] would be hugely helpful. Thanks!

minfi RGChannelSet • 488 views
ADD COMMENT

Login before adding your answer.

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