microbiome / mia

Microbiome analysis
https://microbiome.github.io/mia/
Artistic License 2.0
46 stars 25 forks source link

getPrevalence, NA values #486

Closed TuomasBorman closed 4 months ago

TuomasBorman commented 5 months ago

If there are NA values, they are interpreted as FALSE i.e., certain value do not exceed the detection threshold i.e. "this taxon cannot be found from this sample"

TuomasBorman commented 5 months ago

One option is to catch na.rm in .agg_for_prevalence function and create new parameter called drop.empty.rank --> don't feed it to agglomreateByRank function instead use drop.empty.rank

--> Use na.rm in rowSums in line 216

antagomir commented 5 months ago

Yes the drop.empty.rank might be more clear.

antagomir commented 5 months ago

TBH I am not sure how necessary it is to allow users decide whether they want to have to have na.rm TRUE of FALSE in the merging. But perhaps it is good to let user decide ultimately.

I would pay some attention for documentation, examples & unit tests to keep it clear for users.

TuomasBorman commented 5 months ago

Is it now good to go?