Closed marcelladane closed 2 months ago
I am not sure where you need rowLinks here.
Can you show the output of tse
(it prints summary info for your TreeSE data object).
You could also show the command that gives the error, then it is easier to comment.
ok, here is the output of tse
class: TreeSummarizedExperiment
dim: 151 27
metadata(0):
assays(3): counts relabundance clr
rownames(151): 1726470 1726471 ... 17264756 17264757
rowData names(6): Kingdom Phylum ... Family Genus
colnames(27): A110 A12 ... A35 A38
colData names(4): patient_status cohort patient_status_vs_cohort sample_name
reducedDimNames(0):
mainExpName: NULL
altExpNames(0):
rowLinks: a LinkDataFrame (151 rows)
rowTree: 1 phylo tree(s) (151 leaves)
colLinks: NULL
colTree: NULL
Then I ran transformation
tse <- transformCounts(tse, method = "relabundance")
After that, when moving to alpha diversity I ran:
{r alpha diversity}
index <- c("shannon","gini_simpson","inverse_simpson", "coverage", "fisher", "faith", "log_modulo_skewness")
tse <- estimateDiversity(tse, index = index)
And got the error:
Error in method(object) :
The object should include at least 4 columns:
nodeLab, nodeLab_alias, nodeNum, isLeaf
The nodeLab_alias column should be character
The nodeNum column should be numeric
The isLeaf column should be logical
Ok. Can you try without Faith index, and then only with Faith index? I am wondering if Faith is causing the error.
Do you have a rowTree?
You were correct. It was the Faith index. Can you please explain why it caused this error? I am curious now. =)
I do not know yet. Might depend on the rowTree and it includes some error. The data has to be cleaned up first.
Could you post the output of rowTree(tse)
and also the command that you used to add the tree in the TreeSE object?
Faith index is the only alpha diversity index (from your list) that utilizes the tree information.
Gonna do after the holidays. =) Happy holidays.
Make sure that this works - if the object does not have tree, then Faith diversity should not be calculated. A warning can be thrown instead.
Hello, I previously ran mia (version 1.2.7) and had no issue when running the function estimateDiversity from a tse construct using biom file. Note that I followed the tutorial https://microbiome.github.io/OMA/containers.html#s-workflow (session 2.3.2.1), and I used my own files and also the exact files from the tutorial, to be sure wasn't any flaw on my own data.
Now I updated to the latest version of mia (1.7.4) and when I try to run the same function, I got the following error:
but when I check the links , they are ok:
Can you please help me? Thank you. Note, my R version is "R version 4.1.2 (2021-11-01)"