mia
mia copied to clipboard
perSampleDominantFeatures works only with taxonomyRanks
The perSampleDominantFeatures and addPerSampleDominantFeatures
This works:
library(mia)
data(GlobalPatterns, package="mia")
tse <- GlobalPatterns
rowData(tse)$group <- as.character(sample.int(5, nrow(tse), replace = TRUE))
perSampleDominantFeatures(tse, rank="Class")
This gives error:
perSampleDominantFeatures(tse, rank="group")
Error: 'rank' must be a value from 'taxonomyRanks()'
We recently implemented the mergeFeatures
functions so that they also allow other fields than ranks. Could we enable it here as well?