localOutliers() and
localVariance() (#27). The existing workers argument automatically selects
socket workers on Windows and multicore workers on macOS/Linux; one worker
continues to use serial execution. No new arguments are needed.localOutliers(). Scores
now use the focal spot value and the unscaled median absolute deviation of
neighboring spots, matching the published method. Previous versions applied
the normal-consistency scaling twice and could associate a neighbor's score
with the focal spot.spatialEco dependency, which is no longer needed for local
z-score calculation.SeuratObject accessors.localOutliers(), spatial-coordinate extraction,
metadata replacement, subsetting, and flagVisiumOutliers() with real Seurat
objects.findArtifacts() is used with data lacking
mitochondrial signal, including Visium FFPE probe-panel data.localOutliers() to support custom coordinate systems for neighborhood detection, enabling outlier detection in PCA, UMAP, or any reduced-dimension space.getSpatialCoords(): Universal function to extract spatial coordinates from both SpatialExperiment and Seurat objectsgetMetadata(): Universal function to access metadata (colData/meta.data) from both object typessetMetadata(): Universal function to update metadata in both object typessubsetSpatialObject(): Universal subsetting function for both object typesvalidateMetadataColumns(): Validation function to ensure required columns existis_seurat() and is_spatial_experiment(): Object type detection functionslocalOutliers():
coords parameter allows custom coordinate matrices for neighborhood detectionlocalOutliers() to prevent circular logic and bias, resulting in more accurate outlier detection.inherits(spe, "SpatialExperiment") instead of checking class(spe) directly. This change ensures that derived classes (e.g., SpatialFeatureExperiment) are also supported, improving flexibility and ease of use.plotQC has been renamed to plotQCmetrics to better reflect its purpose. The new function plotQCmetrics should be used moving forward. This change improves clarity in the package’s API by specifying that this function is designed for plotting QC metrics.shape argument: Added a shape argument to findArtifacts, allowing users to specify the neighborhood shape as either "hexagonal" or "square" for local variance calculations. This enhancement provides flexibility for different spatial arrangements in spatial transcriptomics data.
Updated n_order parameter: Renamed the n_rings parameter to n_order in the findArtifacts function to better describe its purpose of specifying the N-order neighbors for local mitochondrial variance calculations.
Parallelization: Added a workers argument for parallel processing using BiocParallel in both localOutlier and localVariance functions. This allows for faster computation, particularly on larger datasets.
plotQC Function Deprecated: The plotQC function is now deprecated. While it remains available for backward compatibility, users are encouraged to transition to plotQCmetrics. Calling plotQC will display a warning, reminding users of the deprecation.This change is backward compatible; existing code using plotQC will still work but will show a warning. We recommend updating your code to use plotQCmetrics to avoid any issues in future versions where plotQC may be removed.