get.immap.metadata {celltrackR} | R Documentation |
Get Track Metadata from ImmuneMap
Description
Get metadata from tracks obtained from https://immunemap.org and import into celltrackR.
Usage
get.immap.metadata(
input,
warn.exclude = TRUE,
exclude.names = c("points", "cellTypeObject", "date")
)
Arguments
input |
a parsed json file obtained with |
warn.exclude |
logical: if |
exclude.names |
if the json contains keys with these names, they are ignored when reading the metadata. |
Value
a dataframe with metadata. This function currently only handles metadata with a single
value for each track and ignores others (with a warning when warn.exclude=TRUE
).
column names in the dataframe correspond to the keys in the original json, and values to
the values for each track.
Examples
## Read tracks from immunemap online
input <- parse.immap.json( url = "https://api.immunemap.org/video/14/tracks" )
meta.df <- get.immap.metadata( input )
## Repeat but ignore also the 'color' column:
exclude <- c("points", "cellTypeObject","date", "color")
meta.df <- get.immap.metadata( input, exclude.names = exclude )
[Package celltrackR version 1.2.0 Index]