-
Notifications
You must be signed in to change notification settings - Fork 21
cbind: unique/duplicated colnamesare left asis/made unique; read10xVisium: keep barcodes as colData; spatialCoords/<-: withDimnames argument
#128
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
base: devel
Are you sure you want to change the base?
Conversation
|
So, can someone accept this if we're okay with the GA (& changes, ofc)? |
cbind: unique/duplicated colnamesare left asis/made unique; read10xVisium: keep barcodes as colDatacbind: unique/duplicated colnamesare left asis/made unique; read10xVisium: keep barcodes as colData; spatialCoords/<-: withDimnames argument
|
the GHA fail during the tests: do you know why? |
|
|
||
| test_that("spatialCoords<-,matrix", { | ||
| # no 'rownames(value)' passes | ||
| rownames(xyz) <- NULL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are no xyz in the read10xVisium example, I suppose the GHA error comes from here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Damn it, I had reversed the order of some lines... should be fixed now.
| #' @importFrom SingleCellExperiment int_colData<- | ||
| #' @export | ||
| setReplaceMethod("spatialCoords", | ||
| c("SpatialExperiment", "matrix"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is a warning that I suppose is coming from the "matrix" instead of a "value"
Warning: ‘spatialCoords<-’
‘\S4method{spatialCoords<-}{SpatialExperiment,NULL}’
‘\S4method{spatialCoords<-}{SpatialExperiment,matrix}’
The argument of a replacement function which corresponds to the right
hand side must be named ‘value’.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I saw. But I don’t understand because it’s good locally. I’m on it…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed I don't get why, but have you tried something like: c("SpatialExperiment", "value") ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's because the generic is defined as setGeneric("spatialCoords<-", function(x, value, withDimnames=TRUE) standardGeneric("spatialCoords<-"))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…the signature has to be classes, so “NULL” and “matrix” (not “value”) is correct. It’s saying the generic and methods don’t match. But I don’t see why not as they both have “value” in the function definition in the same order…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I saw that, I'm looking over the internet, but still I'm not able to understand the motivation for this warning.
Addressing #100 ...
cbindassures unique/duplicatedcolnamesare left asis/made uniquen_...wherencorresponds to the number of the object being combinedcolDataby
read10xVisium(previously used as row names and dropped)... and #103
withDimnamestospatialCoordsgetter & settercolnames(x)andrownames(spatialCoords(x))throw an error,unless
withDimnames=FALSEor the latter areNULL