
Read an MPX data item
ReadMPX_item.RdReadMPX_item reads any number of items from a PXL file. If multiple
items are specified, the output is a list of tbl_df objects.
Otherwise the output is a single tbl_df. ReadMPX_polarization,
ReadMPX_colocalization and ReadMPX_edgelist are wrappers for
ReadMPX_item to read specific items.
Usage
ReadMPX_item(
filename,
items = c("colocalization", "polarization", "edgelist"),
verbose = TRUE
)
ReadMPX_polarization(filename, verbose = TRUE)
ReadMPX_colocalization(filename, verbose = TRUE)
ReadMPX_edgelist(filename, verbose = TRUE)See also
Other data-loaders:
ReadMPX_Seurat(),
ReadPNA_proximity()
Examples
library(pixelatorR)
# Load example data
pxl_file <- minimal_mpx_pxl_file()
polarization <- ReadMPX_item(pxl_file, items = "polarization")
#> ℹ Loading item(s) from: /private/var/folders/gw/bdcqhnvs0m9gs_mq8n51jtbc0000gn/T/RtmpHJMV20/temp_libpath17d2257665c68/pixelatorR/extdata/five_cells/five_cells.pxl
#> → Loading polarization data
#> ✔ Returning a 'tbl_df' object
polarization
#> # A tibble: 380 × 6
#> morans_i morans_p_value morans_p_adjusted morans_z marker component
#> <dbl> <dbl> <dbl> <dbl> <chr> <chr>
#> 1 -0.00165 0.894 0.999 -0.134 ACTB RCVCMP0000217
#> 2 -0.00734 0.499 0.999 -0.676 B2M RCVCMP0000217
#> 3 -0.00850 0.409 0.999 -0.826 CD102 RCVCMP0000217
#> 4 0.00102 0.856 0.999 0.182 CD11a RCVCMP0000217
#> 5 -0.00381 0.656 0.999 -0.445 CD11b RCVCMP0000217
#> 6 -0.00493 0.631 0.999 -0.480 CD11c RCVCMP0000217
#> 7 -0.00497 0.596 0.999 -0.530 CD127 RCVCMP0000217
#> 8 -0.00150 0.910 0.999 -0.113 CD137 RCVCMP0000217
#> 9 -0.00224 0.850 0.999 -0.190 CD14 RCVCMP0000217
#> 10 -0.00246 0.837 0.999 -0.205 CD150 RCVCMP0000217
#> # ℹ 370 more rows
# Alternative 2
polarization <- ReadMPX_polarization(pxl_file)
#> ℹ Loading item(s) from: /private/var/folders/gw/bdcqhnvs0m9gs_mq8n51jtbc0000gn/T/RtmpHJMV20/temp_libpath17d2257665c68/pixelatorR/extdata/five_cells/five_cells.pxl
#> → Loading polarization data
#> ✔ Returning a 'tbl_df' object