Pre filtering function question

Hi everyone,

in your website tutorial:
the function which remove low count outs is like this:

low.count.removal = function(
data, # OTU count data frame of size n (sample) x p (OTU)
percent=0.01 # cutoff chosen
keep.otu = which(colSums(data)*100/(sum(colSums(data))) > percent)
data.filter = data[,keep.otu]
return(list(data.filter = data.filter, keep.otu = keep.otu))

my question is about the *100 in keep.otu line,
if percent = 0.01 is a cutoff on percentage and we want to remove the onus with lower than 1% total out sum, why there’s *100 in the equation?

thanks in advance


Hi @xyz,

Thanks for pointing this out. The *100 is in fact redundant and should be dropped. We’ll make sure it is corrected. Please do keep us informed if you run into similar problems/discrepancies.