bartongroup/Proteus

Issues with phantom condition levels

MarekGierlinski opened this issue · 1 comments

When metadata is filtered in a way that it removes the entire condition, but condition is a factor, e.g.

meta.clean <- meta[which(meta$sample != "BLANK"),]

where there is only one replicate in condition "BLANK" - it creates an empty level in metadata$condition. This, in turn, leads to a crash in makeProteinTable - it iterates over levels of meta$condition and encounters a phantom condition with no data.

Before this iteration I need to make sure to drop empty levels. Or perhaps warn the user.

Also: check a similar problem doesn't appear somewhere else.