stefpeschel / NetCoMi

Network construction, analysis, and comparison for microbial compositional data
GNU General Public License v3.0
146 stars 26 forks source link

Except for "highestVar" and "highestFreq", different filter methods can be combined. #57

Closed gc26762524 closed 2 years ago

gc26762524 commented 2 years ago

Hi NetCoMi developer,

I wonder how can we set combined filtTax filterations as described in the manual "Except for "highestVar" and "highestFreq", different filter methods can be combined." Thank you.

Best, Cheng

stefpeschel commented 2 years ago

Hi Cheng,

An example of how to combine the filter methods is given on the help page of netConstruct(). E.g., in using the code below, only taxa with at least 1000 reads in total that occur in at least ten samples are kept. Analogously, samples whose total number of reads is less than 1000 and with less than ten taxa with a non-zero read count are removed.

net <- netConstruct(
  data,
  filtTax = c("totalReads", "numbSamp"),
  filtTaxPar = list(totalReads = 1000, numbSamp = 10),
  filtSamp = c("totalReads", "numbTaxa"),
  filtSampPar = list(totalReads = 1000, numbTaxa = 10),
  ...
)

Best, Stefanie