Releases: PixelgenTechnologies/pixelatorR
v0.15.0
Added
-
new sequencing saturation and graph stability functions.
approximate_edge_saturationcomputes edge saturation for components in a PXL fileapproximate_node_saturationcomputes node saturation for components in a PXL fileapproximate_saturation_curvecomputes node/edge saturation for downsampled components in a PXL filedownsample_to_parquetdownsamples the edgelist in a PXL file and exports these edgelists to parquet fileslcc_sizescomputes the largest connected components for cell components in downsampled edgeslists (parquet files)lcc_curvecomputes LCC for downsampled components in a PXL file using theduckpgqDuckDB extension
-
sequencing_saturationandSequenceSaturationCurveto compute sequencing saturation statistics from an edgelist. -
Updated
-
approximate_edge_saturationandapproximate_node_saturationnow accepts acomponentsargument for filtering. -
Added an argument
unionto control whether tables of lazy tables should be joined or output as a list in.lazy_load_tableandEdgelists. -
AnnotateCellsnow returns columns named exactly asreference_groups
Fixed
- Fixed a bug in
.lazy_load_tablethat prevented lazy loading of tables.
v0.14.0
Added
- Supervised patch detection implemented in the
patch_detectionfunction. Addedidentify_markers_for_patch_analysisto identify markers for patch analysis. render_rotating_layoutfunction to create videos of rotating cells from a tibble containing layout coordinates. The function supports multiple video formats but uses GIF as default.subsetmethod forCellGraphclass- Option to add marker count proportions to the proximity score table in
ProximityScores pack_2bitsandunpack_2bitsto pack and unpack DNA sequences into 64-bit integers using 2 bits per base.- Experimental
PredictDoubletsfunction for detecting doublets in a Seurat object or count matrix. SimulateDoubletsto simulate doublets.FindAnnoyNeighborsComputes nearest neighbors using the Annoy algorithm.DensityScatterPlotnow has an argumentequal_axesto control whether the x and y axes should have a common range.return_idargument toSimulateDoubletsto output the IDs of cells used to simulate each doublet.
Fixes
- Fixed bug in
ColocalizationHeatmapwheremarker1_colandmarker2_colonly worked for "marker_1" and "marker_2". - Fixed bug in
DensityScatterPlotwhere the % cells label would be calculated across all facets instead of per each facet.
v0.13.0
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
PixelDBR6 class to access data from a PXL file (<pxl_file>) containing a duckdb database.PixelDB$newcreate a newPixelDBobject from a PXL file containing PNA data.PixelDB$infoget information about the tables stored in the PXL file.PixelDB$querysend an SQL query to the database.PixelDB$check_connectioncheck if the connection to the PXL file is still valid.PixelDB$reconnectreconnect to the database if the connection is closed.PixelDB$namesget the names of the tables stored in the database.PixelDB$fetch_tablefetch an entire table as adata.frame.PixelDB$fetch_table_subsetfetch a subset of a table as adata.framePixelDB$countsfetch the antibody count matrix.PixelDB$proximityfetch the proximity scores table.PixelDB$cell_metafetch the component/cell meta data.PixelDB$protein_metafetch the protein meta data.PixelDB$run_metafetch the Pixelator run meta data.PixelDB$components_edgelistfetch the edgelist(s) for selected components/cells.PixelDB$components_layoutfetch the layout(s) for selected components/cells.PixelDB$components_marker_countsfetch the node counts for selected component/cell graphs.PixelDB$export_parquetexport a table in the database to a parquet file.PixelDB$closeclose the connection.
ReadPNA_countsfunction to load the count matrix from a PXL file containing PNA data.ReadPNA_proximityfunction to load the proximity scores table from a PXL file containing PNA data. Also supports lazy loading.ReadPNA_edgelistfunction to load the edgelist from a PXL file containing PNA data. Also supports lazy loading.ReadPNA_layoutsfunction to load component layouts from a PXL file containing PNA data with pre-computed layouts.ReadPNA_Seuratfunction to construct aSeuratobject from a PXL file containing PNA data.ReadPNA_metadatafunction to load sample meta data from a PXL file containing PNA data.PNAAssayclass to store PNA data in aSeuratobject (v3).CreatePNAAssayto create aPNAAssayobject.PNAAssay5class to store PNA data in aSeuratobject (v5).CreatePNAAssay5to create aPNAAssay5object.Edgelistsmethods forPNAAssay,PNAAssay5andSeuratto load edgelists. Supports lazy loading for manipulation withdbplyr.ProximityScoresmethods forPNAAssay,PNAAssay5andSeuratto fetch proximity scores. Supports lazy loading for manipulation withdbplyr.ProximityScores<-methods forPNAAssay,PNAAssay5andSeuratto set proximity scores.ProximityScoresToAssaymethods fordata.frame,tbl_lazy,PNAAssay,PNAAssay5andSeuratto convert the long formatted proximity score table into a wide format.LoadCellGraphsmethods for forPNAAssayandPNAAssay5.ComputeLayoutmethods for forPNAAssayandPNAAssay5.RemoveCellGraphsmethods for forPNAAssayandPNAAssay5.CellGraphsmethods for forPNAAssayandPNAAssay5.RestorePathsmethods for forPNAAssayandPNAAssay5.FSMap/FSMap<-methods forPNAAssayandPNAAssay5.showmethod forPNAAssayandPNAAssay5.subsetmethod forPNAAssayandPNAAssay5.mergemethod forPNAAssayandPNAAssay5.RenameCellsmethods forPNAAssayandPNAAssay5.JoinLayersmethod forPNAAssay5.as.PNAAssaymethod to convert anAssayobject to aPNAAssayobject.as.PNAAssay5method to convert anAssay5object to aPNAAssay5object.DifferentialProximityAnalysisfunction to perform differential testing on PNA proximity scores. The function has a similar API asRunDAA,RunDPAandRunDCAbut uses a much faster implementation of the Wilcoxon rank sum test (Mann-Whitney U test) with thedata.tableR package.- A minimal PXL file woth PNA data.
minimal_mpx_pxl_filefunction to get the path to the minimal MPX PXL file.minimal_mpx_pna_filefunction 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
MoleculeRankPlotnow supports Seurat objects with PNA data withn_umirepresenting the total number of detected antibodies.TauPlotnow supports Seurat objects with PNA data usingn_umion the y-axis.Plot2DGraphnow supports Seurat objects with PNA data.Plot2DGraphMnow supports Seurat objects with PNA data.Plot3DGraphnow supports Seurat objects with PNA data.DensityScatterPlotcan now drawrectangleorquadrantgates by selecting the appropriategate_typeargument. Additionally, gate annotation aesthetics can now be customized usingannotation_params.
Changes
ComputeLayoutnow 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 thecustom_layout_functionparameter. The default layout method is now "wpmds" withdim = 3.NormalizeMPXis superseded byNormalize. TheNormalizeMPXfunction will be removed in a future release.
Removed
LoadCellGraphs.data.framemethod
Fixes
- Fixed bug in
DensityScatterPlotwhere thegate_typedefault would lead to an error. - Fixed bug in
DensityScatterPlotwhere the x- and y-axis titles were hardcoded as "Marker1" and "Marker2" - Fixed bug in
subset.MPXAssayandsubset.PNAAssaywhere thefs_maptable was not filtered correctly when all components from a sample are removed.
v0.12.0
Added
RunDAA: Differential abundance analysis function with a similar interface toRunDPAandRunDCA.RunDAAuses theFindMarkersfunction from Seurat to perform differential abundance analysis, but enables splitting of tests into multiple groups. By default, it reports the difference in means instead ofavg_log2FC.
Updates
- Updated type assertions and improved error messaging (inspired by the tidyverse style guide).
- The
ComputeLayout.Seuratmethod now supports parallelized computation of layouts. - Added option to fetch marker counts in
PolarizationScoresandColocalizationScoresmethods. This is for example useful when filtering spatial metrics tables for markers with low counts. - Silenced warnings in
RunDPA/RunDCAwhen running tests in parallel to avoid halting the R session. - Improved clean up of temporary files created by
ReadMPX_countsandReadMPX_item. RunDPAandRunDCAnow accepts any numeric vector from the spatial metric table as input for differential testing. The metric is specified bypolarity_metric(RunDPA) orcoloc_metric(RunDCA).- Updated
subsetandmergemethods forMPXAssayto have less stringent validation of the spatial metric tables (polarity and colocalization scores). - Updated
ReadMPX_Seuratto have less stringent validation of the spatial metric tables (polarity and colocalization scores). ColocalizationHeatmapnow allows legend titles and the legend range to be manually set
Fixes
- pixelatorR read functions now uses
utils::unzipinstead ofzip::unzipto support PXL files larger than 2GB LoadCellGraphsnow throws an error if duplicated cell ids (cells) are provided- PXL files missing spatial scores can now be loaded with
ReadMPX_Seuratwithout throwing an error. This is useful when the pixelator pipeline was run without computing spatial scores.
v0.11.0
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
LoadCellGraphsmethods to be compatible with R arrow v17 RunDPAandRunDCAnow handles multipletargetsfor differential tests. Previously, only 1targetcould be compared againstreference. Now, if multipletargetsare provided, the function will perform multiple differential tests, one for eachtargetagainstreference. This is typically useful when comparing multiple conditions against a single control group.ColocalizationHeatmaphas 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. NormalizeMPXnow also handles Assay and Assay5 objects.
Added
RestorePaths: updates the PXL file paths in aCellGraphAssay, aCellGraphAssay5or aSeuratobject 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 causeLoadCellGraphsto fail.ReadMPX_metadata: loads metadata from a PXL file. Aprintmethod for the output returned byReadMPX_metadatais also included to provide a summary of the metadata.
v0.10.2
v0.10.1
Fix
- updated
TauPlotto handle new metric names introduced in pixelator v0.18. For data produced with pixelator v0.18,TauPlotnow usesmean_molecules_per_a_pixelinstead ofumi_per_upia. - Updated
DensityScatterPlotto not use deprecateddplyrfunctionality. - Changed
ComputeLayoutto add a suffix ('_3d') to the layout name whendim = 3. This makes the naming of layouts consistent with the naming used in pixelator (Python).
v0.10.0
Added
layout_with_weighted_pmds: Compute a graph layout using weighted PMDS.- option to use
layout_with_weighted_pmdsinComputeLayoutby settinglayout_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
Added
NormalizeMPX: Normalize MPX data using either dsb or CLR transformations.
Updates
PseudoDensityPlothas been renamed toDensityScatterPlotto better reflect the function's purpose and
documentation has been improved.
v0.8.1
Fixes
- Fixed bug where
load_polarity_scorescontrols whether colocalization scores are loaded instead ofload_colocalization_scoresinReadMPX_Seurat.