Closed StijnVandenbulcke closed 2 years ago
On the latest bioconductor version the cptac vignette did not run anymore, see: http://bioconductor.org/checkResults/devel/bioc-LATEST/msqrob2/
Quitting from lines 144-145 (cptac.Rmd) Error: processing vignette 'cptac.Rmd' failed with diagnostics: 'pe' is/are absent from all rowData.
filterFeatures was looking for a column named pe in the rowdata as it is referenced after the %in% operator. I did not find a solution while using the filterFeatures, so i i changed it temporarily so that the vignette is able to run.
@cvanderaa - does this ring a bell? Could this be related to the new keep
argument?
The problem seems to be due to the way the filtering formula
was specified in the msqrob2 vignette:
pe <- filterFeatures(pe, ~ Proteins %in% smallestUniqueGroups(rowData(pe[["peptideLog"]])$Proteins))
This then gets passed on to QFeatures:::filterFeaturesWithFormula()
which checks whether all variables are present in the rowData
using
https://github.com/rformassspectrometry/QFeatures/blob/2cc148ae924bc2bf6da9f228bb0467f196875dd6/R/QFeatures-filter.R#L287
But, since
ff <- ~ Proteins %in% smallestUniqueGroups(rowData(pe[["peptideLog"]])$Proteins)
all.vars(ff)
#> [1] "Proteins" "pe"
we get the error, because there is no "pe"
variable in the rowData
.
Not sure why this problem didn't occur before and whether this should be addressed in the QFeatures package. If so, we could open a new issue in QFeatures.
Yes sorry this indeed rings a bell! The issue should be solved in one of my branches: https://github.com/rformassspectrometry/QFeatures/commit/0ba8d4bfb346ad64b3750ba6dd39d4672d3ac4b1
I will make a PR to QFeatures
as quick as possible to make this accessible to msqrob2
.
A fix has just been pushed to Bioc devel. Is also available from the github repo.
Could you provide some details about this error? I am not aware of any issues with
filterFeatures()
.