Class HomeStats
HomeStatsRefresher from an anonymous-user perspective and served as-is by
GET /stats/home on the REST API.
Computing these on every request is too expensive — see legacy WhatsNew
for the precedent (file-cached weekly report read at every page load).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classCount of public experiments created within one trailing window.static classstatic classstatic classstatic classstatic classstatic classA single annotation term with its EE-mention count — used insideHomeStats.TreatmentBucketStat.topTermsfor the catchall-iteration loop.static class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanPer-category distinct-term counts.Per-platform-technology-type dataset counts.Per-taxon dataset counts, sorted descending by count.Distribution of annotation categories observed across public datasets — the top-N categories Gemma actually uses, with the number of experiments each appears on.longTotal public expression experiments.How many public experiments were added to Gemma over each of several trailing windows, newest window first.Per-external-database dataset counts — GEO, ArrayExpress, CELLxGENE, etc., plus a"none"bucket for datasets without an external accession (direct lab submissions / Gemma-native).longTotal distinct differential-expression analysis result sets across public datasets.longDistinct external accessions across all public EEs.longDistinct CHEBI-anchored drug / chemical annotations in use (characteristics whosevalueUristarts withhttp://purl.obolibrary.org/obo/CHEBI_).Distinct factor-value count per ExperimentalFactor category.longNumber of distinct genes in the database.longDistinct genes annotated as manipulation targets across the corpus — characteristics whosevalueUristarts withGene.NCBI_URI_PREFIXAND whose owncategoryUriisgenotype.longCompanion togeneManipulatedCount: number of distinct experiments carrying at least one genotype-category gene-URI annotation.When the snapshot was last refreshed (ISO-8601 in JSON via default Jackson).longTotal distinct ontology-backed annotation terms in use across all public datasets.longTotal public platforms (array designs).Most-recently curated public experiments, for the scrolling-names widget.longTotal distinct biomaterials across all public experiments.Sample (biomaterial) counts broken down by technology bucket — companion tosampleCount.longNumber of public experiments that have at least one single-cell dimension recorded (orthogonal to platform-technology type — a single-cell experiment usually rides on a GENELIST platform).Per-gene ranking of how many public EEs carry that gene as a perturbation-target annotation — a gene URI whose own category isgenotype.longTotal individual cells measured across all single-cell experiments — sum ofBioAssay.numberOfCellsfor assays attached to EEs with a SingleCellDimension.Treatment-category terms broken down by bucket (seetreatment-buckets.json):approved_drug,hormone,vitamin,toxin,vehicle,biologic(PR / NCBI Gene),pathogen(NCBITaxon),control, plus theother_chemicalcatchall (unbucketed CHEBI) andothercatchall (non-CHEBI).inthashCode()voidsetByAnnotationCategory(Map<String, Long> byAnnotationCategory) Per-category distinct-term counts.voidsetByPlatformType(Map<String, Long> byPlatformType) Per-platform-technology-type dataset counts.voidsetByTaxon(List<HomeStats.TaxonStat> byTaxon) Per-taxon dataset counts, sorted descending by count.voidsetCategoryDistribution(List<HomeStats.CategoryStat> categoryDistribution) Distribution of annotation categories observed across public datasets — the top-N categories Gemma actually uses, with the number of experiments each appears on.voidsetDatasetCount(long datasetCount) Total public expression experiments.voidsetDatasetsAdded(List<HomeStats.AddedInWindow> datasetsAdded) How many public experiments were added to Gemma over each of several trailing windows, newest window first.voidsetDatasetsByAccessionSource(List<HomeStats.AccessionSourceStat> datasetsByAccessionSource) Per-external-database dataset counts — GEO, ArrayExpress, CELLxGENE, etc., plus a"none"bucket for datasets without an external accession (direct lab submissions / Gemma-native).voidsetDeaResultSetCount(long deaResultSetCount) Total distinct differential-expression analysis result sets across public datasets.voidsetDistinctAccessionCount(long distinctAccessionCount) Distinct external accessions across all public EEs.voidsetDrugCount(long drugCount) Distinct CHEBI-anchored drug / chemical annotations in use (characteristics whosevalueUristarts withhttp://purl.obolibrary.org/obo/CHEBI_).voidsetFactorValuesByCategory(List<HomeStats.FactorValueCategoryStat> factorValuesByCategory) Distinct factor-value count per ExperimentalFactor category.voidsetGeneCount(long geneCount) Number of distinct genes in the database.voidsetGeneManipulatedCount(long geneManipulatedCount) Distinct genes annotated as manipulation targets across the corpus — characteristics whosevalueUristarts withGene.NCBI_URI_PREFIXAND whose owncategoryUriisgenotype.voidsetGeneManipulatedExperimentCount(long geneManipulatedExperimentCount) Companion togeneManipulatedCount: number of distinct experiments carrying at least one genotype-category gene-URI annotation.voidsetGeneratedAt(Date generatedAt) When the snapshot was last refreshed (ISO-8601 in JSON via default Jackson).voidsetOntologyTermCount(long ontologyTermCount) Total distinct ontology-backed annotation terms in use across all public datasets.voidsetPlatformCount(long platformCount) Total public platforms (array designs).voidsetRecentExperiments(List<HomeStats.RecentExperiment> recentExperiments) Most-recently curated public experiments, for the scrolling-names widget.voidsetSampleCount(long sampleCount) Total distinct biomaterials across all public experiments.voidsetSamplesByTech(Map<String, Long> samplesByTech) Sample (biomaterial) counts broken down by technology bucket — companion tosampleCount.voidsetSingleCellCount(long singleCellCount) Number of public experiments that have at least one single-cell dimension recorded (orthogonal to platform-technology type — a single-cell experiment usually rides on a GENELIST platform).voidsetTopPerturbedGenes(List<HomeStats.PerturbedGeneStat> topPerturbedGenes) Per-gene ranking of how many public EEs carry that gene as a perturbation-target annotation — a gene URI whose own category isgenotype.voidsetTotalCells(long totalCells) Total individual cells measured across all single-cell experiments — sum ofBioAssay.numberOfCellsfor assays attached to EEs with a SingleCellDimension.voidsetTreatmentSubcategories(List<HomeStats.TreatmentBucketStat> treatmentSubcategories) Treatment-category terms broken down by bucket (seetreatment-buckets.json):approved_drug,hormone,vitamin,toxin,vehicle,biologic(PR / NCBI Gene),pathogen(NCBITaxon),control, plus theother_chemicalcatchall (unbucketed CHEBI) andothercatchall (non-CHEBI).toString()
-
Constructor Details
-
HomeStats
public HomeStats()
-
-
Method Details
-
getGeneratedAt
When the snapshot was last refreshed (ISO-8601 in JSON via default Jackson). -
getDatasetCount
public long getDatasetCount()Total public expression experiments. -
getPlatformCount
public long getPlatformCount()Total public platforms (array designs). -
getDistinctAccessionCount
public long getDistinctAccessionCount()Distinct external accessions across all public EEs.<= datasetCount— the difference is the EEs split off a parent submission ("1 GSE → 2 Gemma EEs"). Drives the Datasets-tile sub-line "from N distinct accessions". -
getSampleCount
public long getSampleCount()Total distinct biomaterials across all public experiments. -
getGeneCount
public long getGeneCount()Number of distinct genes in the database. Computed once per refresh; cheap. -
getByTaxon
Per-taxon dataset counts, sorted descending by count. -
getDatasetsByAccessionSource
Per-external-database dataset counts — GEO, ArrayExpress, CELLxGENE, etc., plus a"none"bucket for datasets without an external accession (direct lab submissions / Gemma-native). Sorted descending by count. -
getByPlatformType
Per-platform-technology-type dataset counts. Keys areTechnologyTypeenum names (ONECOLOR / TWOCOLOR / DUALMODE / SEQUENCING / GENELIST / OTHER). Frontend rolls these up into microarray (ONECOLOR+TWOCOLOR+DUALMODE) and RNA-seq (SEQUENCING+GENELIST) buckets. -
getSingleCellCount
public long getSingleCellCount()Number of public experiments that have at least one single-cell dimension recorded (orthogonal to platform-technology type — a single-cell experiment usually rides on a GENELIST platform). -
getDeaResultSetCount
public long getDeaResultSetCount()Total distinct differential-expression analysis result sets across public datasets. A DEA result set is the per-contrast unit of analysis output (e.g. "diseased vs control on factor 'disease state'"), so this number reflects the size of Gemma's DEA library — the corpus of comparisons callers can query / re-use. -
getDrugCount
public long getDrugCount()Distinct CHEBI-anchored drug / chemical annotations in use (characteristics whosevalueUristarts withhttp://purl.obolibrary.org/obo/CHEBI_). Narrower thanbyAnnotationCategory.treatment— that bucket includes non-drug treatments like radiation exposure or behavioural interventions. -
getGeneManipulatedCount
public long getGeneManipulatedCount()Distinct genes annotated as manipulation targets across the corpus — characteristics whosevalueUristarts withGene.NCBI_URI_PREFIXAND whose owncategoryUriisgenotype. Reflects how many distinct genes Gemma has perturbation data for (knockouts, knockdowns, overexpression, etc.).The category is enforced on the SAME characteristic, not on the experiment. Until 2026-08-21 it was not enforced at all and the field counted a gene URI in any category, which swept in cytokines and growth factors administered under
treatment. -
getGeneManipulatedExperimentCount
public long getGeneManipulatedExperimentCount()Companion togeneManipulatedCount: number of distinct experiments carrying at least one genotype-category gene-URI annotation.geneManipulatedCountcounts the genes; this counts how many experiments perturbed any gene at all. -
getTotalCells
public long getTotalCells()Total individual cells measured across all single-cell experiments — sum ofBioAssay.numberOfCellsfor assays attached to EEs with a SingleCellDimension. Typically reported in millions on the home page. -
getSamplesByTech
Sample (biomaterial) counts broken down by technology bucket — companion tosampleCount. Keys are stable lowercase-snake-case labels:single_cell,rna_seq(bulk RNA-seq only, single-cell excluded),microarray. Counts distinctba.sampleUsedbiomaterials per bucket, not cells / sub-biomaterials. -
getFactorValuesByCategory
Distinct factor-value count per ExperimentalFactor category. Reflects the range of experimental conditions Gemma has measured along each axis (e.g. how many distinct disease-state factor values exist across the corpus, how many genotypes, how many treatments). Keys are the canonical category labels carried onExperimentalFactor.category; sorted descending by value. -
getTreatmentSubcategories
Treatment-category terms broken down by bucket (seetreatment-buckets.json):approved_drug,hormone,vitamin,toxin,vehicle,biologic(PR / NCBI Gene),pathogen(NCBITaxon),control, plus theother_chemicalcatchall (unbucketed CHEBI) andothercatchall (non-CHEBI). Counts are EE-mention sums (ΣnumberOfExpressionExperimentsover each bucket's matched terms), not distinct-URI counts — a single popular drug used in 40 datasets contributes 40, not 1. Sorted descending by count. -
getTopPerturbedGenes
Per-gene ranking of how many public EEs carry that gene as a perturbation-target annotation — a gene URI whose own category isgenotype. Top 25, sorted descending bynumberOfExpressionExperiments. Drives the home-page middle-column bar chart of most-studied perturbed genes.Scoped to genotype since 2026-08-21. Before that it counted the gene URI in any category, so genes that are both perturbation targets and administered agents read high for the wrong reason — TNF 72 against 39 real perturbations, TGFB1 62 against 31 — and four cytokines held top-10 places that belong to Sox2, Mecp2, Pten and Apoe.
-
getOntologyTermCount
public long getOntologyTermCount()Total distinct ontology-backed annotation terms in use across all public datasets. Free-text characteristics (novalueUri) are excluded — same semantics asGET /datasets/annotations/count?excludeFreeText=true. -
getByAnnotationCategory
Per-category distinct-term counts. Keys are stable lowercase-snake-case strings:disease,organism_part,cell_type,treatment,strain,cell_line. Each value is the count of distinct ontology-backed terms in that category (free-text excluded). Thetreatmentbucket carries the drug-annotation count. -
getCategoryDistribution
Distribution of annotation categories observed across public datasets — the top-N categories Gemma actually uses, with the number of experiments each appears on. Reflects the range of experimental conditions / annotation dimensions represented in the corpus. Sorted descending bynumberOfExpressionExperiments. -
getRecentExperiments
Most-recently curated public experiments, for the scrolling-names widget. -
getDatasetsAdded
How many public experiments were added to Gemma over each of several trailing windows, newest window first. "Added" is theaction='C'audit row — when the dataset was first loaded — NOT when it was made public; seeWhatsNewServicefor why the publication date is not reportable.Several windows ship together because loading runs in bursts, so the useful window is not fixed: on 2026-08-21 the trailing 7-, 30- and 90-day counts were all 0 (the most recent load was 2026-05-12) while the 365-day count was 1,195. A caller that renders a "recently added" figure should pick the shortest window whose count is non-zero and label it with that window's
HomeStats.AddedInWindow.since, rather than hard-coding "this week" and rendering a permanent zero. -
setGeneratedAt
When the snapshot was last refreshed (ISO-8601 in JSON via default Jackson). -
setDatasetCount
public void setDatasetCount(long datasetCount) Total public expression experiments. -
setPlatformCount
public void setPlatformCount(long platformCount) Total public platforms (array designs). -
setDistinctAccessionCount
public void setDistinctAccessionCount(long distinctAccessionCount) Distinct external accessions across all public EEs.<= datasetCount— the difference is the EEs split off a parent submission ("1 GSE → 2 Gemma EEs"). Drives the Datasets-tile sub-line "from N distinct accessions". -
setSampleCount
public void setSampleCount(long sampleCount) Total distinct biomaterials across all public experiments. -
setGeneCount
public void setGeneCount(long geneCount) Number of distinct genes in the database. Computed once per refresh; cheap. -
setByTaxon
Per-taxon dataset counts, sorted descending by count. -
setDatasetsByAccessionSource
public void setDatasetsByAccessionSource(List<HomeStats.AccessionSourceStat> datasetsByAccessionSource) Per-external-database dataset counts — GEO, ArrayExpress, CELLxGENE, etc., plus a"none"bucket for datasets without an external accession (direct lab submissions / Gemma-native). Sorted descending by count. -
setByPlatformType
Per-platform-technology-type dataset counts. Keys areTechnologyTypeenum names (ONECOLOR / TWOCOLOR / DUALMODE / SEQUENCING / GENELIST / OTHER). Frontend rolls these up into microarray (ONECOLOR+TWOCOLOR+DUALMODE) and RNA-seq (SEQUENCING+GENELIST) buckets. -
setSingleCellCount
public void setSingleCellCount(long singleCellCount) Number of public experiments that have at least one single-cell dimension recorded (orthogonal to platform-technology type — a single-cell experiment usually rides on a GENELIST platform). -
setDeaResultSetCount
public void setDeaResultSetCount(long deaResultSetCount) Total distinct differential-expression analysis result sets across public datasets. A DEA result set is the per-contrast unit of analysis output (e.g. "diseased vs control on factor 'disease state'"), so this number reflects the size of Gemma's DEA library — the corpus of comparisons callers can query / re-use. -
setDrugCount
public void setDrugCount(long drugCount) Distinct CHEBI-anchored drug / chemical annotations in use (characteristics whosevalueUristarts withhttp://purl.obolibrary.org/obo/CHEBI_). Narrower thanbyAnnotationCategory.treatment— that bucket includes non-drug treatments like radiation exposure or behavioural interventions. -
setGeneManipulatedCount
public void setGeneManipulatedCount(long geneManipulatedCount) Distinct genes annotated as manipulation targets across the corpus — characteristics whosevalueUristarts withGene.NCBI_URI_PREFIXAND whose owncategoryUriisgenotype. Reflects how many distinct genes Gemma has perturbation data for (knockouts, knockdowns, overexpression, etc.).The category is enforced on the SAME characteristic, not on the experiment. Until 2026-08-21 it was not enforced at all and the field counted a gene URI in any category, which swept in cytokines and growth factors administered under
treatment. -
setGeneManipulatedExperimentCount
public void setGeneManipulatedExperimentCount(long geneManipulatedExperimentCount) Companion togeneManipulatedCount: number of distinct experiments carrying at least one genotype-category gene-URI annotation.geneManipulatedCountcounts the genes; this counts how many experiments perturbed any gene at all. -
setTotalCells
public void setTotalCells(long totalCells) Total individual cells measured across all single-cell experiments — sum ofBioAssay.numberOfCellsfor assays attached to EEs with a SingleCellDimension. Typically reported in millions on the home page. -
setSamplesByTech
Sample (biomaterial) counts broken down by technology bucket — companion tosampleCount. Keys are stable lowercase-snake-case labels:single_cell,rna_seq(bulk RNA-seq only, single-cell excluded),microarray. Counts distinctba.sampleUsedbiomaterials per bucket, not cells / sub-biomaterials. -
setFactorValuesByCategory
public void setFactorValuesByCategory(List<HomeStats.FactorValueCategoryStat> factorValuesByCategory) Distinct factor-value count per ExperimentalFactor category. Reflects the range of experimental conditions Gemma has measured along each axis (e.g. how many distinct disease-state factor values exist across the corpus, how many genotypes, how many treatments). Keys are the canonical category labels carried onExperimentalFactor.category; sorted descending by value. -
setTreatmentSubcategories
Treatment-category terms broken down by bucket (seetreatment-buckets.json):approved_drug,hormone,vitamin,toxin,vehicle,biologic(PR / NCBI Gene),pathogen(NCBITaxon),control, plus theother_chemicalcatchall (unbucketed CHEBI) andothercatchall (non-CHEBI). Counts are EE-mention sums (ΣnumberOfExpressionExperimentsover each bucket's matched terms), not distinct-URI counts — a single popular drug used in 40 datasets contributes 40, not 1. Sorted descending by count. -
setTopPerturbedGenes
Per-gene ranking of how many public EEs carry that gene as a perturbation-target annotation — a gene URI whose own category isgenotype. Top 25, sorted descending bynumberOfExpressionExperiments. Drives the home-page middle-column bar chart of most-studied perturbed genes.Scoped to genotype since 2026-08-21. Before that it counted the gene URI in any category, so genes that are both perturbation targets and administered agents read high for the wrong reason — TNF 72 against 39 real perturbations, TGFB1 62 against 31 — and four cytokines held top-10 places that belong to Sox2, Mecp2, Pten and Apoe.
-
setOntologyTermCount
public void setOntologyTermCount(long ontologyTermCount) Total distinct ontology-backed annotation terms in use across all public datasets. Free-text characteristics (novalueUri) are excluded — same semantics asGET /datasets/annotations/count?excludeFreeText=true. -
setByAnnotationCategory
Per-category distinct-term counts. Keys are stable lowercase-snake-case strings:disease,organism_part,cell_type,treatment,strain,cell_line. Each value is the count of distinct ontology-backed terms in that category (free-text excluded). Thetreatmentbucket carries the drug-annotation count. -
setCategoryDistribution
Distribution of annotation categories observed across public datasets — the top-N categories Gemma actually uses, with the number of experiments each appears on. Reflects the range of experimental conditions / annotation dimensions represented in the corpus. Sorted descending bynumberOfExpressionExperiments. -
setRecentExperiments
Most-recently curated public experiments, for the scrolling-names widget. -
setDatasetsAdded
How many public experiments were added to Gemma over each of several trailing windows, newest window first. "Added" is theaction='C'audit row — when the dataset was first loaded — NOT when it was made public; seeWhatsNewServicefor why the publication date is not reportable.Several windows ship together because loading runs in bursts, so the useful window is not fixed: on 2026-08-21 the trailing 7-, 30- and 90-day counts were all 0 (the most recent load was 2026-05-12) while the 365-day count was 1,195. A caller that renders a "recently added" figure should pick the shortest window whose count is non-zero and label it with that window's
HomeStats.AddedInWindow.since, rather than hard-coding "this week" and rendering a permanent zero. -
equals
-
canEqual
-
hashCode
-
toString
-