genomation icon indicating copy to clipboard operation
genomation copied to clipboard

Negative coverage values and is.noCovNA=T give wrong results

Open frenkiboy opened this issue 7 years ago • 2 comments

when the target vector is negative (i.e. negative fold changes), is.noCovNA gives wrong results - it converts all < 0 values to NA

frenkiboy avatar Jun 27 '17 16:06 frenkiboy

this is because is.noCovNA is not designed to deal with negative values, and designed with methylation values in mind. Although, for ChIP-seq FCs it may not make sense to use is.noCovNA. It uses an arithmetic trick to figure where the NAs are on the Rle vector and that trick doesn't work when there already negative values https://github.com/BIMSBbioinfo/genomation/blob/master/R/scoreMatrix.R#L388

al2na avatar Jun 27 '17 17:06 al2na

yeah - we just have to make a check if is.noCovNA and negative coverage, to stop the function

frenkiboy avatar Jun 27 '17 17:06 frenkiboy