-
Notifications
You must be signed in to change notification settings - Fork 26
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
Problem with intersectPSets #96
Comments
looks like the intersection on concentrations causes the error |
I am currently working on updating this method. Expect a fix shortly. Best, |
@bhaibeka I agree that it is a bug, in that it should fail more gracefully than this. The method fundamentally does not work on datasets with replicates, since we need 1-1 mapping of experiments across studies. The only way I can think of salvaging is to first "collapse replicates", and then allow intersection. What are your thoughts on this? |
I would collapse the replicate and add a clear warning to inform the users |
So with the introduction of the I can think of lots of situations where the dose is non even comparable. For example, if two PSets use different dose units. If the magnitude of those units differs (i.e., micromolar vs molar). Do we have standards in place around dose formatting? Do you think preserving the intersection on dose is important despite these limitations? Or is it fine to have that as a secondary operation done by the user on the From a design perspective, I think the problem with a lot of our methods is that they try to do everything. Programming best practices indicate a function should do one operation and users are responsible for composing them into a pipeline. This is even easier now in R 4.1 with the base R pipe |
So what I imagine would look like: |
Im not exactly sure I understand what this subsetLongTable function is doing in this case. I am 100% for making the collapsing of replicates within a PSet and the intersection of PSets into two (or more) different steps, because I think their is a lot of choices on how to collapse replicates that are possible |
In this case, If you mean the groupby, I'm selecting instances where the doses are equal for each drug combination. |
Or something like that. |
As for collapsing replicates. There is already a method like that for |
PharmacoGx version 2.4.0
CCLE vs GDSC1 (similar to Haibe-Kains Nature 2013)
ccle <- PharmacoGx::downloadPSet("CCLE_2015")
gdsc1 <- PharmacoGx::downloadPSet("GDSC_2020(v1-8.2)")
ccle.gdsc1 <- PharmacoGx::intersectPSet(pSets=list("CCLE"=ccle, "GDSC1"=gdsc1))
returns
Intersecting large PSets may take a long time ...
Error in which.min(abs(as.numeric(doses[[i]]) - min.dose)):max(which(abs(as.numeric(doses[[i]]) - :
argument of length 0
In addition: Warning messages:
1: In min(as.numeric(doses[[i]]), na.rm = TRUE) :
no non-missing arguments to min; returning Inf
2: In max(as.numeric(doses[[i]]), na.rm = TRUE) :
no non-missing arguments to max; returning -Inf
3: In min(abs(as.numeric(doses[[i]]) - max.dose), na.rm = TRUE) :
no non-missing arguments to min; returning Inf
4: In max(which(abs(as.numeric(doses[[i]]) - max.dose) == min(abs(as.numeric(doses[[i]]) - :
no non-missing arguments to max; returning -Inf
The text was updated successfully, but these errors were encountered: