All the metrics were fine, except for pielou evenness, that I discovered while plotting graphics in R multiple samples that were not filtered by -p-sampling-depth had simply empty values.
I tried to generate it again, but the problem is it has different rows than the others metrics and I need all the metrics to have the same number of samples to generate an R graphic. Why only pielou is retrieving empty values on samples that weren't filtered?
Hello @Liviacmg, can you please DM me the inputs you are using so I can try to replicate this? This looks like an unfortunate case of something failing silently. Something probably went wrong but it wasn't caught and didn't generate an error and instead pretended that it worked.
I would guess they were being dropped due to this param to pielou_e (which you set in your standalone call to it there):
--p-drop-undefined-samples / --p-no-drop-undefined-samples
Samples with fewer than two observed features
produce undefined (NaN) values. If true, these
samples are dropped from the output vector.
but that param isn't being set in core-metrics-phylogenetic.
Hello @Liviacmg. Apologies again for the delay. Thank you for sending me your inputs. It would appear as though, at least with a sampling depth of 10, you are ending up with some samples that only have observations of one feature after rarefaction (since this seems to happen consistently it is possible that these samples do actually only have observations of one feature).
I looked into how pielou_evenness is implemented, and it would appear as though this statistic is undefined for samples that only have observations of one feature. The calculations in the background end up with -0/0 (yes -0, computers do math in silly ways) which results in NaN or "not a number." The values of those empty cells in the output are NaN.
As near as I can tell, this is correct and that statistic is indeed undefined under such circumstances. In order to avoid this, you can try running qiime feature-table filter-samples with --p-min-features 2. That should remove all samples with only one observed feature; however, post rarefaction especially with a depth of 10 there is still a chance that samples dominated by a single feature will end up with only one feature.
You may want to look at upping your sampling depth, but your data does seem fairly shallow, so you may need to use a low sampling depth.
This is definitely whats happening. Observed features only counts unique features so even if those samples have more then 10 occurrences of that features. If its 10 occurrences of the same feature, observed features would consider that one observation.
I agree with @Oddant1 that your data looks pretty shallow, is this something you were expecting?
@Liviacmg,
Have you run alpha-rarefaction on this?
I am pretty sure this will tell you that your alpha diversity metrics never stabilize at that low of a sequencing depth.