zellerlab / SIMBA

R package for the simulation of metagenomic samples
1 stars 0 forks source link

feature table has several classes #2

Open mmpust opened 1 year ago

mmpust commented 1 year ago

Hi Jakob, thanks for developing SIMBA! I have a numeric input feature matrix with samples (columns) and taxa (rows) information. When I run create.data.simulation, I get the following error message:

+ Start checking data
Error in check.original.data(feat, meta, sim.type, sim.method) : 
  Your feature table has several classes (should be only one)!

What does that mean? Thanks!

jakob-wirbel commented 1 year ago

Hi @mmpust thanks for using SIMBA! Please note that the package is under ongoing development and not quite ready yet, so don't be surprised when you run into a couple of issues :D :D :D

Regarding your question: The feature matrix should be a matrix object or a list of matrices (if you want to combine several studies together) or a data.frame (or a list of data.frames). I guess that you gave a tibble to the function, which then confuses the function because a tibble has more than one class:

 df <- tibble(x=c(1,2,3), y=c(1,2,3))
class(df)
[1] "tbl_df"     "tbl"        "data.frame"

What exactly was your function call? Cheers Jakob