-
Notifications
You must be signed in to change notification settings - Fork 0
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
Error in pgx.computePGX when working on small datasets #46
Comments
The error seems to come from the function ## filter gene sets on size
cat("Filtering gene sets on size...\n")
gmt.size <- Matrix::colSums(G != 0)
size.ok <- (gmt.size >= 15 & gmt.size <= 400)
G <- G[, which(size.ok)] Here we have two options:
Any suggestion @ivokwee @ncullen93? |
Yeah a try-catch method would be best. I'm not sure if this error occurs in the omicsplayground platform or if this issue is caught before this code gets run. This is a good example of why all data catching code should be in playbase and not in omicsplayground. Looping in @ivokwee on this. |
I would debug the error. Sometimes people have just 500-1000 genes. So it is a good edge case. |
Ok, taking on account that last comment, I came up with the following solution: # If dataset is too small that size.ok == 0, then select top 100
if (sum(size.ok) == 0) {
top_100gs <- head(sort(gmt.size,decreasing = TRUE), 100)
size.ok <- names(gmt.size) %in% names(top_100gs)
}
Injecting this code in compute_testGenesets after calculating |
Yes that's a good solution. But please test. |
I can confirm the edit works in the Playbase tests as well as in the omicsplayground |
Using a reduced version of the example dataset, the base pgx pipeline fails. See code below:
The error is:
This, therefore, means that x does not exist.
The text was updated successfully, but these errors were encountered: