Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,17 @@ jobs:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
if: matrix.config.r == 'release'
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/setup-r-dependencies@v2
if: matrix.config.r != 'release'
with:
extra-packages: any::rcmdcheck, cran/ggrepel@0.9.6
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: CyteTypeR
Title: CyteType for R
Version: 0.3.1
Version: 0.3.2
Description: CyteTypeR is the R version of CyteType python package.
Authors@R:
person("Nygen Analytics AB", , ,"contact@nygen.io", role = c("aut", "cre"))
Expand Down
4 changes: 2 additions & 2 deletions R/artifacts.R
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
on.exit(rhdf5::H5Fclose(fid), add = TRUE)

rhdf5::h5createGroup(fid, "vars")
rhdf5::h5writeAttribute(as.integer(n_obs), h5obj = out_file, name = "n_obs", h5loc = "vars")
rhdf5::h5writeAttribute(as.integer(n_vars), h5obj = out_file, name = "n_vars", h5loc = "vars")
rhdf5::h5writeAttribute(as.integer(n_obs), h5obj = out_file, name = "n_obs", h5loc = "vars", asScalar = TRUE)
rhdf5::h5writeAttribute(as.integer(n_vars), h5obj = out_file, name = "n_vars", h5loc = "vars", asScalar = TRUE)

# Create extensible datasets (equivalent to maxshape=(None,) in h5py)
max_nnz <- n_obs * n_vars # upper bound
Expand Down
8 changes: 8 additions & 0 deletions R/schema.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ LLMModelConfig <- function(provider,
mask_job_details <- if (is.null(nm)) rep(TRUE, length(query_list$input_data)) else !endsWith(nm, "jobDetails")
query_list$input_data <- query_list$input_data[mask_job_details]

# Ensure fields the server expects as JSON objects serialize to {} not []
dict_fields <- c("clusterMetadata", "clusterLabels", "infoTags", "expressionData")
for (field in dict_fields) {
val <- query_list$input_data[[field]]
if (is.list(val) && length(val) == 0 && is.null(names(val))) {
query_list$input_data[[field]] <- setNames(list(), character(0))
}
}

return(query_list)
}
Expand Down
Loading