retrieve_metaspace_dataCollects data from
http://metaspace2020.org by project id and returns it in SpatialExperiment
object
retrieve_metaspace_data(
project_id = "2024-02-15_20h37m13s",
fdr = 0.2,
assay_name = "lipids",
sample_id = "sample",
rotate = FALSE,
drop_zeroes = TRUE,
y_offset = 0,
x_offset = 0
)Identifier for project
FDR value above which to collect data
Name of assay to include in object
Name of sample
Set to TRUE if x and y coordinates need to be swapped
Set to TRUE to drop zeroes and set the values to NAs. If False the zeroes will be included in the image data.
Number of pixels to adjust y based on image
Number of pixels to adjust x based on image
a SpatialExperiment object with the metaspace data and
coordinates.
This relies on underlying python code and environment to run, including the metaspace2020 package, the numpy package, and the pandas package.
# \donttest{
rdat <- retrieve_metaspace_data(project_id = "2024-02-15_20h37m13s",
fdr = 0.2,
assay_name = 'lipids',
sample_id = 'sample')
#> Downloading ion data from metaspace...
#> Warning: index contains duplicated values: row names not set
head(rowMeans(assay(rdat,'lipids')))
#> C46H78NO10P-H- C47H83O13P-H- C20H32O2-H- C22H32O2-H- C16H30O2-H-
#> NA NA NA NA NA
#> C42H80NO10P-H-
#> NA
# }