You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very low priority but easy update: if there are any failed samples (0 reads) for taxa_barplot, the normalization functions produce NaNs from dividing by zero. This results in all taxa plotted as 'remainder'. I imagine that most would filter out samples with no reads before plotting. But, if taxa_barplot is used for diagnostics in a pipeline (as we do), it can be a difficult to determine why it is happening. I overwrite the qiime2R::make_proportion function to return the 0's for failed samples.
make_proportion2 <- function (features)
{
features <- apply(features, 2, function(x) {
if (sum(x) > 0) { x/sum(x) } else { x }
})
return(features)
}
assignInNamespace("make_proportion", value = make_proportion2, ns = "qiime2R")
The same could be done with make_percent
Thanks!
The text was updated successfully, but these errors were encountered:
Very low priority but easy update: if there are any failed samples (0 reads) for taxa_barplot, the normalization functions produce NaNs from dividing by zero. This results in all taxa plotted as 'remainder'. I imagine that most would filter out samples with no reads before plotting. But, if taxa_barplot is used for diagnostics in a pipeline (as we do), it can be a difficult to determine why it is happening. I overwrite the qiime2R::make_proportion function to return the 0's for failed samples.
The same could be done with make_percent
Thanks!
The text was updated successfully, but these errors were encountered: