zellerlab / siamcat

R package for Statistical Inference of Associations between Microbial Communities And host phenoType
https://siamcat.embl.de/
51 stars 16 forks source link

Bug in filter_features.r #14

Closed Thalla closed 4 years ago

Thalla commented 4 years ago

Line 201 has a bug: f.idx <- f.idx[-which(f.idx %in% which(unm.idx))] If no element from f.idx is in unm.idx, an empty set is returned from the which statement. And f.idx[- empty set] returns an empty set. But you would want to get f.idx instead. This happens whenever unm.idx contains only elements that are lower than the cutoff.