R/objects.R
anglemania_object-class.RdThe anglemania_object class is designed to construct the correct input for the
anglemania function from a Seurat object and store
the results of the analysis. It encapsulates the data and metadata required
for processing gene expression data across multiple datasets and batches.
An object of class 'anglemania_object'
matrix_listA list of FBM objects containing
the gene expression matrices for each batch.
dataset_keyA character string indicating the key used to denote the dataset in the metadata.
batch_keyA character string indicating the key used to denote the batch in the metadata.
data_infoA data frame summarizing the number of samples per dataset and their weights.
weightsA numeric vector of weights for each dataset based on the number of samples.
list_statsA list containing statistical measures computed across the datasets.
intersect_genesA character vector of genes that are expressed in at least the specified number of cells across all batches.
min_cells_per_geneA numeric value indicating the minimum number of cells in which a gene must be expressed to be included in the analysis.
integration_genesA list containing information about integration genes and their statistics.
assayA character vector specifying the Seurat assay, the counts were extracted from.
sce <- sce_example()
angl <- create_anglemania_object(
sce,
dataset_key = "dataset",
batch_key = "batch",
min_cells_per_gene = 1
)
#> Using dataset_key: dataset
#> Using the intersection of filtered genes from all batches...
#> Number of genes in intersected set: 300
#> Extracting count matrices...
#> Filtering each batch to at least 1 cells per gene...
#>
| | 0 % elapsed=00s
|========================= | 50% elapsed=00s, remaining~00s
|==================================================| 100% elapsed=00s, remaining~00s
angl
#> anglemania_object
#> --------------
#> Dataset key: dataset
#> Batch key: batch
#> Number of datasets: 2
#> Datasets: c("dataset1", "dataset2")
#> Total number of batches: 4
#> Batches (showing first 5):
#> c("dataset1:batch1", "dataset2:batch1", "dataset1:batch2", "dataset2:batch2")
#> Number of intersected genes: 300
#> Intersected genes (showing first 10):
#> gene1, gene2, gene3, gene4, gene5, gene6, gene7, gene8, gene9, gene10 , ...
#> Min cells per gene: 1