Removes rows from each matrix within a CellTypeDataset (CTD) that are not within gene_subset.

filter_ctd_genes(ctd, gene_subset)

Arguments

ctd

CellTypeDataset.

gene_subset

Genes to subset to.

Value

Filtered CellTypeDataset.

Examples

 
ctd <- ewceData::ctd()
#> see ?ewceData and browseVignettes('ewceData') for documentation
#> loading from cache
ctd <- standardise_ctd(ctd, input_species="mouse")
#> Standardising CellTypeDataset
#> Found 5 matrix types across 2 CTD levels.
#> Processing level: 1
#> Processing level: 2
gene_subset <- rownames(ctd[[1]]$mean_exp)[1:100]
ctd_subset <- EWCE::filter_ctd_genes(ctd = ctd, gene_subset = gene_subset) 
#> Filtering CTD to 100 genes.
#> level: level_1
#> Found 5 matrix types across 1 CTD levels.
#>    - mean_exp
#>    - median_exp
#>    - specificity
#>    - median_specificity
#>    - specificity_quantiles
#> level: level_2
#> Found 5 matrix types across 1 CTD levels.
#>    - mean_exp
#>    - median_exp
#>    - specificity
#>    - median_specificity
#>    - specificity_quantiles