A user pointed out an issue where the .checkTechReplicate function returns FALSE unexpectedly despite there being technical replicates in an experiment. Looking into it, .checkTechReplicate returns true if all SUBJECT+GROUP combinations have > 1 run, but it should return true if any SUBJECT+GROUP combinations have > 1 run. Otherwise, we end up fitting the wrong model here, e.g. fitting a linear model instead of a linear mixed effects model where the subject is the random effect.
Changes
Modify .checkTechReplicate to return true if any SUBJECT+GROUP combinations have > 1 run.
Motivation and Context
A user pointed out an issue where the .checkTechReplicate function returns FALSE unexpectedly despite there being technical replicates in an experiment. Looking into it, .checkTechReplicate returns true if
all
SUBJECT+GROUP combinations have > 1 run, but it should return true ifany
SUBJECT+GROUP combinations have > 1 run. Otherwise, we end up fitting the wrong model here, e.g. fitting a linear model instead of a linear mixed effects model where the subject is the random effect.Changes
any
SUBJECT+GROUP combinations have > 1 run.Testing
Checklist Before Requesting a Review