Git Product home page Git Product logo

mofa's Introduction

Multi-Omics Factor Analysis

MOFA is a factor analysis model that provides a general framework for the integration of multi-omic data sets in an unsupervised fashion.

Please visit our website for installation instructions, tutorials, and much more!

mofa's People

Contributors

brandoninvergo avatar bv2 avatar damienarnol avatar darwinawardwinner avatar jan-glx avatar nturaga avatar rargelaguet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mofa's Issues

MOFAtools.rdb corrupt

Hi,

When I try to access the documentation for a function in MOFA, I get an error message saying MOFAtools.rdb is corrupt.

Command in R console in RStudio

?calculateVarianceExplained

Error Message:
Error in fetch(key) :
lazy-load database '/home/whitleyo/R/x86_64-pc-linux-gnu-library/3.4/MOFAtools/help/MOFAtools.rdb' is corrupt

I tried removing the R package and re-installing

Remove package:
require(ultils)
remove.packages('MOFAtools')

install package again (via R terminal):
devtools::install_github("PMBio/MOFA", subdir="MOFAtools")

I still have same problem after doing this.

Any ideas as to what can be going on?

Error in py_call_impl(callable, dots$args, dots$keywords): TypeError: Cannot cast ufunc add output from dtype('complex128') to dtype('float64') with casting rule 'same_kind'

Hi.
I'm encountering strange errors with data which used to work for me on a previous version of MOFA. Could you please help debug?

Error message:

[1] "No output file provided, using a temporary file..."
Error in py_call_impl(callable, dots$args, dots$keywords): TypeError: Cannot cast ufunc add output from dtype('complex128') to dtype('float64') with casting rule 'same_kind'

Detailed traceback: 
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/entry_point.py", line 410, in train_model
    self.model = runMOFA(self.data, self.data_opts, self.model_opts, self.train_opts, self.train_opts['seed'])
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/build_model.py", line 143, in runMOFA
    net.iterate()
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/BayesNet.py", line 148, in iterate
    self.nodes[node].update()
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/nodes.py", line 43, in update
    self.updateParameters()
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/updates.py", line 443, in updateParameters
    bar_tmp2 += Y[m]

Traceback:

1. runMOFA(MOFAobject)
2. mofa_entrypoint$train_model()
3. py_call_impl(callable, dots$args, dots$keywords)

The MOFA object looks like this:
mofa object rds file

session info:

R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /data/local/jona/home/.Renv/versions/3.5.1/lib64/R/lib/libRblas.so
LAPACK: /data/local/jona/home/.Renv/versions/3.5.1/lib64/R/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=de_DE.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=de_DE.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=de_DE.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] MOFA_0.99.12

loaded via a namespace (and not attached):
 [1] ggrepel_0.8.0               Rcpp_1.0.1                 
 [3] lattice_0.20-35             tidyr_0.8.3                
 [5] assertthat_0.2.0            digest_0.6.18              
 [7] foreach_1.4.4               IRdisplay_0.7.0            
 [9] R6_2.4.0                    GenomeInfoDb_1.18.1        
[11] plyr_1.8.4                  repr_0.18                  
[13] stats4_3.5.1                evaluate_0.13              
[15] ggplot2_3.1.0               pillar_1.3.1               
[17] zlibbioc_1.28.0             rlang_0.3.1                
[19] lazyeval_0.2.2              uuid_0.1-2                 
[21] S4Vectors_0.20.1            Matrix_1.2-14              
[23] reticulate_1.11.1           BiocParallel_1.16.5        
[25] stringr_1.4.0               pheatmap_1.0.12            
[27] RCurl_1.95-4.12             munsell_0.5.0              
[29] DelayedArray_0.8.0          compiler_3.5.1             
[31] vipor_0.4.5                 pkgconfig_2.0.2            
[33] BiocGenerics_0.28.0         base64enc_0.1-3            
[35] ggbeeswarm_0.6.0            htmltools_0.3.6            
[37] tidyselect_0.2.5            SummarizedExperiment_1.12.0
[39] tibble_2.1.1                GenomeInfoDbData_1.2.0     
[41] IRanges_2.16.0              codetools_0.2-15           
[43] matrixStats_0.54.0          crayon_1.3.4               
[45] dplyr_0.8.0.1               bitops_1.0-6               
[47] grid_3.5.1                  jsonlite_1.6               
[49] gtable_0.2.0                magrittr_1.5               
[51] scales_1.0.0                stringi_1.4.3              
[53] XVector_0.22.0              reshape2_1.4.3             
[55] MultiAssayExperiment_1.6.0  doParallel_1.0.14          
[57] cowplot_0.9.4               IRkernel_0.8.14            
[59] Rhdf5lib_1.2.1              RColorBrewer_1.1-2         
[61] iterators_1.0.10            tools_3.5.1                
[63] Biobase_2.42.0              glue_1.3.1                 
[65] beeswarm_0.2.3              purrr_0.3.2                
[67] parallel_3.5.1              rhdf5_2.24.0               
[69] colorspace_1.4-1            GenomicRanges_1.34.0       
[71] corrplot_0.84               pbdZMQ_0.3-3

mofapy version 1.1.1 on python 3.6.7.

Thank you!
J.

Error when creating object from MAE

Hi,
Thank you for the great work! I am attempting to test MOFA on my datasets, but I have troubles in converting the MultiAssayExperiment object into the MOFA object.

The MAE object was built using the MAE constructor function, and contains 3 experiments, colData and sampleMaps

> multiHMP2 <- do.call(MultiAssayExperiment, prepMultiAssay(HMP2exp, colData, sample_map))
harmonizing input:
  removing 348 sampleMap rows with 'colname' not in colnames of experiments
  removing 24 colData rownames not in sampleMap 'primary'

This is how it looks like

> multiHMP2
A MultiAssayExperiment object of 3 listed
 experiments with user-defined names and respective classes. 
 Containing an ExperimentList class object of length 3: 
 [1] metabolomics: matrix with 577 rows and 533 columns 
 [2] metagenomics: matrix with 464 rows and 1304 columns 
 [3] host_transcriptomics: matrix with 55765 rows and 251 columns 

But then

> MOFAobject <- createMOFAobject(multiHMP2)
Creating MOFA object from a MultiAssayExperiment object...
Error in FUN(X[[i]], ...) : 
  colnames(subdata) == sampleMap(data)[sampleMap(data)[, "assay"] ==  .... are not all TRUE

I tried peeking into the createMOFAobject function but I can't seem to find the necessary line. If I run assays(multiHMP2) I get

List of length 3
names(3): metabolomics metagenomics host_transcriptomics

And the MOFA object works if I try to construct it with list(assays(multiHMP2)[['metagenomics']], ...etc))

Creating MOFA object from list of matrices,
 please make sure that samples are columns and features are rows...

Warning message:
In createMOFAobject(list(assays(multiHMP2)[["metagenomics"]], assays(multiHMP2)[["metabolomics"]],  :
  View names are not specified in the data, renaming them to: view_1, view_2, view_3

I am sure I am missing something in the construction of the object, but I'm not sure what.
Thanks!

Training and validation set

Hi,

Is it possible to train a model with training samples and then use the model on another set of samples to validate the LFs obtained ?
I don't know if i'm clear, but I would like to compute the Z matrices (samples against LF) for samples not used to train the model. I have the Y matrices for the new samples.

Thanks a lot in advance

Anne-Sophie Sertier

Question on initialization

Hi. I have a question on initialization of the model. The supplement of your paper says variables are initialized according to their priors. So for the case of the gamma distributed precision variables such as alpha_k^m (which is parameterized by alpha_0=beta_0=1e-14), most of the random samples following a gamma distribution with this parameterization will be zero. Making most of the initialized values of alpha_k^m equal to zero. Do you then randomly draw w_{k,d}^m from a gaussian with infinite (1/0) variance?

BLAS libraries use maximum number of available cores.

This has come up recently when diagnosing problems with one of the nodes on our cluster. Another user was using this MOFA R package, and that R process had spawned 64 threads even though the user had requested only 1 cpu on the cluster. We were able to solve this problem by restricting the number of threads available to BLAS/OMP.

This issue commonly arises when using matrix algebra code (e.g. SVD), which themselves call lower level matrix algebra libraries (e.g. Open BLAS) - as is the case in R.

I'm not familiar with this R package, but you can solve this problem by adding the following to the relevant R function that uses these libraries (e.g. any calls to svd(), or prcomp()):

library(RhpcBLASctl)  # needs to be added as an Imports: in the DESCRIPTION and NAMESPACE files

mofa <- function(..., nThreads) {
  # This code explicitly allows the user to control how many threads the matrix algebra calls can use,
  # then restores the previous state:
  oldOMPThreads <- omp_get_max_threads()
  oldBLASThreads <- blas_get_num_procs()
  
  omp_set_num_threads(nThreads)
  blas_set_num_threads(nThreads)
  
  # Restore to previous state when the function exits (either successfully or on error)
  on.exit({
    omp_set_num_threads(oldOMPThreads)
    blas_set_num_threads(oldBLASThreads)
  }, add=TRUE)
}

Likelihood for methylation data

Hello,

I have a dataset with 4 data types, including methylation data.
Here (as in most cases), methylation data have a bimodal distribution.
I used gaussian as likelihood (in ModelOptions$likelihood). Don't you think it can be deleterious for the model?
Is there a way to use something more approriate?

Thank you,
Jane

AttributeError: module 'mofapy' has no attribute 'core.entry_point'

Hi

This is a weird problem.
I've installed MOFA and I'm trying to work through the CLL example but can't execute the runMOFA(MOFAObject) command.

I keep getting this error:

x <- runMOFA(MOFAObject)                                                                                                                                                                          
[1] "No output file provided, using a temporary file..."  
Error in py_get_attr_impl(x, name, silent) : 
  AttributeError: module 'mofapy' has no attribute 'core.entry_point'

I'm using an Anaconda environment running Python 3.6.
It seems that reticulate has detected the correct instance and sees the mofapy package:

> py_config()
python:         /home/dfermin/anaconda3/envs/py36/bin/python
libpython:      /home/dfermin/anaconda3/envs/py36/lib/libpython3.6m.so
pythonhome:     /home/dfermin/anaconda3/envs/py36:/home/dfermin/anaconda3/envs/py36
version:        3.6.7 | packaged by conda-forge | (default, Jul  2 2019, 02:18:42)  [GCC 7.3.0]
numpy:          /home/dfermin/anaconda3/envs/py36/lib/python3.6/site-packages/numpy
numpy_version:  1.17.0
mofapy:         /home/dfermin/anaconda3/envs/py36/lib/python3.6/site-packages/mofapy

When I go to the site-packages directory I see mofapy and the entry_point.py script is there:

ls /home/dfermin/anaconda3/envs/py36/lib/python3.6/site-packages/mofapy/core/
BayesNet.py
build_model.py
distributions.py
entry_point.py
init_nodes.py
__init__.py
mixed_nodes.py
multiview_nodes.py
nodes.py
nongaussian_nodes.py
__pycache__
simulate.py
updates.py
utils.py
variational_nodes.py

I can import the library in python without any issues.
I'm not using Rstudio, this is all on the terminal on an instance of RHEL.
I've tried multiple versions of R and I'm currently using a freshly compiled version of 3.6.1.
Does anyone have a suggestion for a work around?

The R sessionInfo outptu is given below in case it helps.

 > sessionInfo()
R version 3.6.1 (2019-07-05)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Workstation 7.7 (Maipo)

Matrix products: default
BLAS/LAPACK: /home/dfermin/apps/openBLAS.libs/lib/libopenblas_haswellp-r0.3.6.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] reticulate_1.13 MOFAdata_1.1.0  MOFA_1.1.1

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.14.1 beeswarm_0.2.3
 [3] tidyselect_0.2.5            purrr_0.3.3
 [5] reshape2_1.4.3              corrplot_0.84
 [7] rhdf5_2.28.1                lattice_0.20-38
 [9] colorspace_1.4-1            stats4_3.6.1
[11] rlang_0.4.1                 pillar_1.4.2
[13] glue_1.3.1                  BiocParallel_1.18.1
[15] BiocGenerics_0.30.0         RColorBrewer_1.1-2
[17] matrixStats_0.55.0          GenomeInfoDbData_1.2.1
[19] foreach_1.4.7               plyr_1.8.4
[21] stringr_1.4.0               zlibbioc_1.30.0
[23] munsell_0.5.0               gtable_0.3.0
[25] codetools_0.2-16            Biobase_2.44.0
[27] IRanges_2.18.3              doParallel_1.0.15
[29] MultiAssayExperiment_1.10.4 GenomeInfoDb_1.20.0
[31] vipor_0.4.5                 parallel_3.6.1
[33] Rcpp_1.0.2                  scales_1.0.0
[35] DelayedArray_0.10.0         S4Vectors_0.22.1
[37] jsonlite_1.6                XVector_0.24.0
[39] ggplot2_3.2.1               stringi_1.4.3
[41] dplyr_0.8.3                 ggrepel_0.8.1
[43] cowplot_1.0.0               GenomicRanges_1.36.1
[45] grid_3.6.1                  tools_3.6.1
[47] bitops_1.0-6                magrittr_1.5
[49] RCurl_1.95-4.12             lazyeval_0.2.2
[51] tibble_2.1.3                crayon_1.3.4
[53] pkgconfig_2.0.3             pheatmap_1.0.12
[55] Matrix_1.2-17               ggbeeswarm_0.6.0
[57] assertthat_0.2.1            iterators_1.0.12
[59] Rhdf5lib_1.6.3              R6_2.4.0
[61] compiler_3.6.1

plotDataHeatmap() error with correlation but not with euclidean distance

Hello,

I am using MOFA_1.1.1 on a dataset with 3 layers.
Using plotDataHeatmap() with euclidean as clustering_distance_rows works perfectly fine.
Using plotDataHeatmap() with correlation as clustering_distance_rows gives errors for 2/3 layers, proteomics and phosphoproteomics, while it is working for mRNA:

Error in hclust(d, method = method) : 
  NA/NaN/Inf dans un appel ร  une fonction externe (argument 11)

Using exactly the same command on another dataset work fine for the same data types using correlation.

Do you know what can give rise to this problem? Can I check something in particular in MOFA object?
Thank you,
Jane

Do added Markov Blankets get passed over?

net = BayesNet(dim=dim, nodes=init.getNodes(), options=train_opts)

Here, the nodes argument is given as nodes=init.getNodes(). If you look at the lines above it goes as:

nodes = init.getNodes()
# Series of steps adding Markov Blankets
bayes_net = BayesNet(dim=dim, nodes=init.getNodes(), options=train_opts)

The changes made to the Markov Blanket, are not passed on to the BayesNet when created. Is this the intended behavior?

Error creating vignettes during R CMD build

Hi,

I'm getting the following error when trying to build MOFAtools:

> R CMD build MOFAtools
* checking for file โ€˜MOFAtools/DESCRIPTIONโ€™ ... OK
* preparing โ€˜MOFAtoolsโ€™:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... ERROR

Attaching package: 'MOFAtools'

The following object is masked from 'package:stats':

    predict

Quitting from lines 114-118 (MOFA_example_CLL.Rmd)
Error: processing vignette 'MOFA_example_CLL.Rmd' failed with diagnostics:
'x' must be an array of at least two dimensions
Execution halted

Digging a little deeper, it seems that the issue is in the detectPassengers() step of loadModel(). I think during the check for NULL r2_threshold in line 124, the example CLL_model.hdf5 is missing the object@TrainOptions$drop_by_r2 attribute and still returns NULL.

Thanks!

Error in runMOFA function

I am getting the following error while running CLL example on my system.

Error in py_get_attr_impl(x, name, silent) :
AttributeError: 'module' object has no attribute 'core.entry_point'

I am using python 2.7.10 and R 3.4.3.

Error with runMOFA

Hello,

I'm currently testing MOFA with the CLL data given in the vignette and I obtained this error :

> MOFAobject <- createMOFAobject(CLL_data)
Creating MOFA object from list of matrices,
 please make sure that samples are columns and features are rows...

> MOFAobject
Untrained MOFA model with the following characteristics:
  Number of views: 4
  View names: Drugs Methylation mRNA Mutations
  Number of features per view: 310 4248 5000 69
  Number of samples: 200

> DataOptions <- getDefaultDataOptions()
> ModelOptions <- getDefaultModelOptions(MOFAobject)
> TrainOptions <- getDefaultTrainOptions()
> TrainOptions$DropFactorThreshold <- 0.02
> MOFAobject <- prepareMOFA(
+   MOFAobject,
+   DataOptions = DataOptions,
+   ModelOptions = ModelOptions,
+   TrainOptions = TrainOptions
+ )
Checking data options...
Checking training options...
Checking model options...

> MOFAobject <- runMOFA(MOFAobject, outfile=tempfile())
Error in mapply(function(from, to) paste(lines[from:to], collapse = "\n"),  :
  zero-length inputs cannot be mixed with those of non-zero length

i've installed the python part and working with R-3.4.1
Do you have any idea of the problem's origin ?

Thanks in advance for your help

Anne-Sophie

Imputation of Factor Loadings

Hi,

I'm interested in clustering based on the factor loadings found by MOFA, but noticed that in the final output object after training the MOFA model there will be missing values for factors (as noted in the clusterSamples function documentation). I'm thinking of using kNN to impute factor loadings that are missing for samples, and then applying a clustering algorithm (e.g. k-means, spectral)

Do you guys have any thoughts on using KNN to impute factor loadings? I'm familiar with the basics of the model definition presented in the paper's supplementary info, but not the lower level details.

Thanks!

Error for runMOFA

Hi,
When I am using runMOFA I am getting this error--
MOFAobject <- runMOFA(MOFAobject, DirOptions = DirOptions)
Error in runMOFA(MOFAobject, DirOptions = DirOptions) :
mofa command failed with exit code 127

How to resolve this issue?

Thanks

Error in py_call_impl(callable, dots$args, dots$keywords)

Hi,
New to MOFA and super excited to try it out :)

I am installing/running CLL tutorial for the 1st time. Must warn: I speak R pretty OK, but am a total python illiterate.

Installation of python part was nightmarish. Suggest easier installation tutorial (e.g. install pip like this; install python like this with links to such sites). Several error messages during installation. Googled for tips and tricks. Manual tweaks for installing python package dependencies. Added --user flag to most installation steps. Finally, exited installation without error messages

R installation however flawless.

Running thru CLL tutorial: All steps up to and including prepareMOFA() OK

When running MOFAobject <- runMOFA(MOFAobject) I get error message:

Error in py_call_impl(callable, dots$args, dots$keywords) :
AttributeError: 'list' object has no attribute 'copy'
In addition: Warning message:
In if (class(mofa) == "try-error") { :

With traceback:

4.
stop(structure(list(message = "AttributeError: 'list' object has no attribute 'copy'", 
    call = py_call_impl(callable, dots$args, dots$keywords), 
    cppstack = structure(list(file = "", line = -1L, stack = c("1   reticulate.so                       0x000000011fe89f9b _ZN4Rcpp9exceptionC2EPKcb + 219", 
    "2   reticulate.so                       0x000000011fe90a35 _ZN4Rcpp4stopERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEE + 53",  ... 
3.
set_data at entry_point.py#90
2.
mofa_entrypoint$set_data(data = unname(lapply(object@TrainData, 
    function(x) r_to_py(t(x))))) 
1.
runMOFA(MOFAobject) 

I guess something not quite right with python installation anyway?

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS  10.14.2

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.5/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] bindrcpp_0.2.2   MOFAtools_0.99.0

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.12.0 reticulate_1.10             beeswarm_0.2.3             
 [4] tidyselect_0.2.5            corrplot_0.84               purrr_0.2.5                
 [7] reshape2_1.4.3              rhdf5_2.26.2                lattice_0.20-38            
[10] colorspace_1.4-0            stats4_3.5.1                yaml_2.2.0                 
[13] rlang_0.3.1                 pillar_1.3.1                glue_1.3.0                 
[16] BiocParallel_1.16.5         BiocGenerics_0.28.0         RColorBrewer_1.1-2         
[19] matrixStats_0.54.0          GenomeInfoDbData_1.2.0      foreach_1.4.4              
[22] bindr_0.1.1                 plyr_1.8.4                  stringr_1.3.1              
[25] zlibbioc_1.28.0             munsell_0.5.0               gtable_0.2.0               
[28] codetools_0.2-16            Biobase_2.42.0              IRanges_2.16.0             
[31] doParallel_1.0.14           MultiAssayExperiment_1.8.1  GenomeInfoDb_1.18.1        
[34] vipor_0.4.5                 parallel_3.5.1              Rcpp_1.0.0                 
[37] scales_1.0.0                DelayedArray_0.8.0          S4Vectors_0.20.1           
[40] jsonlite_1.6                XVector_0.22.0              ggplot2_3.1.0              
[43] stringi_1.2.4               dplyr_0.7.8                 ggrepel_0.8.0              
[46] cowplot_0.9.4               GenomicRanges_1.34.0        grid_3.5.1                 
[49] tools_3.5.1                 bitops_1.0-6                magrittr_1.5               
[52] RCurl_1.95-4.11             lazyeval_0.2.1              tibble_2.0.1               
[55] crayon_1.3.4                pkgconfig_2.0.2             pheatmap_1.0.12            
[58] Matrix_1.2-15               ggbeeswarm_0.6.0            assertthat_0.2.0           
[61] rstudioapi_0.9.0            iterators_1.0.10            Rhdf5lib_1.4.2             
[64] R6_2.3.0                    compiler_3.5.1     

Best wishes,
Carl

createMOFAobject() function - error with view names

Hi,

I tried to create a MOFA object from an existing list. The names of the list is not NULL, but createMOFAobject() assigns new view names for it. I had a look at it and I think here:

if(!is.null(names(data))) { ## it should be if(is.null(names(data))), right?
warning(paste0("View names are not specified in the data, renaming them to: ", paste0("view_",1:length(data), collapse=", "), "\n"))
names(data) <- paste("view",1:length(data), sep="_")
}

Thanks for this tool! I'm really interested to apply it on my dataset.

ValueError in getLvIndex

Dear MOFA maintainers,

I've recently reinstalled R, Python, and MOFA, and suddenly, data that worked before fails with the following error message. Have you seen this before, and do you have any idea as to what's wrong here?

Thanks,
J.

Error in py_call_impl(callable, dots$args, dots$keywords): ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Detailed traceback: 
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/entry_point.py", line 410, in train_model
    self.model = runMOFA(self.data, self.data_opts, self.model_opts, self.train_opts, self.train_opts['seed'])
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/build_model.py", line 143, in runMOFA
    net.iterate()
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/BayesNet.py", line 148, in iterate
    self.nodes[node].update()
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/nodes.py", line 43, in update
    self.updateParameters()
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/updates.py", line 414, in updateParameters
    latent_variables = self.getLvIndex() # excluding covariates from the list of latent variables
  File "/home/jronen/miniconda3/envs/conda36/lib/python3.6/site-packages/mofapy/core/updates.py", line 403, in getLvIndex
    if any(self.covariates):

Traceback:

1. runMOFA(MOFAobject, outfile = tempfile())
2. mofa_entrypoint$train_model()
3. py_call_impl(callable, dots$args, dots$keywords)

new bug in calculateVarianceExplained

Error in factor(fvar_mk_df$factor, levels = factorsNonconst[factor_order]) :
object 'factor_order' not found
Called from: factor(fvar_mk_df$factor, levels = factorsNonconst[factor_order])

Trouble Installing MOFA in R

Hello,

I am receiving the following errors when installing MOFA (MOFAdata was fine):

Warning: no function found corresponding to methods exports from โ€˜GenomicRangesโ€™ for: โ€˜concatenateObjectsโ€™
Warning: replacing previous import โ€˜BiocGenerics::dimsโ€™ by โ€˜Biobase::dimsโ€™ when loading โ€˜SummarizedExperimentโ€™
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace โ€˜rhdf5โ€™ 2.24.0 is being loaded, but >= 2.27.11 is required
ERROR: lazy loading failed for package โ€˜MOFAโ€™

  • removing โ€˜/Library/Frameworks/R.framework/Versions/3.5/Resources/library/MOFAโ€™
    Error in i.p(...) :
    (converted from warning) installation of package โ€˜/var/folders/8p/q0ycmsjn24z_lhggnht49nmm0000gn/T//RtmpdUtTas/file86229c13e3f/MOFA_0.99.5.tar.gzโ€™ had non-zero exit status

License?

I thoroughly enjoyed reading your paper (including the very clear and detailed appendix that I appreciated) and your code. I work at 10x Genomics and I noticed that your code does not carry a license. I am interested in examining your methodology further and exploring potential applications to 10x data. Can you please add a license? I would appreciate it if you used a permissive license like MIT/BSD. Thank you.

AttributeError: 'numpy.ndarray' object has no attribute 'as_matrix'

Good evening,

I'm trying to use MOFA, but I'm stuck with this error:

MOFAobject <- runMOFA(MOFAobject, outfile=tempfile())
Error in py_call_impl(callable, dots$args, dots$keywords) : 
  AttributeError: 'numpy.ndarray' object has no attribute 'as_matrix'

Detailed traceback: 
  File "/home/gian_ma/miniconda3/lib/python3.6/site-packages/mofa/core/entry_point.py", line 96, in parse_data
    self.data = parseData(self.data, self.data_opts)
  File "/home/gian_ma/miniconda3/lib/python3.6/site-packages/mofa/core/utils.py", line 116, in parseData
    parsed_data[m] = parsed_data[m] / np.nanstd(parsed_data[m].as_matrix())

I've installed the python library as stated in the instruction, and I can successfully import the library in python. I've also tried to specify python path, retrieved using which python:

library(reticulate)
use_python("/home/gian_ma/miniconda3/bin/python3", required=TRUE)
library(MOFAtools)

I've also tried using the setup script with "install" parameter, but I had no success.
I hope you can help me to figure this out!
Thank you

> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=it_IT.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=it_IT.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=it_IT.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=it_IT.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] MOFAtools_0.99.0 reticulate_1.9  

loaded via a namespace (and not attached):
 [1] SummarizedExperiment_1.10.1 beeswarm_0.2.3              tidyselect_0.2.4            purrr_0.2.5                 reshape2_1.4.3             
 [6] corrplot_0.84               rhdf5_2.24.0                lattice_0.20-35             colorspace_1.3-2            stats4_3.5.0               
[11] yaml_2.1.19                 rlang_0.2.1                 pillar_1.2.3                glue_1.2.0                  BiocParallel_1.14.1        
[16] BiocGenerics_0.26.0         RColorBrewer_1.1-2          bindrcpp_0.2.2              matrixStats_0.53.1          GenomeInfoDbData_1.1.0     
[21] foreach_1.4.4               bindr_0.1.1                 plyr_1.8.4                  stringr_1.3.1               zlibbioc_1.26.0            
[26] munsell_0.5.0               gtable_0.2.0                codetools_0.2-15            Biobase_2.40.0              IRanges_2.14.10            
[31] doParallel_1.0.11           MultiAssayExperiment_1.6.0  GenomeInfoDb_1.16.0         vipor_0.4.5                 parallel_3.5.0             
[36] Rcpp_0.12.17                scales_0.5.0                DelayedArray_0.6.1          S4Vectors_0.18.3            jsonlite_1.5               
[41] XVector_0.20.0              ggplot2_3.0.0               stringi_1.2.3               dplyr_0.7.6                 ggrepel_0.8.0              
[46] GenomicRanges_1.32.3        grid_3.5.0                  cowplot_0.9.2               tools_3.5.0                 bitops_1.0-6               
[51] magrittr_1.5                RCurl_1.95-4.10             lazyeval_0.2.1              tibble_1.4.2                tidyr_0.8.1                
[56] pkgconfig_2.0.1             pheatmap_1.0.10             Matrix_1.2-14               ggbeeswarm_0.6.0            assertthat_0.2.0           
[61] iterators_1.0.9             Rhdf5lib_1.2.1              R6_2.2.2                    compiler_3.5.0   

Missing for loop

return s.sum( stats.multivariate_normal.pdf(x, mean=self.params['mean'][n,:], cov=self.params['cov'][n,:,:]) )

In the above referenced line, it looks like a for-loop is missing, since the variable n is used but not defined within the function.

errors in installing MOFA

Hello,

I am receiving the following errors when installing MOFA (MOFAdata was fine):

Error in rbind(info, getNamespaceInfo(env, "S3methods")) :
number of columns of matrices must match (see arg 2)

sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Server

Matrix products: default
BLAS: /BIGDATA1/app/R/3.5.0/lib64/R/lib/libRblas.so
LAPACK: /BIGDATA1/app/R/3.5.0/lib64/R/lib/libRlapack.so

locale:
[1] C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] lattice_0.20-38 matrixStats_0.54.0
[3] IRanges_2.14.12 bitops_1.0-6
[5] grid_3.5.0 GenomeInfoDb_1.16.0
[7] stats4_3.5.0 zlibbioc_1.26.0
[9] XVector_0.20.0 S4Vectors_0.18.3
[11] Matrix_1.2-17 BiocParallel_1.14.2
[13] tools_3.5.0 Biobase_2.40.0
[15] RCurl_1.95-4.12 DelayedArray_0.6.6
[17] parallel_3.5.0 compiler_3.5.0
[19] BiocGenerics_0.26.0 GenomicRanges_1.32.7
[21] SummarizedExperiment_1.10.1 GenomeInfoDbData_1.1.0

Any idea๏ผŸ

Enrichment analysis with HUGO symbols

Hello,

I am trying your tools on few datasets. For all of them, I have HUGO symbols for feature names.
So when trying to perform feature set enrichment analysis, I get an error:

gsea <- runEnrichmentAnalysis(
MOFAobject,
view = "mRNA",
feature.sets = reactomeGS,
alpha = 0.01
)
Error in runEnrichmentAnalysis(MOFAobject, view = "mRNA", feature.sets = reactomeGS, :
Feautre names in feature.sets do not match feature names in model.

Is there a way to use HUGO symbols instead of ensembl annotations for feature.sets for enrichment analysis (using Reactome or other databases)?

Thank you in advance,
Jane

MOFA2: IndexError: list index out of range

In R, I get the following error after 400 iterations, any idea what this could be?

Iteration 400: time=0.16, ELBO=-443994.24, deltaELBO=0.197 (0.00000499%), Factors=10
 Hide Traceback
 
 Rerun with Debug
 Error in py_call_impl(callable, dots$args, dots$keywords) : 
  IndexError: list index out of range 

Failure to install with custom python

I'm trying to install MOFA into an existing R/3.5.1 install, using a custom compiled python 3.7. I can get the basic reticulate and MOFAData packages installed but the actual main MOFA install fails. I'll put some details (and a guess as to what I think is breaking) below.

Basic Setup

$ module load R
$ module load python3
$ which python3
/bi/apps/python/3.7.3/bin/python3

Show that python works and that mofapy is there

$ python3
Python 3.7.3 (default, May 24 2019, 14:03:09)
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mofapy
>>> print(mofapy.__path__)
['/bi/apps/python/3.7.3/lib/python3.7/site-packages/mofapy']

Show that R and reticulate are working

$ R

R version 3.5.1 (2018-07-02) -- "Feather Spray"
[etc]

> library(reticulate)
> use_python("/bi/apps/python/3.7.3/bin/python3")
> py_config()
python:         /bi/apps/python/3.7.3/bin/python3
libpython:      /bi/apps/python/3.7.3/lib/libpython3.7m.so
pythonhome:     /bi/apps/python/3.7.3:/bi/apps/python/3.7.3
version:        3.7.3 (default, May 24 2019, 14:03:09)  [GCC 5.2.0]
numpy:          /bi/apps/python/3.7.3/lib/python3.7/site-packages/numpy
numpy_version:  1.16.3

python versions found:
 /bi/apps/python/3.7.3/bin/python3
 /usr/bin/python
 /opt/python/bin/python
 /opt/python/bin/python3
 /bi/home/andrewss/miniconda3/envs/graphprot/bin/python
 /bi/home/andrewss/miniconda3/bin/python

Show that MOFAdata is there

> library(MOFAdata)

(you don't see anything, but no news is good news)

Try to install MOFA

> devtools::install_github("bioFAM/MOFA", build_opts = c("--no-resave-data"))
Downloading GitHub repo bioFAM/MOFA@master
v  checking for file '/tmp/RtmpXT3Yne/remotes7ae2442a099a/bioFAM-MOFA-5785253/DESCRIPTION' (426ms)
-  preparing 'MOFA':
v  checking DESCRIPTION meta-information ...
-  installing the package to build vignettes
E  creating vignettes (1m 29.7s)
   Warning in engine$weave(file, quiet = quiet, encoding = enc) :
     Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.
   Warning in engine$weave(file, quiet = quiet, encoding = enc) :
     Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.
   Loading required package: SummarizedExperiment
   Loading required package: GenomicRanges
   Loading required package: stats4
   Loading required package: BiocGenerics
   Loading required package: parallel

   Attaching package: 'BiocGenerics'

   The following objects are masked from 'package:parallel':

       clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
       clusterExport, clusterMap, parApply, parCapply, parLapply,
       parLapplyLB, parRapply, parSapply, parSapplyLB

   The following objects are masked from 'package:stats':

       IQR, mad, sd, var, xtabs

   The following objects are masked from 'package:base':

       Filter, Find, Map, Position, Reduce, anyDuplicated, append,
       as.data.frame, basename, cbind, colMeans, colSums, colnames,
       dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
       intersect, is.unsorted, lapply, lengths, mapply, match, mget,
       order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
       rowMeans, rowSums, rownames, sapply, setdiff, sort, table,
       tapply, union, unique, unsplit, which, which.max, which.min

   Loading required package: S4Vectors

   Attaching package: 'S4Vectors'

   The following object is masked from 'package:base':

       expand.grid

   Loading required package: IRanges
   Loading required package: GenomeInfoDb
   Loading required package: Biobase
   Welcome to Bioconductor

       Vignettes contain introductory material; view with
       'browseVignettes()'. To cite Bioconductor, see
       'citation("Biobase")', and for packages 'citation("pkgname")'.

   Loading required package: DelayedArray
   Loading required package: matrixStats

   Attaching package: 'matrixStats'

   The following objects are masked from 'package:Biobase':

       anyMissing, rowMedians

   Loading required package: BiocParallel

   Attaching package: 'DelayedArray'

   The following objects are masked from 'package:matrixStats':

       colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

   The following objects are masked from 'package:base':

       aperm, apply


   Attaching package: 'MOFA'

   The following objects are masked from 'package:Biobase':

       featureNames, featureNames<-, sampleNames, sampleNames<-

   The following object is masked from 'package:stats':

       predict

   Creating MOFA object from a MultiAssayExperiment object...
   Warning in engine$weave(file, quiet = quiet, encoding = enc) :
     Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.
   Warning in engine$weave(file, quiet = quiet, encoding = enc) :
     Pandoc (>= 1.12.3) and/or pandoc-citeproc not available. Falling back to R Markdown v1.
   'import site' failed; use -v for traceback
   Traceback (most recent call last):
     File "/bi/apps/R/3.5.1/lib64/R/library/reticulate/config/config.py", line 3, in <module>
       import os
   ImportError: No module named os
   Quitting from lines 42-56 (MOFA_example_simulated.Rmd)
   Error: processing vignette 'MOFA_example_simulated.Rmd' failed with diagnostics:
   mofapy package not found. Make sure that Reticulate is pointing to the right Python binary.
            Please read the instructions here: https://github.com/bioFAM/MOFA#installation
   Execution halted
Error in (function (command = NULL, args = character(), error_on_status = TRUE,  :
  System command error

Test the os import in our python

$ python3
Python 3.7.3 (default, May 24 2019, 14:03:09)
[GCC 5.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>>

My guess is that the install script is actually just calling python rather than python3 which is what is configured in reticulate. If I try this on the command line I get the same error as the install script.

$ python
'import site' failed; use -v for traceback
Python 2.6.6 (r266:84292, Dec  7 2011, 20:48:22)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named os
>>>

It seems pretty likely that it's just the name of the python executable which is causing the failure, but I'm stuck for knowing where to go and look for how to change it. If you have any suggestions for where this would need to be modified / configured then that would be great.

Issue with runMOFA(object)

Hi,

I am having a similar issue as reported in #50

However, I am running it via the R Studio server.
Error"
Error in value[[3L]](cond) :
mofapy package not found. Make sure that Reticulate is pointing to the right Python binary.
Please read the instructions here: https://github.com/bioFAM/MOFA#installation
My pyconfig() shows version as python3.6
numpy_version: 1.18.1

Below is my sessioninfo()

sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] reticulate_1.14             biomaRt_2.42.0              MOFAdata_1.2.0              MOFA_1.2.0                 
 [5] MultiAssayExperiment_1.12.6 SummarizedExperiment_1.16.1 DelayedArray_0.12.2         BiocParallel_1.20.1        
 [9] matrixStats_0.55.0          Biobase_2.46.0              GenomicRanges_1.38.0        GenomeInfoDb_1.22.0        
[13] IRanges_2.20.2              S4Vectors_0.24.2            BiocGenerics_0.32.0         forcats_0.4.0              
[17] stringr_1.4.0               dplyr_0.8.3                 purrr_0.3.3                 readr_1.3.1                
[21] tidyr_1.0.0                 tibble_2.1.3                ggplot2_3.2.1               tidyverse_1.3.0            
[25] gdata_2.18.0               

loaded via a namespace (and not attached):
 [1] ggbeeswarm_0.6.0       colorspace_1.4-1       XVector_0.26.0         fs_1.3.1               rstudioapi_0.10       
 [6] farver_2.0.3           ggrepel_0.8.1          bit64_0.9-7            AnnotationDbi_1.48.0   fansi_0.4.1           
[11] lubridate_1.7.4        xml2_1.2.2             codetools_0.2-16       doParallel_1.0.15      zeallot_0.1.0         
[16] jsonlite_1.6           packrat_0.5.0          broom_0.5.3            dbplyr_1.4.2           pheatmap_1.0.12       
[21] BiocManager_1.30.10    compiler_3.6.0         httr_1.4.1             backports_1.1.5        assertthat_0.2.1      
[26] Matrix_1.2-18          lazyeval_0.2.2         cli_2.0.1              prettyunits_1.1.0      tools_3.6.0           
[31] gtable_0.3.0           glue_1.3.1             GenomeInfoDbData_1.2.2 reshape2_1.4.3         rappdirs_0.3.1        
[36] Rcpp_1.0.3             cellranger_1.1.0       vctrs_0.2.1            nlme_3.1-143           iterators_1.0.12      
[41] rvest_0.3.5            lifecycle_0.1.0        gtools_3.8.1           XML_3.99-0.1           zlibbioc_1.32.0       
[46] scales_1.1.0           hms_0.5.3              rhdf5_2.30.1           RColorBrewer_1.1-2     curl_4.3              
[51] memoise_1.1.0          stringi_1.4.5          RSQLite_2.2.0          corrplot_0.84          foreach_1.4.8         
[56] rlang_0.4.2            pkgconfig_2.0.3        bitops_1.0-6           lattice_0.20-38        Rhdf5lib_1.8.0        
[61] cowplot_1.0.0          bit_1.1-15.1           tidyselect_0.2.5       plyr_1.8.5             magrittr_1.5          
[66] R6_2.4.1               generics_0.0.2         DBI_1.1.0              pillar_1.4.3           haven_2.2.0           
[71] withr_2.1.2            RCurl_1.95-4.13        modelr_0.1.5           crayon_1.3.4           BiocFileCache_1.10.2  
[76] progress_1.2.2         grid_3.6.0             readxl_1.3.1           blob_1.2.1             reprex_0.3.0          
[81] digest_0.6.23          openssl_1.4.1          munsell_0.5.0          beeswarm_0.2.3         vipor_0.4.5           
[86] askpass_1.1  

Any idea how to get a workaround? I tried to source the runMOFA9() separately as well but it did not work.

Kind regards,

VD

Endless Removal of Factors

Hi,

I'm trying to run MOFA with GISTIC CNV data and vst transformed RNA-seq data (DESEQ2), and if I set the dropfactor threshold to 0.01 and tolerance to 1.0 for TrainingOptions, at some point, I can see in the output there's an endless dropping of factors until none are left. If I set the tolerance to 5.0 then the model converges.

From the output, I can see that the model appears to converge with deltaElbow ~2-5, and at some point a few jumps occur. Any idea/suggestions of how to handle this issue?

Other relevant information is that I played around with 20 factors, setting the tolerance to 5 and MOFA managed to find structure in the data.
image

Here's a subset of the code that failed


## setup MOFA object
MOFA.obj <- createMOFAobject(multi.assay)
DataOptions <- getDefaultDataOptions()
ModelOptions <- getDefaultModelOptions(MOFA.obj)
TrainOptions <- getDefaultTrainOptions()

DataOptions
ModelOptions
TrainOptions

## note that if we set tolerance below 5.0, we start dropping factors endlessly

ModelOptions$numFactors <- 36
TrainOptions$DropFactorThreshold <- 0.01
TrainOptions$tolerance <- 1.0

MOFAlist.fname <- 'MOFAlist.RData'
tryCatch({
  if (!file.exists(file.path(output.dir, MOFAlist.fname))) {
  # Get 1 MOFA models
  n_inits <- 10
  MOFAlist <- lapply(1:n_inits, function(it) {
    # set seed
    TrainOptions$seed <- 2019*it
    MOFA.obj <- prepareMOFA(
      MOFA.obj, 
      DataOptions = DataOptions,
      ModelOptions = ModelOptions,
      TrainOptions = TrainOptions
    )
    # run MOFA
    runMOFA(MOFA.obj, outfile=tempfile())
  })
  save(MOFAlist, file = file.path(output.dir, MOFAlist.fname))
} else {
  # Load File
  load(file.path(output.dir, MOFAlist.fname))
}
}, error = function(e) {sessionInfo()})

And the SessionInfo

R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /home/owenwhitley/anaconda3/lib/libmkl_rt.so

locale:
 [1] LC_CTYPE=en_CA.UTF-8       LC_NUMERIC=C               LC_TIME=en_CA.UTF-8       
 [4] LC_COLLATE=en_CA.UTF-8     LC_MONETARY=en_CA.UTF-8    LC_MESSAGES=en_CA.UTF-8   
 [7] LC_PAPER=en_CA.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_CA.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] GSA_1.03                   MultiAssayExperiment_1.4.9 DESeq2_1.18.1             
 [4] SummarizedExperiment_1.8.1 DelayedArray_0.4.1         matrixStats_0.54.0        
 [7] Biobase_2.38.0             GenomicRanges_1.30.3       GenomeInfoDb_1.14.0       
[10] IRanges_2.12.0             S4Vectors_0.16.0           BiocGenerics_0.24.0       
[13] MOFA_0.99.0                biomaRt_2.34.2            

loaded via a namespace (and not attached):
 [1] bitops_1.0-6           bit64_0.9-7            doParallel_1.0.14      RColorBrewer_1.1-2    
 [5] progress_1.2.0         httr_1.4.0             backports_1.1.3        tools_3.4.4           
 [9] R6_2.3.0               rpart_4.1-13           vipor_0.4.5            Hmisc_4.2-0           
[13] DBI_1.0.0              lazyeval_0.2.1         colorspace_1.4-0       nnet_7.3-12           
[17] gridExtra_2.3          tidyselect_0.2.5       prettyunits_1.0.2      bit_1.1-14            
[21] compiler_3.4.4         htmlTable_1.13.1       checkmate_1.9.1        scales_1.0.0          
[25] genefilter_1.60.0      stringr_1.3.1          digest_0.6.18          foreign_0.8-71        
[29] XVector_0.18.0         base64enc_0.1-3        pkgconfig_2.0.2        htmltools_0.3.6       
[33] htmlwidgets_1.3        rlang_0.3.1            rstudioapi_0.9.0       RSQLite_2.1.1         
[37] shiny_1.2.0            bindr_0.1.1            jsonlite_1.6           BiocParallel_1.12.0   
[41] acepack_1.4.1          dplyr_0.7.8            RCurl_1.95-4.11        magrittr_1.5          
[45] Formula_1.2-3          GenomeInfoDbData_1.0.0 Matrix_1.2-15          Rcpp_1.0.0            
[49] ggbeeswarm_0.6.0       munsell_0.5.0          reticulate_1.10        yaml_2.2.0            
[53] stringi_1.2.4          zlibbioc_1.24.0        rhdf5_2.22.0           plyr_1.8.4            
[57] grid_3.4.4             blob_1.1.1             promises_1.0.1         ggrepel_0.8.0         
[61] shinydashboard_0.7.1   crayon_1.3.4           lattice_0.20-38        cowplot_0.9.4         
[65] splines_3.4.4          annotate_1.56.2        hms_0.4.2              locfit_1.5-9.1        
[69] knitr_1.21             pillar_1.3.1           geneplotter_1.56.0     reshape2_1.4.3        
[73] codetools_0.2-16       XML_3.98-1.11          glue_1.3.0             latticeExtra_0.6-28   
[77] data.table_1.12.0      httpuv_1.4.5.1         foreach_1.4.4          gtable_0.2.0          
[81] purrr_0.3.0            tidyr_0.8.2            assertthat_0.2.0       ggplot2_3.1.0         
[85] xfun_0.4               mime_0.6               xtable_1.8-3           later_0.7.5           
[89] survival_2.43-3        tibble_2.0.1           pheatmap_1.0.12        iterators_1.0.10      
[93] AnnotationDbi_1.40.0   beeswarm_0.2.3         memoise_1.1.0          cluster_2.0.7-1       
[97] bindrcpp_0.2.2         corrplot_0.84         

Here's a snippet of the output:

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

Iteration 1926: time=0.61, Factors=25

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

Iteration 1927: time=0.57, Factors=24

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

Iteration 1928: time=0.53, Factors=23

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

Iteration 1929: time=0.50, Factors=22

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

And the point of failure

Iteration 1946: time=0.07, Factors=5

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

Iteration 1947: time=0.06, Factors=4

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

Iteration 1948: time=0.05, Factors=3

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

Iteration 1949: time=0.04, Factors=2

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

Iteration 1950: time=0.02, Factors=1

...A Factor explains less than 1.0% of variance, dropping it and recomputing ELBO...

Shut down all components, no structure found in the data.

plotFactorBeeswarm does not work if all sample Ids are integers

When using a model where all sample identifiers are numbers and running plotFactorBeeswarm(Model, factor = 1) leaving "color_by" and "shape_by" undefined, the command will fail with
Error in seq.default(h[1], h[2], length.out = n) : 'to' must be a finite number

I believe in "plotFactors.R" at line 161 Z$sample is a vector of integers if all sample ids are numeric and therefore fills Z$color_by with NA values instead. I suspect that the same will happen with shape_by at line 191.

Factors should have names starting with a letter

Currently, factors in a MOFA model have names that are string representations of integers, which is a bad idea. It means that getFactors(mofa, 2) and (getFactors(mofa, "2") return different results. I would recommend that you prepend a lettered prefix to each factor name, e.g. "LF" for latent factor, such that there is less confusion between numeric and character indices.

Error in py_call_impl(callable, dots$args, dots$keywords) : SystemExit: None

Hello,

I also saw a thread of this issue (probably similar) and I understand that it is important to install and use the most recent version of mofapy (ver. 1.1). I installed this version, but I still have the error as follows.

Any thought on that? Thank you!

Gene

Error in py_call_impl(callable, dots$args, dots$keywords) :
SystemExit: None

Detailed traceback:
File "$HOME/bin/anaconda3/envs/env_MOFA/lib/python3.6/site-packages/mofapy/core/entry_point.py", line 410, in train_model
self.model = runMOFA(self.data, self.data_opts, self.model_opts, self.train_opts, self.train_opts['seed'])
File "$HOME/bin/anaconda3/envs/env_MOFA/lib/python3.6/site-packages/mofapy/core/build_model.py", line 143, in runMOFA
net.iterate()
File "$HOME/bin/anaconda3/envs/env_MOFA/lib/python3.6/site-packages/mofapy/core/BayesNet.py", line 141, in iterate
self.removeInactiveFactors(**self.options['drop'])
File "$HOMEbin/anaconda3/envs/env_MOFA/lib/python3.6/site-packages/mofapy/core/BayesNet.py", line 119, in removeInactiveFactors
exit()
File "$HOME/bin/anaconda3/envs/env_MOFA/lib/python3.6/_sitebuiltins.py", line 26, in call
raise SystemExit(code)

variable %in% names(object@Expectations) is not TRUE

Hi,

I have been trying to reproduce the example in your R vigenette, but I am getting an error which should be something very simple to fix when running calculateVarianceExplained(). I just don't see where this error can be. Please could you help me with this issue?

Here is my code (the same as in R vignette essentially):

require(MOFAtools)

data("CLL_data")
MOFAobject <- createMOFAobject(CLL_data)
ModelOptions <- getDefaultModelOpts(MOFAobject)
TrainOptions <- getDefaultTrainOpts()
TrainOptions$maxiter <- 5
MOFAobject <- prepareMOFA(MOFAobject,
DirOptions = DirOptions,
ModelOptions = ModelOptions,
TrainOptions = TrainOptions
)
r2 <- calculateVarianceExplained(MOFAobject)
Error: variable %in% names(object@Expectations) is not TRUE

Range of total variance explained per view

Hello,

I ran MOFA on 5 datasets, 1 with 4 data types and 4 with 2 data types.
I got very different proportions of total variance explained per view and I would like a feedback about that:
A/ 0,0,0.5,0.6
B/ 0.5,0.9
C/ 0.3,0.5
D/ 0,0.5
E/ 0.25,0

  1. I understand that when no variance is explained in a data type, this one is useless. I would assume that often it reflects a problem in the analysis (like imbalanced number of features across data types) rather than no biological interest. Do you agree?

  2. In one dataset, I got quite good total variance explained per view: 0.5 and 0.9 for 2 layers. Is it good compared to what is found usually? Can I assume that the subsequent analysis should be "better" than when the total variance explained per view is less, for example 0.2 and 0.4?

  3. In these 5 cases, I tried to have balanced design across the data types, but got in several datasets no variance explained in a layer. Is it common? Would you recommend something more (like being more stringent in the number of features kept) to change that?

Thank you in advance for your feedback
Jane

plotDataHeatmap() plots interpretation

Hello,

I am not sure I understood properly what shows the plotDataHeatmap().
In the documentation, we find:

Function to visualize the loadings for a given set of factors in a given view.
This is useful to visualize the overall pattern of the weights but not to individually characterise the factors.

Let us assume I have 2 layers, gene expression and methylation both at gene level. Moreover, from the plotVarianceExplained(), I see that the factor 1 is represented by both layers.
When looking at the heatmap obtained from plotDataHeatmap(MOFAobject, view = "mRNA", factor=1), I see features that are enriched in factor 1 in each patient.
Are the genes that are enriched the result of the integration of both layers or only genes enriched in gene expression? In particular, if instead of methylation at gene level I have it at CpG level, it would be impossible to show CpGs in the gene expression view.

To summarize, I have 2 questions:

  • From which layer(s) come from the features in this plot? I am confused because the matrices W contain the features * the components and the matrix Z contains the components * nb of samples. So, how can we have the features and the samples? Is it one of the reconstructed Y matrices?
  • Are the values represented in the heatmap the input values for these particular features in the layer in question (gene expression in this case)?

Thank you,
Jane

Feature request: FSEA direction of pathway/factor association

Hi,

I've looked through the man pages and vignettes for the package, and it doesn't appear as if there's any functionality to determine the direction of association of a pathway with a factor. With runEnrichmentAnalysis, correct me if I'm wrong, but you get the result of a two sided test (p-value and adjusted p-value). For a biologist interested in characterizing what the sources of variation are in their data, the direction of association of pathways matter (e.g. how does location in the space of 2 factors determine how stem-like my samples are?). I think it might be a good idea to include the test statistic (e.g. mean difference statistic) in the output.

Thanks

Improving memory efficiency for CITE-seq data analysis

I would like this to work better than it currently does:

## ------------------------------------------------------------------------
# Caching it locally with BiocFileCache to avoid repeating it.
library(BiocFileCache)
bfc <- BiocFileCache(ask=FALSE)
stuff <- bfcrpath(bfc, file.path("http://cf.10xgenomics.com",
    "samples/cell-exp/3.0.0/pbmc_10k_protein_v3",
    "pbmc_10k_protein_v3_filtered_feature_bc_matrix.tar.gz"))
untar(stuff, exdir=tempdir())

# Loading it in as a SingleCellExperiment object.
library(DropletUtils)
sce <- read10xCounts(file.path(tempdir(), "filtered_feature_bc_matrix"))

## ------------------------------------------------------------------------
sce <- splitAltExps(sce, rowData(sce)$Type)
altExpNames(sce)
altExp(sce) # Can be used like any other SingleCellExperiment. 

counts(altExp(sce)) <- as.matrix(counts(altExp(sce)))
counts(altExp(sce))[,1:10] # sneak peek

## ------------------------------------------------------------------------
library(scater)
mito <- grep("^MT-", rowData(sce)$Symbol)
df <- perCellQCMetrics(sce, subsets=list(Mito=mito))
mito.discard <- isOutlier(df$subsets_Mito_percent, type="higher")

ab.detected <- df$`altexps_Antibody Capture_detected`
med.detected <- median(ab.detected)
threshold <- med.detected/2
ab.discard <- ab.detected < threshold

discard <- ab.discard | mito.discard
sce <- sce[,!discard]

## ------------------------------------------------------------------------
library(DelayedMatrixStats)
# TODO: move into the DropletUtils package.
ambient <- rowMeans(counts(altExp(sce)))
sf.amb <- colMedians(counts(altExp(sce))/ambient)
sf.amb <- sf.amb/mean(sf.amb)

## ------------------------------------------------------------------------
sizeFactors(altExp(sce)) <- sf.amb
sce <- logNormCounts(sce, use_altexps=TRUE)

## ------------------------------------------------------------------------
library(MOFA)
mobj <- createMOFAobject(list(genes=logcounts(sce),
    tags=logcounts(altExp(sce))))
mobj <- prepareMOFA(mobj)
mobj <- runMOFA(mobj)

This is hitting swap on my 16 GB laptop, and there's only 8000 cells involved. I'm a bit bemused about why this is occurring - even densifying the larger matrix should only cost ~2GB.

Session info
R version 3.6.0 Patched (2019-05-02 r76458)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.3 LTS

Matrix products: default
BLAS:   /home/luna/Software/R/R-3-6-branch-dev/lib/libRblas.so
LAPACK: /home/luna/Software/R/R-3-6-branch-dev/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] parallel  stats4    stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] MOFA_1.1.1                   DelayedMatrixStats_1.7.2    
 [3] scater_1.13.27               ggplot2_3.2.1               
 [5] DropletUtils_1.5.12          SingleCellExperiment_1.7.11 
 [7] SummarizedExperiment_1.15.10 DelayedArray_0.11.8         
 [9] BiocParallel_1.19.5          matrixStats_0.55.0          
[11] Biobase_2.45.1               GenomicRanges_1.37.17       
[13] GenomeInfoDb_1.21.2          IRanges_2.19.18             
[15] S4Vectors_0.23.25            BiocGenerics_0.31.6         
[17] BiocFileCache_1.9.1          dbplyr_1.4.2                

loaded via a namespace (and not attached):
 [1] viridis_0.5.1               httr_1.4.1                 
 [3] edgeR_3.27.14               BiocSingular_1.1.7         
 [5] jsonlite_1.6                foreach_1.4.7              
 [7] bit64_0.9-7                 viridisLite_0.3.0          
 [9] R.utils_2.9.0               assertthat_0.2.1           
[11] dqrng_0.2.1                 blob_1.2.0                 
[13] GenomeInfoDbData_1.2.2      vipor_0.4.5                
[15] ggrepel_0.8.1               corrplot_0.84              
[17] pillar_1.4.2                RSQLite_2.1.2              
[19] backports_1.1.5             lattice_0.20-38            
[21] reticulate_1.13             glue_1.3.1                 
[23] limma_3.41.18               digest_0.6.22              
[25] RColorBrewer_1.1-2          XVector_0.25.0             
[27] colorspace_1.4-1            cowplot_1.0.0              
[29] plyr_1.8.4                  Matrix_1.2-17              
[31] R.oo_1.22.0                 pkgconfig_2.0.3            
[33] pheatmap_1.0.12             zlibbioc_1.31.0            
[35] purrr_0.3.3                 scales_1.0.0               
[37] HDF5Array_1.13.11           MultiAssayExperiment_1.11.9
[39] tibble_2.1.3                withr_2.1.2                
[41] lazyeval_0.2.2              magrittr_1.5               
[43] crayon_1.3.4                memoise_1.1.0              
[45] R.methodsS3_1.7.1           doParallel_1.0.15          
[47] beeswarm_0.2.3              tools_3.6.0                
[49] stringr_1.4.0               Rhdf5lib_1.7.6             
[51] munsell_0.5.0               locfit_1.5-9.1             
[53] irlba_2.3.3                 compiler_3.6.0             
[55] rsvd_1.0.2                  rlang_0.4.0                
[57] rhdf5_2.29.6                grid_3.6.0                 
[59] RCurl_1.95-4.12             iterators_1.0.12           
[61] BiocNeighbors_1.3.5         rappdirs_0.3.1             
[63] bitops_1.0-6                codetools_0.2-16           
[65] gtable_0.3.0                DBI_1.0.0                  
[67] curl_4.2                    reshape2_1.4.3             
[69] R6_2.4.0                    gridExtra_2.3              
[71] dplyr_0.8.3                 bit_1.1-14                 
[73] zeallot_0.1.0               stringi_1.4.3              
[75] ggbeeswarm_0.6.0            Rcpp_1.0.2                 
[77] vctrs_0.2.0                 tidyselect_0.2.5           

FactorBeeswarmPlot uses unnecessary x aesthetic

FactorBeesawemPlot uses the "factor" variable as both the x value and the facet. This results in a lot of wasted space if you want to plot multiple factors. I get a better plot by doing something like this:

FactorBeeswarmPlot(mofaobj, 1:10, color_by = "time_point") + aes(x=0) + xlab("") + facet_wrap(~factor, scales="free") + scale_x_continuous(breaks=NULL)

This removes the irrelevant X scale entirely, puts each factor in its own facet, allows each factor to spread out horizontally throughout its entire facet, and gives each factor its own y scale. The result looks like this:

image

Error in py_get_attr_impl(x, name, silent) : AttributeError: module 'mofapy' has no attribute 'core.entry_point'

Hi,

I know that someone else already posted a similar issue and got his issue answered by you. I am posting mine because I tried to resolve the issue as suggested, but my attempt was not successful. I appreciate any of your help.

Let me explain what I did.

  • Computing environment: Linux CentOS 6.3

  • Python and condaenv: Anaconda was used to install python and create a conda environemnt for the use of mofapy through the R pakcage 'reticulate'.
    Conda environment was created as follows on the linux command line.

conda create -n env_MOFA -c bioconda numpy scipy mofapy python=3.6

  • R: R 3.4.3 is run on Rstudio. MOFA, MOFAdata, and reticulate packages are installed. Python is being used as follows. The followings are on the R command.

library(MOFA)
library(MOFAdata)
library(reticulate)
use_condaenv("env_MOFA", conda = "~/bin/python/bin/conda", required = TRUE)
py_config()
python: ~/bin/python/envs/env_MOFA/bin/python
libpython: ~/bin/python/envs/env_MOFA/lib/libpython3.6m.so
pythonhome: /bin/python/envs/env_MOFA:/bin/python/envs/env_MOFA
version: 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) [GCC 7.3.0]
numpy: ~/bin/python/envs/env_MOFA/lib/python3.6/site-packages/numpy
numpy_version: 1.11.3
NOTE: Python version was forced by use_python function

Then, I try to test MOFA on the CLL data as follows.

data("CLL_data")
MOFAobject <- createMOFAobject(CLL_data)

DataOptions <- getDefaultDataOptions()

ModelOptions <- getDefaultModelOptions(MOFAobject)
ModelOptions$numFactors <- 50

TrainOptions <- getDefaultTrainOptions()

TrainOptions$DropFactorThreshold <- 0.02
TrainOptions$seed <- 2017
TrainOptions$tolerance <- 0.01

MOFAobject <- prepareMOFA(MOFAobject,
DataOptions = DataOptions,
ModelOptions = ModelOptions,
TrainOptions = TrainOptions)

MOFAobject <- runMOFA(MOFAobject)
[1] "No output file provided, using a temporary file..."
Error in py_get_attr_impl(x, name, silent) :
AttributeError: module 'mofapy' has no attribute 'core.entry_point'

Interestingly, when I run import("mofapy"), no errors were returned; thus, mofapy is actually imported. Do you have any idea or comment on the issue that I have?

Thank you!

Gene

Subsetting Data Prior to Running MOFA

Hi,

I noticed in your paper that you subsetted for DNA methylation probes from the illumina array with the top 1% of variance, as well as the RNA-seq genes with the top 20% of variance across samples. On my own I found out that if I didn't do this, the factors found would be dominated by DNA methylation for my own data, the details of which are discussed in the next paragraph. I'm wondering why the subsetting is required for the MOFA model to identify factors explaining variance in both datatypes.

When I initially tried running MOFA on the dataset I have (~50 samples, Illumina EPIC methylation array, RNA-seq), I didn't do this subsetting, and I ended up getting 2 factors explaining about 50% of the DNA methylation data's variance and virtually none of the RNA-seq data's variance. I reran MOFA, but with the same data matrices subsetted for the top 20% variant genes for RNA-seq and top 1% variant probes for DNA methylation, and obtained 9 factors, two of which explained a good portion of the RNA-seq data's variance.

Here's the plot.

image

Documentation missmatch for getDefaultModelOptions()$numFactors

Hi Britta and Ricard,

I'm running MOFA 1.2.0.
The documentation says the default value of numFactors in getDefaultModelOptions() is 25, but the source code says numFactors = ceiling(nsamples/2). I also looked in the source of the current master branch and there it says numFactors = 10 although the documentation still says 25.

Best wishes,
Frederik

Truncated feature names after runMOFA

I noticed that somewhere in the runMOFA function, the feature names are getting truncated and thereby creating non-unique names that breaks downstream code.

As an example, here are two of the original features:

> rownames(MOFAobject@TrainData[["plasma"]])[779:780]
[1] "[plasma] sulfate of piperine metabolite C16H19NO3 (2)*"
[2] "[plasma] sulfate of piperine metabolite C16H19NO3 (3)*"

After running runMOFA:

> MOFAobject2 <- loadModel(modelFile, MOFAobject) # loading results from runMOFA
> rownames(MOFAobject2@TrainData[["plasma"]])[779:780]
[1] "[plasma] sulfate of piperine metabolite C16H19NO3 "
[2] "[plasma] sulfate of piperine metabolite C16H19NO3 "

Any ideas on where this truncation is happening? I have narrowed it down to the runMOFA call, but not sure where within that function.

Thanks in advance for any help!

Error in if (any(r[[i]] > cor_threshold)) { : missing value where TRUE/FALSE needed

Hi

I am trying to fit a model from TCGA data (RNASeq, Methylation, CNV, Mutations, miRNASeq, RPPA).

When I run the vignette example everything is fine.

When I fit the model (runMOFA) with my data, I get this error:

Error in if (any(r[[i]] > cor_threshold)) { : missing value where TRUE/FALSE needed Warning messages: 1: In H5Dread(h5dataset = h5dataset, h5spaceFile = h5spaceFile, h5spaceMem = h5spaceMem, : integer value -2^63 replaced NA. See the section 'Large integer data types' in the 'rhdf5' vignette for more details. 2: In H5Dread(h5dataset = h5dataset, h5spaceFile = h5spaceFile, h5spaceMem = h5spaceMem, : integer value -2^63 replaced NA. See the section 'Large integer data types' in the 'rhdf5' vignette for more details.

Any idea?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.