Computes the mean, standard deviations, and signal-to-noise ratio (SNR) for each element across a list of FBMs in an anglemania_object.

get_list_stats(angl)

Arguments

angl

An anglemania_object containing the list of FBMs.

Value

A list containing three matrices: mean_zscore, sds_zscore, and sn_zscore.

See also

Examples

sce <- sce_example()
angl <- create_anglemania_object(sce, batch_key = "batch")
#> No dataset_key specified.
#> Assuming that all samples belong to the same dataset and are separated by batch_key: batch
#> Extracting count matrices...
#> Filtering each batch to at least 1 cells per gene...
#> Using the intersection of filtered genes from all batches...
#> Number of genes in intersected set: 300
#> 
  |                                                  | 0 % elapsed=00s   
  |==================================================| 100% elapsed=00s, remaining~00s
angl <- anglemania(angl)
#> Computing angles and transforming to z-scores...
#> 
  |                                                  | 0 % elapsed=00s   
  |=========================                         | 50% elapsed=00s, remaining~00s
  |==================================================| 100% elapsed=00s, remaining~00s
#> Computing statistics...
#> Weighting matrix_list...
#> Calculating mean...
#> Calculating sds...
#> Filtering features...
#> Selecting features...
#> If desired, you can re-run the selection of genes with a lower zscore_mean_threshold and/or zscore_sn_threshold by using the 'select_genes' function. e.g.: angl <- select_genes(angl, zscore_mean_threshold = 1, zscore_sn_threshold = 1, max_n_genes = 2000)
#> Please inspect get_anglemania_genes(angl)$info for info on the scores of the selected gene pairs.
#> [1] "Selected 36 genes for integration."
list_stats(angl) <- get_list_stats(angl)
#> Weighting matrix_list...
#> Calculating mean...
#> Calculating sds...
str(list_stats(angl))
#> List of 3
#>  $ mean_zscore:Reference class 'FBM' [package "bigstatsr"] with 15 fields
#>   ..$ extptr      :<externalptr> 
#>   ..$ extptr_rw   :<externalptr> 
#>   ..$ nrow        : int 300
#>   ..$ ncol        : int 300
#>   ..$ type        : Named int 8
#>   .. ..- attr(*, "names")= chr "double"
#>   ..$ backingfile : chr "/tmp/Rtmpa1WtuS/file1d2464c13d0f.bk"
#>   ..$ is_read_only: logi FALSE
#>   ..$ address     :<externalptr> 
#>   ..$ address_rw  :<externalptr> 
#>   ..$ bk          : chr "/tmp/Rtmpa1WtuS/file1d2464c13d0f.bk"
#>   ..$ rds         : chr "/tmp/Rtmpa1WtuS/file1d2464c13d0f.rds"
#>   ..$ is_saved    : logi FALSE
#>   ..$ type_chr    : chr "double"
#>   ..$ type_size   : int 8
#>   ..$ file_size   : num 720000
#>   ..and 22 methods, of which 8 are  possibly relevant:
#>   ..  add_columns, bm, bm.desc, check_dimensions, check_write_permissions,
#>   ..  initialize, save, show#envRefClass
#>  $ sds_zscore :Reference class 'FBM' [package "bigstatsr"] with 15 fields
#>   ..$ extptr      :<externalptr> 
#>   ..$ extptr_rw   :<externalptr> 
#>   ..$ nrow        : int 300
#>   ..$ ncol        : int 300
#>   ..$ type        : Named int 8
#>   .. ..- attr(*, "names")= chr "double"
#>   ..$ backingfile : chr "/tmp/Rtmpa1WtuS/file1d241db667c9.bk"
#>   ..$ is_read_only: logi FALSE
#>   ..$ address     :<externalptr> 
#>   ..$ address_rw  :<externalptr> 
#>   ..$ bk          : chr "/tmp/Rtmpa1WtuS/file1d241db667c9.bk"
#>   ..$ rds         : chr "/tmp/Rtmpa1WtuS/file1d241db667c9.rds"
#>   ..$ is_saved    : logi FALSE
#>   ..$ type_chr    : chr "double"
#>   ..$ type_size   : int 8
#>   ..$ file_size   : num 720000
#>   ..and 22 methods, of which 8 are  possibly relevant:
#>   ..  add_columns, bm, bm.desc, check_dimensions, check_write_permissions,
#>   ..  initialize, save, show#envRefClass
#>  $ sn_zscore  :Reference class 'FBM' [package "bigstatsr"] with 15 fields
#>   ..$ extptr      :<externalptr> 
#>   ..$ extptr_rw   :<externalptr> 
#>   ..$ nrow        : int 300
#>   ..$ ncol        : int 300
#>   ..$ type        : Named int 8
#>   .. ..- attr(*, "names")= chr "double"
#>   ..$ backingfile : chr "/tmp/Rtmpa1WtuS/file1d244c02d31a.bk"
#>   ..$ is_read_only: logi FALSE
#>   ..$ address     :<externalptr> 
#>   ..$ address_rw  :<externalptr> 
#>   ..$ bk          : chr "/tmp/Rtmpa1WtuS/file1d244c02d31a.bk"
#>   ..$ rds         : chr "/tmp/Rtmpa1WtuS/file1d244c02d31a.rds"
#>   ..$ is_saved    : logi FALSE
#>   ..$ type_chr    : chr "double"
#>   ..$ type_size   : int 8
#>   ..$ file_size   : num 720000
#>   ..and 22 methods, of which 8 are  possibly relevant:
#>   ..  add_columns, bm, bm.desc, check_dimensions, check_write_permissions,
#>   ..  initialize, save, show#envRefClass