This is because the number of treatments is incorrectly assessed when calculating num.treatments using:
num.treatments = length(levels(xsA@xcmsSet@phenoData$class))
Instead I changed this too calculate number of treatments from the group info using the following.
num.treatments = ncol(xsA@xcmsSet@groups)-7
This works with XCMS3 generated objects and is backwards compatible as well.
Documenting bug that has now been patched for users not using patched version that may want too search for this:
In XCMS3 the 'class' slot of xset objects is not created in phenodata resulting in the following error:
This is because the number of treatments is incorrectly assessed when calculating
num.treatments
using:num.treatments = length(levels(xsA@xcmsSet@phenoData$class))
Instead I changed this too calculate number of treatments from the group info using the following.
num.treatments = ncol(xsA@xcmsSet@groups)-7
This works with XCMS3 generated objects and is backwards compatible as well.