diff --git a/DESCRIPTION b/DESCRIPTION index f3679db..dd463cb 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: SpatialFeatures Title: Entropy-based subcellular and supercellular features for molecule-resolved spatial omics datasets -Version: 0.0.5 +Version: 0.99.0 Authors@R: c( person("Shila", "Ghazanfar", email = "shazanfar@gmail.com", role = c("aut", "cre", "ctb"),comment = c(ORCID = "0000-0001-7861-6997")), diff --git a/NEWS.md b/NEWS.md index b433121..c04487a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,2 +1,2 @@ -# SpatialFeatures v0.0.5 (2024-09-19) +# SpatialFeatures v0.99.0 (2024-09-19) + Submitted to Bioconductor. diff --git a/R/EntropyMatrix_utils.R b/R/EntropyMatrix_utils.R index f5bbaba..7d8635b 100644 --- a/R/EntropyMatrix_utils.R +++ b/R/EntropyMatrix_utils.R @@ -4,7 +4,7 @@ #' #' @importFrom terra t diff #' @return A matrix of annuli polygon counts. -annuli_counts = function(mat) { +annuli_counts <- function(mat) { fac <- sub("_[0-9]+$", "", colnames(mat)) tmat <- terra::t(mat) tmat_split <- split.data.frame(tmat, fac) @@ -90,7 +90,7 @@ calculate_entropy <- function(p) { #' #' @param counts a vector of integers #' @return the proportion -countsprop = function(counts) { +countsprop <- function(counts) { total <- sum(counts) if (total == 0) { return(rep(0, length(counts))) diff --git a/R/EntropySingleCellExperiment_utils.R b/R/EntropySingleCellExperiment_utils.R index 706d3ce..c968522 100644 --- a/R/EntropySingleCellExperiment_utils.R +++ b/R/EntropySingleCellExperiment_utils.R @@ -5,7 +5,7 @@ #' features (default FALSE) #' @return if concatenateFeatures == TRUE, A single data frame, #' otherwise a list containing data frames -make_assay_data = function(df_list, concatenateFeatures = FALSE) { +make_assay_data <- function(df_list, concatenateFeatures = FALSE) { assay_data_list <- lapply(names(df_list), function(assayName) { df <- df_list[[assayName]] diff --git a/R/loadBoundaries.R b/R/loadBoundaries.R index a6f861a..535c3ef 100644 --- a/R/loadBoundaries.R +++ b/R/loadBoundaries.R @@ -26,12 +26,12 @@ #' me loadBoundaries <- function(me,...) { - featureData = GenerateFeatureData(me, ...) + featureData <- GenerateFeatureData(me, ...) featureData <- lapply(featureData, function(x) {x$segment_id <- x$area_id; return(x)}) - bds_list = lapply(featureData, MoleculeExperiment::dataframeToMEList, + bds_list <- lapply(featureData, MoleculeExperiment::dataframeToMEList, dfType = "boundaries", assayName = "cell", sampleCol = "sample_id", factorCol = "area_id", xCol = "x_section", yCol = "y_section",