Entering edit mode
@mohammad-alkhamis-10862
Last seen 8.9 years ago
Canada/ Victoria, BC / University of Vi…
Hello Günter,
I noticed that 'ExpLogFoldChange' in the function '.cn.mopsCE' (cn.mops.R) could either be a vector or a matrix with one row as noted in the code snippet below.
if (all(x<=minReadCount)) {
[...]
ExpLogFoldChange <- rep(0,N) # this is a vector
[...]
} else {[...]
# this is a matrix with 1 row
ExpLogFoldChange <- log2(I) %*% ret$alpha.ik
[...]
}
I would suggest that it is changed to:
ExpLogFoldChange <- as.vector(log2(I) %*% ret$alpha.ik)
My justification for the suggested change are:
- to ensure consistency throughout the data construct
- to save memory space. Using chromosome 21 as a reference and using 5 random samples in my test, having a mix of vectors and matrices in the data construct consumed 50 Mb more of memory space.
- to ease the use of the function '
identical' when comparing results of modified cn.mops and the original design especially if ExpLogFoldChange is computed at the C++ side of the program since I will eitherallocVectororallocMatrix(or make life harder and haveif statementsto either create matrix or vector).
Thank you.
