Open 2533245542 opened 6 years ago
Thanks for this. I will integrate this to the parser soon.
Actuall that last code does not work, I make some edits now
edit_phyobj = function(phyobj){ # phyobj must be taxa_are_rows = TRUE for microbiomeviz to work
if(!taxa_are_rows(phyobj)){
otu = otu_table(phyobj)
otu = t(otu)
return(
phyloseq(
otu_table(otu,taxa_are_rows = TRUE),
tax_table(phyobj),
sample_data(phyobj)
)
)
} else {
return(phyobj)
}
}
Do you have some test data that I can try?
I don't know why but phyloseq allows two kind of otu layout in a phyloseq object; one is taxa_are_row and the other one not. To access this information, one can use taxa_are_row(phyobj) to check.
What I found is microbiomeViz currently only supports the
taxa_are_row == TRUE
phyobj, but you can make adjustment if you have time. And here is one function I wrote to make that kind of adjustment.