Skip to content

Releases: PixelgenTechnologies/pixelatorR

v0.15.0

18 Sep 13:23
25cf654

Choose a tag to compare

Added

  • new sequencing saturation and graph stability functions.

    • approximate_edge_saturation computes edge saturation for components in a PXL file
    • approximate_node_saturation computes node saturation for components in a PXL file
    • approximate_saturation_curve computes node/edge saturation for downsampled components in a PXL file
    • downsample_to_parquet downsamples the edgelist in a PXL file and exports these edgelists to parquet files
    • lcc_sizes computes the largest connected components for cell components in downsampled edgeslists (parquet files)
    • lcc_curve computes LCC for downsampled components in a PXL file using the duckpgq DuckDB extension
  • sequencing_saturation and SequenceSaturationCurve to compute sequencing saturation statistics from an edgelist.

  • Updated

  • approximate_edge_saturation and approximate_node_saturation now accepts a components argument for filtering.

  • Added an argument union to control whether tables of lazy tables should be joined or output as a list in .lazy_load_table and Edgelists.

  • AnnotateCells now returns columns named exactly as reference_groups

Fixed

  • Fixed a bug in .lazy_load_table that prevented lazy loading of tables.

v0.14.0

15 Jul 14:00

Choose a tag to compare

Added

  • Supervised patch detection implemented in the patch_detection function. Added identify_markers_for_patch_analysis to identify markers for patch analysis.
  • render_rotating_layout function to create videos of rotating cells from a tibble containing layout coordinates. The function supports multiple video formats but uses GIF as default.
  • subset method for CellGraph class
  • Option to add marker count proportions to the proximity score table in ProximityScores
  • pack_2bits and unpack_2bits to pack and unpack DNA sequences into 64-bit integers using 2 bits per base.
  • Experimental PredictDoublets function for detecting doublets in a Seurat object or count matrix.
  • SimulateDoublets to simulate doublets.
  • FindAnnoyNeighbors Computes nearest neighbors using the Annoy algorithm.
  • DensityScatterPlot now has an argument equal_axes to control whether the x and y axes should have a common range.
  • return_id argument to SimulateDoublets to output the IDs of cells used to simulate each doublet.

Fixes

  • Fixed bug in ColocalizationHeatmap where marker1_col and marker2_col only worked for "marker_1" and "marker_2".
  • Fixed bug in DensityScatterPlot where the % cells label would be calculated across all facets instead of per each facet.

v0.13.0

23 Apr 11:18
8d18205

Choose a tag to compare

pixelatorR 0.13.0

This release introduces a suite of powerful new features designed to streamline the loading, processing, analysis, and visualization of Proximity Network Assay (PNA) data. Central to this update is the introduction of the PixelDB R6 class, providing a robust interface for interacting with the newly supported PXL file format. We've included specialized functions for reading data directly from PXL files into R. Furthermore, two new assay classes have been developed specifically to represent PNA data effectively within the Seurat analysis framework. These core components are complemented by a wide range of new methods and enhancements across the analysis pipeline. See below for a detailed list of additions and modifications.

Added

  • PixelDB R6 class to access data from a PXL file (<pxl_file>) containing a duckdb database.
    • PixelDB$new create a new PixelDB object from a PXL file containing PNA data.
    • PixelDB$info get information about the tables stored in the PXL file.
    • PixelDB$query send an SQL query to the database.
    • PixelDB$check_connection check if the connection to the PXL file is still valid.
    • PixelDB$reconnect reconnect to the database if the connection is closed.
    • PixelDB$names get the names of the tables stored in the database.
    • PixelDB$fetch_table fetch an entire table as a data.frame.
    • PixelDB$fetch_table_subset fetch a subset of a table as a data.frame
    • PixelDB$counts fetch the antibody count matrix.
    • PixelDB$proximity fetch the proximity scores table.
    • PixelDB$cell_meta fetch the component/cell meta data.
    • PixelDB$protein_meta fetch the protein meta data.
    • PixelDB$run_meta fetch the Pixelator run meta data.
    • PixelDB$components_edgelist fetch the edgelist(s) for selected components/cells.
    • PixelDB$components_layout fetch the layout(s) for selected components/cells.
    • PixelDB$components_marker_counts fetch the node counts for selected component/cell graphs.
    • PixelDB$export_parquet export a table in the database to a parquet file.
    • PixelDB$close close the connection.
  • ReadPNA_counts function to load the count matrix from a PXL file containing PNA data.
  • ReadPNA_proximity function to load the proximity scores table from a PXL file containing PNA data. Also supports lazy loading.
  • ReadPNA_edgelist function to load the edgelist from a PXL file containing PNA data. Also supports lazy loading.
  • ReadPNA_layouts function to load component layouts from a PXL file containing PNA data with pre-computed layouts.
  • ReadPNA_Seurat function to construct a Seurat object from a PXL file containing PNA data.
  • ReadPNA_metadata function to load sample meta data from a PXL file containing PNA data.
  • PNAAssay class to store PNA data in a Seurat object (v3).
  • CreatePNAAssay to create a PNAAssay object.
  • PNAAssay5 class to store PNA data in a Seurat object (v5).
  • CreatePNAAssay5 to create a PNAAssay5 object.
  • Edgelists methods for PNAAssay, PNAAssay5 and Seurat to load edgelists. Supports lazy loading for manipulation with dbplyr.
  • ProximityScores methods for PNAAssay, PNAAssay5 and Seurat to fetch proximity scores. Supports lazy loading for manipulation with dbplyr.
  • ProximityScores<- methods for PNAAssay, PNAAssay5 and Seurat to set proximity scores.
  • ProximityScoresToAssay methods for data.frame, tbl_lazy, PNAAssay, PNAAssay5 and Seurat to convert the long formatted proximity score table into a wide format.
  • LoadCellGraphs methods for for PNAAssay and PNAAssay5.
  • ComputeLayout methods for for PNAAssay and PNAAssay5.
  • RemoveCellGraphs methods for for PNAAssay and PNAAssay5.
  • CellGraphs methods for for PNAAssay and PNAAssay5.
  • RestorePaths methods for for PNAAssay and PNAAssay5.
  • FSMap/FSMap<- methods for PNAAssay and PNAAssay5.
  • show method for PNAAssay and PNAAssay5.
  • subset method for PNAAssay and PNAAssay5.
  • merge method for PNAAssay and PNAAssay5.
  • RenameCells methods for PNAAssay and PNAAssay5.
  • JoinLayers method for PNAAssay5.
  • as.PNAAssay method to convert an Assay object to a PNAAssay object.
  • as.PNAAssay5 method to convert an Assay5 object to a PNAAssay5 object.
  • DifferentialProximityAnalysis function to perform differential testing on PNA proximity scores. The function has a similar API as RunDAA, RunDPA and RunDCA but uses a much faster implementation of the Wilcoxon rank sum test (Mann-Whitney U test) with the data.table R package.
  • A minimal PXL file woth PNA data.
  • minimal_mpx_pxl_file function to get the path to the minimal MPX PXL file.
  • minimal_mpx_pna_file function to get the path to the minimal PNA PXL file.
  • Utility function for asserting valid colors; assert_valid_color.
  • Utility function for asserting valid PNAAssay/PNAAssay5; assert_pna_assay.
  • Utility function for asserting valid PNAAssay/PNAAssay5/CellGraphAssay/CellGraphAssay5; assert_pna_assay.

Updates

  • MoleculeRankPlot now supports Seurat objects with PNA data with n_umi representing the total number of detected antibodies.
  • TauPlot now supports Seurat objects with PNA data using n_umi on the y-axis.
  • Plot2DGraph now supports Seurat objects with PNA data.
  • Plot2DGraphM now supports Seurat objects with PNA data.
  • Plot3DGraph now supports Seurat objects with PNA data.
  • DensityScatterPlot can now draw rectangle or quadrant gates by selecting the appropriate gate_type argument. Additionally, gate annotation aesthetics can now be customized using annotation_params.

Changes

  • ComputeLayout now only supports the "pmds" and "wpmds" graph drawing methods. The "kk", "fr" and "drl" methods have been removed but can be run if needed using the custom_layout_function parameter. The default layout method is now "wpmds" with dim = 3.
  • NormalizeMPX is superseded by Normalize. The NormalizeMPX function will be removed in a future release.

Removed

  • LoadCellGraphs.data.frame method

Fixes

  • Fixed bug in DensityScatterPlot where the gate_type default would lead to an error.
  • Fixed bug in DensityScatterPlot where the x- and y-axis titles were hardcoded as "Marker1" and "Marker2"
  • Fixed bug in subset.MPXAssay and subset.PNAAssay where the fs_map table was not filtered correctly when all components from a sample are removed.

v0.12.0

16 Jan 09:42

Choose a tag to compare

Added

  • RunDAA : Differential abundance analysis function with a similar interface to RunDPA and RunDCA. RunDAA uses the FindMarkers function from Seurat to perform differential abundance analysis, but enables splitting of tests into multiple groups. By default, it reports the difference in means instead of avg_log2FC.

Updates

  • Updated type assertions and improved error messaging (inspired by the tidyverse style guide).
  • The ComputeLayout.Seurat method now supports parallelized computation of layouts.
  • Added option to fetch marker counts in PolarizationScores and ColocalizationScores methods. This is for example useful when filtering spatial metrics tables for markers with low counts.
  • Silenced warnings in RunDPA/RunDCA when running tests in parallel to avoid halting the R session.
  • Improved clean up of temporary files created by ReadMPX_counts and ReadMPX_item.
  • RunDPA and RunDCA now accepts any numeric vector from the spatial metric table as input for differential testing. The metric is specified by polarity_metric (RunDPA) or coloc_metric (RunDCA).
  • Updated subset and merge methods for MPXAssay to have less stringent validation of the spatial metric tables (polarity and colocalization scores).
  • Updated ReadMPX_Seurat to have less stringent validation of the spatial metric tables (polarity and colocalization scores).
  • ColocalizationHeatmap now allows legend titles and the legend range to be manually set

Fixes

  • pixelatorR read functions now uses utils::unzip instead of zip::unzip to support PXL files larger than 2GB
  • LoadCellGraphs now throws an error if duplicated cell ids (cells) are provided
  • PXL files missing spatial scores can now be loaded with ReadMPX_Seurat without throwing an error. This is useful when the pixelator pipeline was run without computing spatial scores.

v0.11.0

18 Sep 12:32
5ac59d1

Choose a tag to compare

Updates

  • The R arrow version is no longer pinned to v14. This allows the package to be installed with the latest version of arrow.
  • Updated LoadCellGraphs methods to be compatible with R arrow v17
  • RunDPA and RunDCA now handles multiple targets for differential tests. Previously, only 1 target could be compared against reference. Now, if multiple targets are provided, the function will perform multiple differential tests, one for each target against reference. This is typically useful when comparing multiple conditions against a single control group.
  • ColocalizationHeatmap has been made more flexible, such that any column names in the input data can be used as long as the data has a data format suitable for a heat map.

Fixes

  • In ColocalizationScoresToAssay: Changed marker pair separator from "-" to "/", to avoid string operation issues due to "-" occurring in marker names.
  • In DensityScatterPlot: Fixed a bug where the reported percentage of cells in a gate was incorrect when using multiple gates.
  • NormalizeMPX now also handles Assay and Assay5 objects.

Added

  • RestorePaths : updates the PXL file paths in a CellGraphAssay, a CellGraphAssay5 or a Seurat object created with pixelatorR. This function is useful when PXL files have been moved to a different location or when sharing Seurat objects with other users which would cause LoadCellGraphs to fail.
  • ReadMPX_metadata : loads metadata from a PXL file. A print method for the output returned by ReadMPX_metadata is also included to provide a summary of the metadata.

v0.10.2

25 Jul 07:19
215120a

Choose a tag to compare

Fixes

  • fixed bug in TauPlot where group_by was not properly evaluated

v0.10.1

23 Jul 12:20
bea3a98

Choose a tag to compare

Fix

  • updated TauPlot to handle new metric names introduced in pixelator v0.18. For data produced with pixelator v0.18, TauPlot now uses mean_molecules_per_a_pixel instead of umi_per_upia.
  • Updated DensityScatterPlot to not use deprecated dplyr functionality.
  • Changed ComputeLayout to add a suffix ('_3d') to the layout name when dim = 3. This makes the naming of layouts consistent with the naming used in pixelator (Python).

v0.10.0

10 Jul 14:33

Choose a tag to compare

Added

  • layout_with_weighted_pmds : Compute a graph layout using weighted PMDS.
  • option to use layout_with_weighted_pmds in ComputeLayout by setting layout_method = "wpmds"

Fix

  • Updated documentation for local_G. The equations for the Z-scores have been corrected according to the original publication by Ord and Getis.

Added

  • AbundanceColocalizationPlot : Plot a scatter plot of the abundance of two sets of markers, colored by the
    colocalization score the marker pairs have in each component.

v0.9.0

03 Jul 14:50
f83e4da

Choose a tag to compare

Added

  • NormalizeMPX : Normalize MPX data using either dsb or CLR transformations.

Updates

  • PseudoDensityPlot has been renamed to DensityScatterPlot to better reflect the function's purpose and
    documentation has been improved.

v0.8.1

01 Jul 09:38
01045d8

Choose a tag to compare

Fixes

  • Fixed bug where load_polarity_scores controls whether colocalization scores are loaded instead of load_colocalization_scores in ReadMPX_Seurat.