cozygene / FEAST

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

There were 50 or more warnings (use warnings() to see the first 50) run with FEAST #35

Open timeresistance1996 opened 2 years ago

timeresistance1996 commented 2 years ago

I use the example files metadata_example_multi.txt and otu_example_multi.txt to test, except "There were 50 or more warnings" everything is normal, one of the warning is : "1: In if (!is.element(class(x), c( "matrix", "data.frame", ... :the condition has length > 1 and only the first element will be used" I also got a result file, has anyone encountered this situation, this way Is the demo file available?

Asa12138 commented 2 years ago

I found the problem comes from the FEAST_rarefy function, is.element(class(x), c("matrix", "data.frame", "array")) will return 2 bool values but if() only needs one.

> class(x)
[1] "matrix" "array" 

I don't why class() will give two types, very strange. Maybe R4.2.0 the class() function changes. so I modify the FEAST_rarefy(), delete the line 5. I think that won't change my result Hope authors can fix this problem, Thanks @liashenhav @kant

liashenhav commented 2 years ago

The 'FEAST_rarefy' function now revised. Please re-run your analysis