File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -1300,7 +1300,8 @@ is_filer_columns_in_column_selection <- function(.data, ...) {
13001300check_if_assays_are_NOT_consistently_ordered <- function (se ) {
13011301
13021302 # If I have any assay at all
1303- assays(se ) | > length() | > gt(0 ) &&
1303+ do_I_have_assays =
1304+ assays(se ) | > length() | > gt(0 ) &&
13041305
13051306 # If I have more than one assay with colnames
13061307 Filter(
@@ -1310,9 +1311,24 @@ check_if_assays_are_NOT_consistently_ordered <- function(se) {
13101311 map(colnames )
13111312 ) | >
13121313 length() | >
1313- gt(0 ) &&
1314-
1315- # If I have lack of consistency
1314+
1315+ gt(0 )
1316+
1317+ # If I have lack of consistency
1318+ # Forcing assay names otherwise fails if assay is unnamed
1319+ if (
1320+ se | >
1321+ assays(withDimnames = FALSE ) | >
1322+ as.list() | >
1323+ names()
1324+ )
1325+ assays(se ) =
1326+ se | >
1327+ assays(withDimnames = FALSE ) | >
1328+ as.list() | >
1329+ set_names(se | > assays() | > as.list() | > length() | > seq_len())
1330+
1331+ lack_of_consistency =
13161332 se | >
13171333 assays(withDimnames = FALSE ) | >
13181334 as.list() | >
@@ -1321,6 +1337,8 @@ check_if_assays_are_NOT_consistently_ordered <- function(se) {
13211337 equals(1 ) | >
13221338 all() | >
13231339 not()
1340+
1341+ do_I_have_assays && lack_of_consistency
13241342}
13251343
13261344check_if_any_dimnames_duplicated <- function (se , dim = " cols" ) {
You can’t perform that action at this time.
0 commit comments