Skip to contents

[Experimental]

Provides a concise summary of the content of AnyHermesData objects.

Usage

summary(object, ...)

# S4 method for AnyHermesData
summary(object)

# S4 method for HermesDataSummary
show(object)

Arguments

object

(HermesDataSummary)
result from the summary method applied to AnyHermesData object.

...

not used.

Value

An object of the corresponding summary class, here HermesDataSummary.

Methods (by class)

  • summary(AnyHermesData): A summary method for AnyHermesData object that creates a HermesDataSummary object.

  • show(HermesDataSummary): A show method prints summary description of HermesDataSummary object generated by the summary() method.

Examples

object <- hermes_data
object_summary <- summary(object)

# We can access parts of this S4 object with the `slot` function.
str(object_summary)
#> Formal class 'HermesDataSummary' [package "hermes"] with 10 slots
#>   ..@ class_name            : chr "HermesData"
#>   ..@ n_genes               : int 5085
#>   ..@ n_samples             : int 20
#>   ..@ additional_gene_info  : chr [1:3] "GeneID" "SYMBOL" "chromosome_name"
#>   ..@ additional_sample_info: chr [1:72] "Filename" "SampleID" "AGEGRP" "AGE18" ...
#>   ..@ no_qc_flags_filled    : logi FALSE
#>   ..@ genes_fail            : chr [1:3021] "GeneID:10677" "GeneID:101928428" "GeneID:100422835" "GeneID:102466731" ...
#>   ..@ samples_fail          : chr [1:2] "06520063C0043R" "06520062C0017R"
#>   ..@ lib_sizes             : Named num [1:20] 5474927 5154958 4632496 5533212 5026848 ...
#>   .. ..- attr(*, "names")= chr [1:20] "06520011B0023R" "06520067C0018R" "06520063C0043R" "06520105C0017R" ...
#>   ..@ assay_names           : chr "counts"
slotNames(object_summary)
#>  [1] "class_name"             "n_genes"                "n_samples"             
#>  [4] "additional_gene_info"   "additional_sample_info" "no_qc_flags_filled"    
#>  [7] "genes_fail"             "samples_fail"           "lib_sizes"             
#> [10] "assay_names"           
slot(object_summary, "lib_sizes")
#> 06520011B0023R 06520067C0018R 06520063C0043R 06520105C0017R 06520092C0017R 
#>        5474927        5154958        4632496        5533212        5026848 
#> 06520103C0017R 06520001B0023R 06520022C0017R 06520062C0017R 06520046C0018R 
#>        7262374        6408552        5286953        4778014        4990556 
#> 06520101B0017R 06520047C0017R 06520024B0014R 06520080B0023R 06520093C0017R 
#>        4923925        5417510        5560720        4642530        5016838 
#> 06520070C0018R 06520023C0018R 06520099B0017R 06520015C0016R 06520019C0023R 
#>        6464043        6080233        5314431        5426566        6139497 

# Just calling the summary method like this will use the `show()` method.
summary(object)
#> HermesData object with 20 samples of 5085 genes.
#> - Library sizes across samples: mean 5476759, median 5365970, range 4632496 to 7262374
#> - Included assays (1): counts
#> - Additional gene information (3): GeneID SYMBOL chromosome_name
#> - Additional sample information (72): Filename SampleID ... TTYPE
#>   STDSSDY
#> - Low expression genes (3021): GeneID:10677 GeneID:101928428 ...
#>   GeneID:9084 GeneID:9426
#> - Samples with too low depth or technical failures (2): 06520063C0043R
#>   06520062C0017R