UCLouvain-CBIO / scp

Single cell proteomics data processing
https://uclouvain-cbio.github.io/scp/index.html
19 stars 2 forks source link

`readSCP` breaks when channel annotation is a factor #22

Closed cvanderaa closed 3 years ago

cvanderaa commented 3 years ago

As pointed out by Harrison, readSCP breaks when channel annotation is a factor:

data("mqScpData")
data("sampleAnnotation")
sampleAnnotation$Channel <- as.factor(sampleAnnotation$Channel)
readSCP(featureData = mqScpData,
        colData = sampleAnnotation,
        batchCol = "Raw.file",
        channelCol = "Channel")
Loading data as a 'SingleCellExperiment' object
Error in `[.data.frame`(xx, , -ecol, drop = FALSE) : 
  undefined columns selected
In addition: Warning message:
In Ops.factor(ecol) : ‘-’ not meaningful for factors
cvanderaa commented 3 years ago

This is being tackled in QFeatures (see PR https://github.com/rformassspectrometry/QFeatures/pull/132)