Entering edit mode
@mohammad-alkhamis-10862
Last seen 7.9 years ago
Canada/ Victoria, BC / University of Vi…
Hello Gunter,
I noticed a minor issue in the source code (cn.mops.R) that if X is originated from a GRanges object, we end up with a matrix of integers instead of numeric/double. I guess the matrix in this case is supposed to be numeric just as if we provide X as a matrix or a vector. While it is is a minor issue, I thought I should still report it since this got me in a bit of trouble while modifying the C++ side of cn.MOPS when using the macros REAL/INTEGER.
if(class(input)=="GRanges"){
...
X <- IRanges::as.matrix(IRanges::values(input))
...
} else if (is.matrix(input)){
if (nrow(input)> 1){
...
X <- input
X <- matrix(as.numeric(X),nrow=nrow(X))
...
} else{...}
} else if (is.vector(input)) {
...
X <- matrix(as.numeric(X),nrow=nrow(X))
...
}else{
stop("GRanges object or read count matrix needed as input.")
}