BIMIB-DISCo / TRONCO

Repository of the TRanslational ONCOlogy library, which includes various algorithms (such as CAPRESE and CAPRI) and the Pipeline for Cancer Inference (PICNIC).
https://bimib-disco.github.io/TRONCO
GNU General Public License v3.0
28 stars 7 forks source link

assignments in global environment and no visible binding for '<<-' assignment to 'value' #83

Closed rdiaz02 closed 7 years ago

rdiaz02 commented 8 years ago

Using the stable version of TRONCO (2.6.1) for BioC (3.4) if we do

library(compiler); enableJIT(3)
library(TRONCO)

we get

Note: no visible binding for '<<-' assignment to 'value' 
Note: no visible binding for '<<-' assignment to 'value'

which looks somewhat worrisome. Doing that with the current devel version (2.7.0) for, well, BioC devel (3.5), that does not happen.

Taking a look at the code, I see the following lines in capri.hypotheses.R:

assign("lifting.genotypes", genotypes, envir = .GlobalEnv);
assign("lifting.edges", NULL, envir = .GlobalEnv);

and other similar assignments in the global environment.

Specific issues

  1. I think those assignments are dangerous as they would overwrite variables with that name defined by the user, they are using/setting global variables, etc.

  2. I do not understand why we get the note on one version and not the other, when both versions have those lines.