cozygene / FEAST

Fast expectation maximization for microbial source tracking
Other
115 stars 60 forks source link

Error in rowSums(C[c(train.ix, test.ix), ]) #33

Closed timeresistance1996 closed 2 years ago

timeresistance1996 commented 2 years ago

I am try FEAST with the example dataset https://github.com/cozygene/FEAST/tree/master/Data_files and have hindered with the error: Error in rowSums(C[c(train.ix, test.ix), ])

my steps here is :

Packages <- c("Rcpp", "RcppArmadillo", "vegan", "dplyr", "reshape2", "gridExtra", "ggplot2", "ggthemes") lapply(Packages, library, character.only = TRUE) metadata <- Load_metadata(metadata_path = "./FEAST-master/Data_files/metadata_example.txt") otus <- Load_CountMatrix(CountMatrix_path = "./FEAST-master/Data_files/otu_example.txt")

It first come with the error: Error in FEAST(C = otus, metadata = metadata, EM_iterations = 1000, COVERAGE = NULL, : The metadata file must contain an 'id' column matching the source environments for each sink sample.

after that, i manually added the id in your file metadata_example.txt,and it comes with the mentioned error: Error in rowSums(C[c(train.ix, test.ix), ]) : 'x' must be an array and must have at least two dimensions

I have no idea how to continue this work. I don't know if it's a configuration problem with my R. Does anyone have insight on what could be causing this error?