jianhong / ChIPpeakAnno

11 stars 4 forks source link

Handle edge cases #31

Closed hukai916 closed 1 year ago

hukai916 commented 1 year ago

Minor changes to better handle edge case where detected GO or PATHWAY are zero. For example, below code assumes all.GO is a matrix, but when there is only one GO detected, all.GO becomes a vector and the all.GO[,4] syntax is no longer valid.

this.GO <- all.GO[all.GO[, 4] %in% entrezIDs, , drop=FALSE]
jianhong commented 1 year ago

Hi Kai, Thank you for submit this. Could you show me some sample codes? I have trouble in understanding the updates.

Jianhong.

hukai916 commented 1 year ago

Hi Jianhong, Nothing really special, I just patched the codes to better handle cases when the detected GO or PATHWAY terms are only 1 or zero. If you compare the commits side by side, I bet you can immediately understand my intentions. Otherwise, let me know.