Skip to contents

Prepare data for BEAM analysis

Usage

prep_beam_data(
  main.data,
  mtx.data,
  mtx.anns = NULL,
  set.data = NULL,
  set.anns = NULL,
  n.boot = 1000,
  seed = NULL
)

Arguments

main.data

A data.frame

mtx.data

A list, each element is a matrix

mtx.anns

A list, each element is a data.frame

set.data

A data.frame with columns set.id, mtx.id, row.id

set.anns

A data frame with set.id and other columns

n.boot

Number of bootstraps

seed

Initial seed for random number generation

Value

A beam.data object, which is a list with main.data, mtx.data, mtx.anns, anns.mtch, set.data, set.anns, and boot.index

Examples

data(clinf)
data(omicdat)
data(omicann)
data(setdat)
test.beam.data <- prep_beam_data(main.data=clinf, mtx.data=omicdat,
                                 mtx.anns=omicann, set.data=setdat,
                                 set.anns=NULL, n.boot=10, seed=123)
#> Checking inputs: Tue Jul 30 13:51:24 2024
#>   Checking that each element of mtx.data is a matrix: Tue Jul 30 13:51:24 2024
#>   Checking that each element of mtx.anns is a data.frame: Tue Jul 30 13:51:24 2024
#> Aligning main.data with each mtx.data: Tue Jul 30 13:51:24 2024
#>   Working on mtx.data Lesion (1 of 2): Tue Jul 30 13:51:24 2024
#>   Working on mtx.data RNA (2 of 2): Tue Jul 30 13:51:24 2024
#> Warning: Some ids not matched; returning NAs for those.
#>   Working on mtx.anns: Tue Jul 30 13:51:24 2024
#>   Matching matrix 1 with annotations: Tue Jul 30 13:51:24 2024
#>   Matching matrix 2 with annotations: Tue Jul 30 13:51:24 2024
#>   Checking set.data: Tue Jul 30 13:51:24 2024
#>     Ordering and indexing set.data: Tue Jul 30 13:51:24 2024
#>     Checking section 1 of 40 of set.data: Tue Jul 30 13:51:24 2024
#> Generating bootstrap index matrix: Tue Jul 30 13:51:24 2024
#> Packaging and returning result: Tue Jul 30 13:51:24 2024