Skip to contents

Load coordinates from 'scalefactors_json.json' files and merge them into a tibble.

Usage

LoadScaleFactors(scalefactorfiles)

Arguments

scalefactorfiles

A character vector with file paths. Paths should specify JSON files containing scale factors created with spaceranger.

Value

A tbl with scale factors

Examples

library(semla)

jsonfiles <-
  Sys.glob(paths = paste0(system.file("extdata", package = "semla"),
                          "/*/spatial/scalefactors_json.json"))
scalefactors <- LoadScaleFactors(jsonfiles)
scalefactors
#> # A tibble: 2 × 5
#>   spot_diameter_fullres tissue_hires_scalef fiducial_diameter_fullres
#>                   <dbl>               <dbl>                     <dbl>
#> 1                 143.                0.104                      215.
#> 2                  67.0               0.202                      108.
#> # ℹ 2 more variables: tissue_lowres_scalef <dbl>, sampleID <chr>