Class DifferentialExpressionAnalysisServiceImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractService<DifferentialExpressionAnalysis>
ubic.gemma.persistence.service.analysis.expression.diff.DifferentialExpressionAnalysisServiceImpl
- All Implemented Interfaces:
AnalysisService<DifferentialExpressionAnalysis>
,DifferentialExpressionAnalysisService
,BaseImmutableService<DifferentialExpressionAnalysis>
,BaseReadOnlyService<DifferentialExpressionAnalysis>
,BaseService<DifferentialExpressionAnalysis>
,SecurableBaseImmutableService<DifferentialExpressionAnalysis>
,SecurableBaseReadOnlyService<DifferentialExpressionAnalysis>
,SecurableBaseService<DifferentialExpressionAnalysis>
@Service
public class DifferentialExpressionAnalysisServiceImpl
extends AbstractService<DifferentialExpressionAnalysis>
implements DifferentialExpressionAnalysisService
- Author:
- paul, keshav
- See Also:
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log
-
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionboolean
canDelete
(DifferentialExpressionAnalysis differentialExpressionAnalysis) findByExperiment
(ExpressionExperiment experiment, boolean includeSubSets) findByExperimentAnalyzedAndId
(ExpressionExperiment expressionExperiment, Long analysisId, boolean includeSubSets) findByExperimentIds
(Collection<Long> experimentIds) findByExperiments
(Collection<ExpressionExperiment> experiments, boolean includeSubSets) findByName
(String name) Given a set of ids, find experiments or experimentsubsets that have differential expression analyses.getAnalysesByExperiment
(Collection<Long> ids, int offset, int limit) getExperimentsWithAnalysis
(Collection<Long> experimentAnalyzedIds, boolean includeSubSets) Obtain IDs of experiments that have analyses.getExperimentsWithAnalysis
(Taxon taxon) void
Removes the entity with given ID from the persistent storage.void
remove
(Collection<DifferentialExpressionAnalysis> entities) Removes all the given entities from persistent storage.void
remove
(DifferentialExpressionAnalysis toDelete) Removes the given entity from the persistent storage.void
removeForExperiment
(ExpressionExperiment ee, boolean includeSubSets) Removes all analyses for the given experimentint
removeForExperimentalFactor
(ExperimentalFactor experimentalFactor) Remove analyses using the given factor.int
removeForExperimentalFactors
(Collection<ExperimentalFactor> experimentalFactors) void
removeForExperimentAnalyzed
(BioAssaySet experimentAnalyzed) thaw
(Collection<DifferentialExpressionAnalysis> expressionAnalyses) thaw
(DifferentialExpressionAnalysis differentialExpressionAnalysis) thawFully
(DifferentialExpressionAnalysis differentialExpressionAnalysis) Methods inherited from class ubic.gemma.persistence.service.AbstractService
countAll, create, create, ensureInSession, ensureInSession, find, findOrCreate, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, save, save, streamAll, streamAll, 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.BaseReadOnlyService
countAll, getElementClass
Methods inherited from interface ubic.gemma.persistence.service.analysis.expression.diff.DifferentialExpressionAnalysisService
create, update
Methods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseImmutableService
create, findOrCreate
Methods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseReadOnlyService
find, findOrFail, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, streamAll, streamAll
Methods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseService
save, save, update
-
Constructor Details
-
DifferentialExpressionAnalysisServiceImpl
@Autowired public DifferentialExpressionAnalysisServiceImpl(DifferentialExpressionAnalysisDao mainDao)
-
-
Method Details
-
loadWithExperimentAnalyzed
@Transactional(readOnly=true) public DifferentialExpressionAnalysis loadWithExperimentAnalyzed(Long id) - Specified by:
loadWithExperimentAnalyzed
in interfaceDifferentialExpressionAnalysisService
-
findByFactor
@Transactional(readOnly=true) public Collection<DifferentialExpressionAnalysis> findByFactor(ExperimentalFactor ef) - Specified by:
findByFactor
in interfaceDifferentialExpressionAnalysisService
-
findByExperimentIds
@Transactional(readOnly=true) public Map<Long,Collection<DifferentialExpressionAnalysis>> findByExperimentIds(Collection<Long> experimentIds) - Specified by:
findByExperimentIds
in interfaceDifferentialExpressionAnalysisService
-
findExperimentsWithAnalyses
- Specified by:
findExperimentsWithAnalyses
in interfaceDifferentialExpressionAnalysisService
-
findByExperimentAnalyzedAndId
@Transactional(readOnly=true) public DifferentialExpressionAnalysis findByExperimentAnalyzedAndId(ExpressionExperiment expressionExperiment, Long analysisId, boolean includeSubSets) - Specified by:
findByExperimentAnalyzedAndId
in interfaceDifferentialExpressionAnalysisService
-
thaw
@Transactional(readOnly=true) public Collection<DifferentialExpressionAnalysis> thaw(Collection<DifferentialExpressionAnalysis> expressionAnalyses) - Specified by:
thaw
in interfaceDifferentialExpressionAnalysisService
-
thaw
@Transactional(readOnly=true) public DifferentialExpressionAnalysis thaw(DifferentialExpressionAnalysis differentialExpressionAnalysis) - Specified by:
thaw
in interfaceDifferentialExpressionAnalysisService
-
thawFully
@Transactional(readOnly=true) public DifferentialExpressionAnalysis thawFully(DifferentialExpressionAnalysis differentialExpressionAnalysis) - Specified by:
thawFully
in interfaceDifferentialExpressionAnalysisService
-
canDelete
@Transactional(readOnly=true) public boolean canDelete(DifferentialExpressionAnalysis differentialExpressionAnalysis) - Specified by:
canDelete
in interfaceDifferentialExpressionAnalysisService
- Parameters:
differentialExpressionAnalysis
- analysis- Returns:
- Is the analysis deleteable, or is it tied up with another entity that keeps it from being removed.
-
getAnalysesByExperiment
@Transactional(readOnly=true) public Map<ExpressionExperimentDetailsValueObject,List<DifferentialExpressionAnalysisValueObject>> getAnalysesByExperiment(Collection<Long> ids) Description copied from interface:DifferentialExpressionAnalysisService
Given a set of ids, find experiments or experimentsubsets that have differential expression analyses. Subsets are handled two ways: if the ID given is of a subset, or if the ID is of an experiment that has subsets. In the latter case, the return value will contain experiments that were not explicitly queried for.- Specified by:
getAnalysesByExperiment
in interfaceDifferentialExpressionAnalysisService
- Parameters:
ids
- of experiments or experimentsubsets.- Returns:
- map of bioassayset (valueobjects) to analyses (valueobjects) for each.
-
getAnalysesByExperiment
@Transactional(readOnly=true) public Map<ExpressionExperimentDetailsValueObject,List<DifferentialExpressionAnalysisValueObject>> getAnalysesByExperiment(Collection<Long> ids, int offset, int limit) - Specified by:
getAnalysesByExperiment
in interfaceDifferentialExpressionAnalysisService
-
remove
Description copied from interface:BaseImmutableService
Removes the given entity from the persistent storage.- Specified by:
remove
in interfaceBaseImmutableService<DifferentialExpressionAnalysis>
- Specified by:
remove
in interfaceSecurableBaseImmutableService<DifferentialExpressionAnalysis>
- Overrides:
remove
in classAbstractService<DifferentialExpressionAnalysis>
- Parameters:
toDelete
- the entity to be removed.
-
remove
Description copied from interface:BaseImmutableService
Removes all the given entities from persistent storage.- Specified by:
remove
in interfaceBaseImmutableService<DifferentialExpressionAnalysis>
- Specified by:
remove
in interfaceSecurableBaseImmutableService<DifferentialExpressionAnalysis>
- Overrides:
remove
in classAbstractService<DifferentialExpressionAnalysis>
- Parameters:
entities
- the entities to be removed.
-
remove
Description copied from interface:BaseImmutableService
Removes the entity with given ID from the persistent storage.- Specified by:
remove
in interfaceBaseImmutableService<DifferentialExpressionAnalysis>
- Specified by:
remove
in interfaceSecurableBaseImmutableService<DifferentialExpressionAnalysis>
- Overrides:
remove
in classAbstractService<DifferentialExpressionAnalysis>
- Parameters:
id
- the ID of entity to be removed.
-
removeForExperiment
Description copied from interface:DifferentialExpressionAnalysisService
Removes all analyses for the given experiment- Specified by:
removeForExperiment
in interfaceDifferentialExpressionAnalysisService
- Parameters:
ee
- the expriment to remove all analyses forincludeSubSets
- also delete analyses of itsExpressionExperimentSubSet
.
-
removeForExperimentAnalyzed
- Specified by:
removeForExperimentAnalyzed
in interfaceDifferentialExpressionAnalysisService
-
removeForExperimentalFactor
Description copied from interface:DifferentialExpressionAnalysisService
Remove analyses using the given factor.- Specified by:
removeForExperimentalFactor
in interfaceDifferentialExpressionAnalysisService
- Returns:
- the number of analysis removed
-
removeForExperimentalFactors
@Transactional public int removeForExperimentalFactors(Collection<ExperimentalFactor> experimentalFactors) - Specified by:
removeForExperimentalFactors
in interfaceDifferentialExpressionAnalysisService
-
findByExperiment
@Transactional(readOnly=true) public Collection<DifferentialExpressionAnalysis> findByExperiment(ExpressionExperiment experiment, boolean includeSubSets) - Specified by:
findByExperiment
in interfaceDifferentialExpressionAnalysisService
- Parameters:
experiment
- experiment analyzedincludeSubSets
- include analyses for itsExpressionExperimentSubSet
- Returns:
- find all the analyses that involved the given investigation
-
findByExperiments
@Transactional(readOnly=true) public Map<BioAssaySet,Collection<DifferentialExpressionAnalysis>> findByExperiments(Collection<ExpressionExperiment> experiments, boolean includeSubSets) - Specified by:
findByExperiments
in interfaceDifferentialExpressionAnalysisService
- Parameters:
experiments
- investigationsincludeSubSets
- include analyses for theirExpressionExperimentSubSet
- Returns:
- Given a collection of investigations returns a Map of Analysis --> collection of Investigations The collection of investigations returned by the map will include all the investigations for the analysis key iff one of the investigations for that analysis was in the given collection started with
-
findByName
@Transactional(readOnly=true) public Collection<DifferentialExpressionAnalysis> findByName(String name) - Specified by:
findByName
in interfaceDifferentialExpressionAnalysisService
-
getExperimentsWithAnalysis
@Transactional(readOnly=true) public Collection<Long> getExperimentsWithAnalysis(Collection<Long> experimentAnalyzedIds, boolean includeSubSets) Description copied from interface:DifferentialExpressionAnalysisService
Obtain IDs of experiments that have analyses.Not secured: for internal use only
- Specified by:
getExperimentsWithAnalysis
in interfaceDifferentialExpressionAnalysisService
- Parameters:
experimentAnalyzedIds
- starting list of experiment IDsincludeSubSets
- include IDs of their subsets that have analyses- Returns:
- the ones which have an analysis
-
getExperimentsWithAnalysis
- Specified by:
getExperimentsWithAnalysis
in interfaceDifferentialExpressionAnalysisService
-