Suggestion: type of ExpLogFoldChange (sini)
1
0
Entering edit mode
@mohammad-alkhamis-10862
Last seen 7.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:

  1. to ensure consistency throughout the data construct
  2. 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.
  3. 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 either allocVector or allocMatrix (or make life harder and have if statements to either create matrix or vector).

 

Thank you.

cn.mops • 981 views
ADD COMMENT
1
Entering edit mode
@gunter-klambauer-5426
Last seen 3.8 years ago
Austria

Hello Mohammed,

Thanks for looking into cn.mops so closely. The suggested changes make sense. I have just committed them to the development branch (they should appear in version 1.21.1 shortly).

Regards,

Günter

ADD COMMENT

Login before adding your answer.

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