Skip to content

Prevalence at higher taxonomical level than species #111

@AgnesBaud

Description

@AgnesBaud

Describe the bug

At species level, we get:

Image

But at genus level, we get:

Image

Expected behavior

We should have Staphylococcus, Streptococcus etc. at 100%.

Image

Explanation

This is because in the code we do the mean of the prevalence of the species of the genus (prev_ser_taxa = self.prevalence_series.groupby(taxa_level).mean()) instead of doing the prevalence on the dataframe grouped by genus.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions