cozygene / FEAST

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

Error in R #24

Open sbornbusch opened 3 years ago

sbornbusch commented 3 years ago

Hello,

I am receiving the following error when trying to run FEAST in R:

Error in if (abs(m_guesses[length(m_guesses)] - m_guesses[length(m_guesses) - : missing value where TRUE/FALSE needed

My two files upload fine. I have 88 "sink" samples and 10 "source" samples. I am using the data to test for contributions from certain genes (not OTUs) but I am using similar count tables. There are ~250 genes in the count table.

Any suggestions on what this error is indicating about my data?

Thank you.

KyleRowe1230 commented 9 months ago

I have the same problem! Do you have the solution?

nikolgr commented 8 months ago

Same here, any updates?

KyleRowe1230 commented 8 months ago

not yet

nikolgr commented 8 months ago

I managed to solve this. I found what was causing the error in my case. I hope it works for you, too.

If you are viewing/manipulating your OTU table data in Excel before saving as text file and importing in R, sometimes when moving around data (e.g., you may be merging replicates by estimating the mean of OTUs or you may be deleting some sample columns that you might not want to include in the specific analysis), I realized that the shifted/empty cells could be interpreted as missing data. At least in my case that was the issue. So I made sure I selected all the adjacent empty columns in Excel and deleted those cells (even though there was no data there) and saved again the file and it worked. Another way would be to select your data and copy paste straight into a notepad and save from there as text file. If it's not the OTU table, it could be the Metadata file. Make sure you check both of them and save again as text files before loading into R to use for running FEAST.

KyleRowe1230 commented 8 months ago

Thanks a lot! I'll try it later! :)