-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read SCP sensitive to the order the quantCol rows are provided in the sample annotation file #77
Comments
It looks like with example 1, the quantCols accessible with assay() are misassigned |
Hi @edemmott, Thanks for reporting the bug! I don't know if something has already been discussed by mail with Laurent. Are you using the latest stable version of If so, I would like to solve this bug as quickly as possible (actually in |
Will drop you/laurent an email with a link to the data/some of our .rmd and the documents. Yes using 1.16. SessionInfo below: R version 4.4.1 (2024-06-14) Matrix products: default locale: time zone: Europe/London attached base packages: other attached packages: |
Email sent to you both with examples and dataset. |
I'm making progress, and I confirm that what you are seeing is a bug. Here is a minimal reproducible example: library(scp)
ad <- matrix(1:75, ncol = 5, dimnames = list(NULL, rev(paste0("quantCol", 1:5))))
ad <- as.data.frame(ad)
ad$runCol <- rep(paste0("run", 1:3), each = 5)
cd <- data.frame(quantCols = rep(paste0("quantCol", 1:5), 3),
runCol = rep(paste0("run", 1:3), each = 5))
scp <- readSCP(assayData = ad,
colData = cd,
runCol = "runCol") ad[ad$runCol == ad$runCol[[1]], ]
assay(scp, 1)
The second table has wrong column names and should match the first table. This is indeed a I'll try to work on it asap. |
We are making progress, a preliminary fix is available here: https://github.com/cvanderaa/QFeatures. We still need some time to integrate this in |
I've sent Laurent an email with some more details but in brief, readSCP is sensitive to row order in the sample annotation file. Two files with identical data, but with the rows reordered based on the quantCol give different results:
Example 1, ordered as below gives poor results.
Reporter.intensity.1
Reporter.intensity.10
Reporter.intensity.11
Reporter.intensity.12
Reporter.intensity.13
Reporter.intensity.14
Reporter.intensity.15
Reporter.intensity.16
Reporter.intensity.17
Reporter.intensity.18
Reporter.intensity.2
Reporter.intensity.3
Reporter.intensity.4
Reporter.intensity.5
Reporter.intensity.6
Reporter.intensity.7
Reporter.intensity.8
Reporter.intensity.9
Example 2, ordered below, gives good results.
Reporter.intensity.1
Reporter.intensity.2
Reporter.intensity.3
Reporter.intensity.4
Reporter.intensity.5
Reporter.intensity.6
Reporter.intensity.7
Reporter.intensity.8
Reporter.intensity.9
Reporter.intensity.10
Reporter.intensity.11
Reporter.intensity.12
Reporter.intensity.13
Reporter.intensity.14
Reporter.intensity.15
Reporter.intensity.16
Reporter.intensity.17
Reporter.intensity.18
The text was updated successfully, but these errors were encountered: