Skip to content

Problem to use mofaOBJECT #62

@geraldocantelli

Description

@geraldocantelli

Good afternoon,
I am trying to use MOFA with my own data but when I create a MOFA object and try to set the environment to run MOFA I get the following error;

$scaleViews
[1] FALSE

$removeIncompleteSamples
[1] FALSE

Error in data[!is.na(data)]%%1 :
argument non-numéric to binary operator
Calls: getDefaultModelOptions -> .inferLikelihoods
interrupts

My code is:
library(MultiAssayExperiment)
library(MOFA)
library(MOFAdata)
library(reticulate)

Using a specific python binary

use_python("/usr/local/bin/python")

transcriptome <- read.table ("/home/geraldo/eclipse-workspace/wsapp/WebContent/apprMOFA/transcriptome.csv", sep = "\t", header = FALSE)

dfT <- data.frame(transcriptome)

metabolome <- read.table ("/home/geraldo/eclipse-workspace/wsapp/WebContent/apprMOFA/metabolome.csv", sep = "\t", header = FALSE)

dfM <- data.frame(metabolome)

allLists <- list ("transcriptoma" = dfT,"metaboloma" = dfM)

#data("CLL_data")

MOFAobject <- createMOFAobject(allLists)

DataOptions <- getDefaultDataOptions()

DataOptions

ModelOptions <- getDefaultModelOptions(MOFAobject)

TrainOptions <- getDefaultTrainOptions()

TrainOptions

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

outfile = file.path(getwd(),"model.hdf5")

MOFAobject.trained <- runMOFA(MOFAobject, outfile)

Could someone say how to set inferLikelihoods correctly or what can I do in order to code run, please?

The file data: metabolome.csv
metaboloma spontL1 sp80
metaboloma A 10.0 1.0
metaboloma B 5.0 5.0
metaboloma C 1.0 10.0
metaboloma A 10.0 1.0
metaboloma B 5.0 5.0
metaboloma C 1.0 10.0
metaboloma A 10.0 1.0
metaboloma B 5.0 5.0
metaboloma C 1.0 10.0
metaboloma A 10.0 1.0
metaboloma B 5.0 5.0
metaboloma C 1.0 10.0

And transcriptome.csv is the same with the word "transcriptoma".

Best regards,
Geraldo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions