EESI / themetagenomics

Other
23 stars 4 forks source link

OTU IDs problem in function picrust() #6

Open panbbq opened 5 years ago

panbbq commented 5 years ago
Hi, there is a small part of my otu_table, and the first column is otu's id, the first row is sample's name. ID E974 E1580 E1518 E1550
4479944 1 0 0 0
529531 0 1 0 0
130468 0 0 1 19
188753 0 0 0 0
3043952 0 0 0 0
181344 0 0 0 0
181349 0 0 0 0
181348 0 0 0 0

The following error was encountered while using the function picrust

Error in picrust_otu(file.path(reference_path, ref_fn, fsep = platform_sep()),  : 
  basic_string::substr: __pos (which is 18446744073709551615) > this->size() (which is 0)
In addition: Warning message:
In cnn(otu_table, rows_are_taxa = FALSE, drop = drop) :
  OTU IDs must be integer strings of the form GreenGenes 16.X. Returning unnormalized OTU table.

How I can solve it? Thanks

panbbq commented 5 years ago

I had solved this problems. When importing a table, the first column should be the row name!

row.names(otutable) <- otutable[,1]
otutable <- otutable[,-1]