TCP-Lab / SeqLoader

Constructors and methods for `xSeries` and `xModel` S3 classes
0 stars 0 forks source link

Make model-level sample size more robust in the case of `maic = inclusive` #3

Open Feat-FeAR opened 3 months ago

Feat-FeAR commented 3 months ago

At the Model level (i.e., in geneStats.xModel) we have to consider the chance that the genomes considered in the different Series (studies) may not have the same size or exactly the same elements (e.g., because of different releases of the assembly), and for this there exists the Meta-analysis Inclusion Criterium (maic) option. When using maic = inclusive, it may happen that some genes measured only in some studies have an effective N less than length(model). This may affect:

  1. the calculation of SEM in MEAN: this can be solved, e.g., by introducing a new column in large_stats for the actual gene-wise sample size.
  2. the entire NWMEAN calculation, which currently does not handle NAs. Even if NAs were removed, weights would need to be corrected gene-wise to get the correct sum(N) denominator.