Class DifferentialExpressionResultDaoImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractDao<DifferentialExpressionAnalysisResult>
ubic.gemma.persistence.service.analysis.expression.diff.DifferentialExpressionResultDaoImpl
- All Implemented Interfaces:
DifferentialExpressionResultDao,BaseDao<DifferentialExpressionAnalysisResult>
@Repository
public class DifferentialExpressionResultDaoImpl
extends AbstractDao<DifferentialExpressionAnalysisResult>
implements DifferentialExpressionResultDao
This is a key class for queries to retrieve differential expression results (as well as standard CRUD aspects of
working with DifferentialExpressionResults).
- Author:
- keshav
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractDao
log -
Constructor Summary
ConstructorsConstructorDescriptionDifferentialExpressionResultDaoImpl(SessionFactory sessionFactory, DifferentialExpressionResultCache differentialExpressionResultCache) -
Method Summary
Modifier and TypeMethodDescriptioncreate(Collection<DifferentialExpressionAnalysisResult> entities) Create all the given entities in the persistent storage.findByExperimentAnalyzed(Collection<Long> experimentAnalyzedIds, boolean includeSubSets, double threshold, int limit) Given a list of experiments and a threshold value finds all the probes that met the cut-off in the given experimentsfindByGene(Gene gene, boolean useGene2Cs, boolean keepNonSpecificProbes) Find differential expression results for a given gene, grouped by experiment.findByGene(Gene gene, boolean useGene2Cs, boolean keepNonSpecificProbes, double threshold, int limit) Find differential expression for a gene, exceeding a given significance level (using the corrected pvalue field)findByGeneAndExperimentAnalyzed(Gene gene, boolean useGene2Cs, boolean keepNonSpecificProbes, Collection<Long> experimentAnalyzedIds, boolean includeSubSets) Find differential expression results for a given gene and set of experiments, grouped by experiment.findByGeneAndExperimentAnalyzed(Gene gene, boolean useGene2Cs, boolean keepNonSpecificProbes, Collection<Long> experimentAnalyzedIds, boolean includeSubsets, double threshold, int limit) Find differential expression for a gene in given data sets, exceeding a given significance level (using the corrected pvalue field)findByGeneAndExperimentAnalyzed(Gene gene, Collection<Long> experimentAnalyzedIds, boolean includeSubsets, Map<DifferentialExpressionAnalysisResult, Long> sourceExperimentIdMap, Map<DifferentialExpressionAnalysisResult, Long> experimentAnalyzedIdMap, Map<DifferentialExpressionAnalysisResult, Baseline> baselineMap, double threshold, boolean useGene2Cs, boolean keepNonSpecificProbes, boolean initializeFactorValues) Retrieve differential expression results for a given gene across all the given datasets.findByResultSet(ExpressionAnalysisResultSet resultSet, double threshold, int limit, int minNumberOfResults) Key method for getting contrasts associated with results.findGeneResultsByResultSetIdsAndGeneIds(Collection<DiffExResultSetSummaryValueObject> resultSets, Collection<Long> geneIds) Retrieve differential expression results in bulk.loadAll()Loads all entities of typeBaseDaofrom the persistent storage.voidRemove a persistent entity.Methods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, find, findByProperty, findByPropertyIn, findIdByProperty, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getEntityName, getIdentifierPropertyName, getSessionFactory, load, load, loadReference, loadReference, reload, reload, remove, save, save, streamAll, streamAll, streamQuery, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.persistence.service.BaseDao
countAll, create, find, findOrCreate, getElementClass, load, load, loadReference, loadReference, reload, reload, remove, save, save, streamAll, streamAll, update, update
-
Constructor Details
-
DifferentialExpressionResultDaoImpl
@Autowired public DifferentialExpressionResultDaoImpl(SessionFactory sessionFactory, DifferentialExpressionResultCache differentialExpressionResultCache)
-
-
Method Details
-
loadAll
Description copied from interface:BaseDaoLoads all entities of typeBaseDaofrom the persistent storage.- Specified by:
loadAllin interfaceBaseDao<DifferentialExpressionAnalysisResult>- Overrides:
loadAllin classAbstractDao<DifferentialExpressionAnalysisResult>- Returns:
- a collection containing all entities that are currently accessible.
-
create
public Collection<DifferentialExpressionAnalysisResult> create(Collection<DifferentialExpressionAnalysisResult> entities) Description copied from interface:BaseDaoCreate all the given entities in the persistent storage.- Specified by:
createin interfaceBaseDao<DifferentialExpressionAnalysisResult>- Overrides:
createin classAbstractDao<DifferentialExpressionAnalysisResult>- Parameters:
entities- the entities to be crated.- Returns:
- collection of entities representing the entities in the persistent storage that were created.
-
remove
Description copied from interface:BaseDaoRemove a persistent entity.- Specified by:
removein interfaceBaseDao<DifferentialExpressionAnalysisResult>- Overrides:
removein classAbstractDao<DifferentialExpressionAnalysisResult>- Parameters:
entity- the entity to be removed
-
findByGeneAndExperimentAnalyzed
public List<DifferentialExpressionAnalysisResult> findByGeneAndExperimentAnalyzed(Gene gene, Collection<Long> experimentAnalyzedIds, boolean includeSubsets, @Nullable Map<DifferentialExpressionAnalysisResult, Long> sourceExperimentIdMap, @Nullable Map<DifferentialExpressionAnalysisResult, Long> experimentAnalyzedIdMap, @Nullable Map<DifferentialExpressionAnalysisResult, Baseline> baselineMap, double threshold, boolean useGene2Cs, boolean keepNonSpecificProbes, boolean initializeFactorValues) Description copied from interface:DifferentialExpressionResultDaoRetrieve differential expression results for a given gene across all the given datasets.Results are grouped by result set. If a gene maps to more than one probe, the result with the lowest corrected P-value is selected.
- Specified by:
findByGeneAndExperimentAnalyzedin interfaceDifferentialExpressionResultDao- Parameters:
gene- a specific gene to retrieve differential expression forexperimentAnalyzedIds- list of IDs of experiments or experiment subsets to considerincludeSubsets- include results from experiment subsetssourceExperimentIdMap- a mapping of results to source experiment IDexperimentAnalyzedIdMap- a mapping of results to experiment analyzed IDbaselineMap- a mapping of results to baselinesthreshold- a maximum threshold on the corrected P-value, between 0 and 1 inclusivelyuseGene2Cs- use the GENE2CS table, which is faster but may be inaccuratekeepNonSpecificProbes- whether to keep probes that map to more than one geneinitializeFactorValues- whether to initialize factor values in contrasts and baselines, note that their experimental factors will not be initialized- Returns:
- differential expression results, grouped by analyzed experiment ID
-
findByGeneAndExperimentAnalyzed
public Map<BioAssaySet,List<DifferentialExpressionAnalysisResult>> findByGeneAndExperimentAnalyzed(Gene gene, boolean useGene2Cs, boolean keepNonSpecificProbes, Collection<Long> experimentAnalyzedIds, boolean includeSubsets, double threshold, int limit) Description copied from interface:DifferentialExpressionResultDaoFind differential expression for a gene in given data sets, exceeding a given significance level (using the corrected pvalue field)- Specified by:
findByGeneAndExperimentAnalyzedin interfaceDifferentialExpressionResultDao- Parameters:
gene- geneuseGene2Cs- use the GENE2CS table, which is faster but may be inaccuratekeepNonSpecificProbes- keep non-specific probesexperimentAnalyzedIds- restrict results to analysis of these experimentsincludeSubsets- if true, include the subsets of the experiments analyzedthreshold- thresholdlimit- limit- Returns:
- map to diff ex VOs
-
findByExperimentAnalyzed
public Map<BioAssaySet,List<DifferentialExpressionAnalysisResult>> findByExperimentAnalyzed(Collection<Long> experimentAnalyzedIds, boolean includeSubSets, double threshold, int limit) Description copied from interface:DifferentialExpressionResultDaoGiven a list of experiments and a threshold value finds all the probes that met the cut-off in the given experiments- Specified by:
findByExperimentAnalyzedin interfaceDifferentialExpressionResultDao- Parameters:
experimentAnalyzedIds- experiment analyzed IDsincludeSubSets- if true, include the subsets of the experiments analyzedthreshold- thresholdlimit- limit- Returns:
- map to diff ex VOs
-
findByGene
public Map<BioAssaySet,List<DifferentialExpressionAnalysisResult>> findByGene(Gene gene, boolean useGene2Cs, boolean keepNonSpecificProbes) Description copied from interface:DifferentialExpressionResultDaoFind differential expression results for a given gene, grouped by experiment.- Specified by:
findByGenein interfaceDifferentialExpressionResultDao- Parameters:
useGene2Cs- use the GENE2CS table, which is faster but may be inaccuratekeepNonSpecificProbes- keep non-specific probes- Returns:
- a map of a collection of
DifferentialExpressionAnalysisResults keyed byBioAssaySet.
-
findByGene
public Map<BioAssaySet,List<DifferentialExpressionAnalysisResult>> findByGene(Gene gene, boolean useGene2Cs, boolean keepNonSpecificProbes, double threshold, int limit) Description copied from interface:DifferentialExpressionResultDaoFind differential expression for a gene, exceeding a given significance level (using the corrected pvalue field)- Specified by:
findByGenein interfaceDifferentialExpressionResultDao- Parameters:
gene- geneuseGene2Cs- use the GENE2CS table, which is faster but may be inaccuratekeepNonSpecificProbes- keep non-specific probes (i.e. probes that map to more than one gene)threshold- thresholdlimit- limit- Returns:
- map to diff exp VOs
-
findByGeneAndExperimentAnalyzed
public Map<BioAssaySet,List<DifferentialExpressionAnalysisResult>> findByGeneAndExperimentAnalyzed(Gene gene, boolean useGene2Cs, boolean keepNonSpecificProbes, Collection<Long> experimentAnalyzedIds, boolean includeSubSets) Description copied from interface:DifferentialExpressionResultDaoFind differential expression results for a given gene and set of experiments, grouped by experiment.- Specified by:
findByGeneAndExperimentAnalyzedin interfaceDifferentialExpressionResultDao- Parameters:
gene- gene to retrieve differential expression foruseGene2Cs- use the GENE2CS table, which is faster but may be inaccuratekeepNonSpecificProbes- keep non-specific probes (i.e. probes that map to more than one gene)experimentAnalyzedIds- IDs of experiments or experiment subsets to considerincludeSubSets- include subsets of the analyzed experiments- Returns:
- a map of a collection of
DifferentialExpressionAnalysisResults keyed byBioAssaySet.
-
findGeneResultsByResultSetIdsAndGeneIds
public Map<Long,Map<Long, findGeneResultsByResultSetIdsAndGeneIdsDiffExprGeneSearchResult>> (Collection<DiffExResultSetSummaryValueObject> resultSets, Collection<Long> geneIds) Description copied from interface:DifferentialExpressionResultDaoRetrieve differential expression results in bulk. This is an important method for the differential expression interfaces.- Specified by:
findGeneResultsByResultSetIdsAndGeneIdsin interfaceDifferentialExpressionResultDao- Parameters:
resultSets- result setsgeneIds- gene IDs- Returns:
- map of resultset IDs to map of gene id to differential expression results.
-
findByResultSet
public List<DifferentialExpressionValueObject> findByResultSet(ExpressionAnalysisResultSet resultSet, double threshold, int limit, int minNumberOfResults) - Specified by:
findByResultSetin interfaceDifferentialExpressionResultDao
-
findContrastsByAnalysisResultIds
Key method for getting contrasts associated with results.- Specified by:
findContrastsByAnalysisResultIdsin interfaceDifferentialExpressionResultDao- Parameters:
ids- analysis result IDs- Returns:
- map of result to contrasts value object.
-