Regarding the latest developments in addAlpha() in #460 I realized that we could also need getAlpha() as an exported function.
For instance in altExp mechanism one might like to retrieve the alpha diversity estimates from altExp but often wants store them in the main tse object where most other sample data is stored.
It would then be more clear to do obtain the values with getAlpha(altExp(tse)) and then assign them manually to colData(tse), like:
I think the first option is the most clear for the user.
Essentially, this is a suggestion to reconsider that for most add* functions we would have the corresponding get* function. This is intuitive, and has clear uses at least with altExps.
Regarding the latest developments in
addAlpha()
in #460 I realized that we could also needgetAlpha()
as an exported function.For instance in altExp mechanism one might like to retrieve the alpha diversity estimates from altExp but often wants store them in the main tse object where most other sample data is stored.
It would then be more clear to do obtain the values with
getAlpha(altExp(tse))
and then assign them manually tocolData(tse)
, like:colData(tse) <- cbind(colData(tse), getAlpha(altExp(tse, "myaltexp"), index=c("shannon", "faith")))
The other option would be to do
addAlpha()
or something like..
I think the first option is the most clear for the user.
Essentially, this is a suggestion to reconsider that for most
add*
functions we would have the correspondingget*
function. This is intuitive, and has clear uses at least with altExps.