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
elementClass, log
-
-
Constructor Summary
Constructors Constructor Description DifferentialExpressionResultDaoImpl(SessionFactory sessionFactory, DifferentialExpressionResultCache differentialExpressionResultCache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<DifferentialExpressionAnalysisResult>
create(Collection<DifferentialExpressionAnalysisResult> entities)
Crates all the given entities in the persistent storage.Map<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>>
find(Gene gene, double threshold, int limit)
Find differential expression for a gene, exceeding a given significance level (using the corrected pvalue field)Map<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>>
findByExperimentAnalyzed(Collection<Long> experiments, double qvalueThreshold, int limit)
Given a list of experiments and a threshold value finds all the probes that met the cut off in the given experimentsMap<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>>
findByGene(Gene gene)
Find differential expression results for a given gene, grouped by experiment.Map<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>>
findByGeneAndExperimentAnalyzed(Gene gene, Collection<Long> experimentsAnalyzed)
Find differential expression results for a given gene and set of experiments, grouped by experiment.List<DifferentialExpressionAnalysisResult>
findByGeneAndExperimentAnalyzed(Gene gene, Collection<Long> experimentAnalyzedIds, boolean includeSubsets, Map<DifferentialExpressionAnalysisResult,Long> sourceExperimentIdMap, Map<DifferentialExpressionAnalysisResult,Long> experimentAnalyzedIdMap, Map<DifferentialExpressionAnalysisResult,Baseline> baselineMap, double threshold, boolean keepNonSpecificProbes, boolean initializeFactorValues)
Retrieve differential expression results for a given gene across all the given datasets.Map<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>>
findByGeneAndExperimentAnalyzed(Gene gene, Collection<Long> experimentsAnalyzed, double threshold, int limit)
Find differential expression for a gene in given data sets, exceeding a given significance level (using the corrected pvalue field)Map<Long,Map<Long,DiffExprGeneSearchResult>>
findDiffExAnalysisResultIdsInResultSets(Collection<DiffExResultSetSummaryValueObject> resultSets, Collection<Long> geneIds)
List<DifferentialExpressionValueObject>
findInResultSet(ExpressionAnalysisResultSet resultSet, double threshold, int limit, int minNumberOfResults)
Collection<DifferentialExpressionAnalysisResult>
loadAll()
Loads all instanced of specific class from the persistent storage.Map<Long,ContrastsValueObject>
loadContrastDetailsForResults(Collection<Long> ids)
Key method for getting contrasts associated with results.void
remove(DifferentialExpressionAnalysisResult entity)
Remove a persistent instance-
Methods inherited from class ubic.gemma.persistence.service.AbstractDao
countAll, create, find, findByProperty, findByPropertyIn, findOneByProperty, findOrCreate, getBatchSize, getElementClass, getIdentifierPropertyName, getSessionFactory, load, load, loadReference, loadReference, remove, remove, save, save, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.persistence.service.BaseDao
countAll, create, find, findOrCreate, getElementClass, getIdentifierPropertyName, load, load, loadReference, loadReference, remove, remove, save, save, update, update
-
-
-
-
Constructor Detail
-
DifferentialExpressionResultDaoImpl
@Autowired public DifferentialExpressionResultDaoImpl(SessionFactory sessionFactory, DifferentialExpressionResultCache differentialExpressionResultCache)
-
-
Method Detail
-
create
public Collection<DifferentialExpressionAnalysisResult> create(Collection<DifferentialExpressionAnalysisResult> entities)
Description copied from interface:BaseDao
Crates all the given entities in the persistent storage.- Specified by:
create
in interfaceBaseDao<DifferentialExpressionAnalysisResult>
- Overrides:
create
in classAbstractDao<DifferentialExpressionAnalysisResult>
- Parameters:
entities
- the entities to be crated.- Returns:
- collection of entities representing the instances in the persistent storage that were created.
-
remove
public void remove(DifferentialExpressionAnalysisResult entity)
Description copied from interface:BaseDao
Remove a persistent instance- Specified by:
remove
in interfaceBaseDao<DifferentialExpressionAnalysisResult>
- Overrides:
remove
in 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 keepNonSpecificProbes, boolean initializeFactorValues)
Description copied from interface:DifferentialExpressionResultDao
Retrieve 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:
findByGeneAndExperimentAnalyzed
in 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 inclusivelykeepNonSpecificProbes
- 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<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>> findByGeneAndExperimentAnalyzed(Gene gene, Collection<Long> experimentsAnalyzed, double threshold, int limit)
Description copied from interface:DifferentialExpressionResultDao
Find differential expression for a gene in given data sets, exceeding a given significance level (using the corrected pvalue field)- Specified by:
findByGeneAndExperimentAnalyzed
in interfaceDifferentialExpressionResultDao
-
findByExperimentAnalyzed
public Map<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>> findByExperimentAnalyzed(Collection<Long> experiments, double qvalueThreshold, int limit)
Description copied from interface:DifferentialExpressionResultDao
Given a list of experiments and a threshold value finds all the probes that met the cut off in the given experiments- Specified by:
findByExperimentAnalyzed
in interfaceDifferentialExpressionResultDao
-
findByGene
public Map<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>> findByGene(Gene gene)
Description copied from interface:DifferentialExpressionResultDao
Find differential expression results for a given gene, grouped by experiment.- Specified by:
findByGene
in interfaceDifferentialExpressionResultDao
- Returns:
- a map of a collection of
DifferentialExpressionAnalysisResult
s keyed byBioAssaySet
.
-
findByGeneAndExperimentAnalyzed
public Map<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>> findByGeneAndExperimentAnalyzed(Gene gene, Collection<Long> experimentsAnalyzed)
Description copied from interface:DifferentialExpressionResultDao
Find differential expression results for a given gene and set of experiments, grouped by experiment.- Specified by:
findByGeneAndExperimentAnalyzed
in interfaceDifferentialExpressionResultDao
- Returns:
- a map of a collection of
DifferentialExpressionAnalysisResult
s keyed byBioAssaySet
.
-
findDiffExAnalysisResultIdsInResultSets
public Map<Long,Map<Long,DiffExprGeneSearchResult>> findDiffExAnalysisResultIdsInResultSets(Collection<DiffExResultSetSummaryValueObject> resultSets, Collection<Long> geneIds)
- Specified by:
findDiffExAnalysisResultIdsInResultSets
in interfaceDifferentialExpressionResultDao
- Returns:
- map of resultSetId to map of gene to DiffExprGeneSearchResult
-
findInResultSet
public List<DifferentialExpressionValueObject> findInResultSet(ExpressionAnalysisResultSet resultSet, double threshold, int limit, int minNumberOfResults)
- Specified by:
findInResultSet
in interfaceDifferentialExpressionResultDao
-
loadContrastDetailsForResults
public Map<Long,ContrastsValueObject> loadContrastDetailsForResults(Collection<Long> ids)
Key method for getting contrasts associated with results.- Specified by:
loadContrastDetailsForResults
in interfaceDifferentialExpressionResultDao
-
find
public Map<ExpressionExperimentValueObject,List<DifferentialExpressionValueObject>> find(Gene gene, double threshold, int limit)
Description copied from interface:DifferentialExpressionResultDao
Find differential expression for a gene, exceeding a given significance level (using the corrected pvalue field)- Specified by:
find
in interfaceDifferentialExpressionResultDao
- Parameters:
gene
- genethreshold
- thresholdlimit
- limit- Returns:
- map to diff exp VOs
-
loadAll
public Collection<DifferentialExpressionAnalysisResult> loadAll()
Description copied from interface:BaseDao
Loads all instanced of specific class from the persistent storage.- Specified by:
loadAll
in interfaceBaseDao<DifferentialExpressionAnalysisResult>
- Overrides:
loadAll
in classAbstractDao<DifferentialExpressionAnalysisResult>
- Returns:
- a collection containing all instances that are currently accessible.
-
-