Class ExpressionExperimentServiceImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractService<O>
-
- ubic.gemma.persistence.service.AbstractFilteringVoEnabledService<ExpressionExperiment,ExpressionExperimentValueObject>
-
- ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentServiceImpl
-
- All Implemented Interfaces:
CuratableService<ExpressionExperiment,ExpressionExperimentValueObject>,BaseImmutableService<ExpressionExperiment>,BaseReadOnlyService<ExpressionExperiment>,BaseService<ExpressionExperiment>,BaseVoEnabledService<ExpressionExperiment,ExpressionExperimentValueObject>,ExpressionExperimentService,FilteringService<ExpressionExperiment>,FilteringVoEnabledService<ExpressionExperiment,ExpressionExperimentValueObject>
@Service public class ExpressionExperimentServiceImpl extends AbstractFilteringVoEnabledService<ExpressionExperiment,ExpressionExperimentValueObject> implements ExpressionExperimentService
- Author:
- pavlidis, keshav
- See Also:
ExpressionExperimentService
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentService
ExpressionExperimentService.CharacteristicWithUsageStatisticsAndOntologyTerm
-
-
Field Summary
-
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log
-
Fields inherited from interface ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentService
FREE_TEXT, UNCATEGORIZED
-
-
Constructor Summary
Constructors Constructor Description ExpressionExperimentServiceImpl(ExpressionExperimentDao expressionExperimentDao)
-
Method Summary
-
Methods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledService
count, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getIdentifierPropertyName, getSort, load, load, loadAllValueObjects, loadIds, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjects, loadValueObjects, loadValueObjectsByIds
-
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, 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, findOrFail, getElementClass
-
Methods inherited from interface ubic.gemma.persistence.service.auditAndSecurity.curation.CuratableService
create, create, find, findOrCreate, load, load, load, load, loadAll, loadAllValueObjects, loadIds, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjects, loadValueObjects, loadValueObjectsByIds, save, save, update, update
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringService
count, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getIdentifierPropertyName, getSort
-
-
-
-
Constructor Detail
-
ExpressionExperimentServiceImpl
@Autowired public ExpressionExperimentServiceImpl(ExpressionExperimentDao expressionExperimentDao)
-
-
Method Detail
-
loadReference
@Transactional(readOnly=true) public ExpressionExperiment loadReference(Long id)
- Specified by:
loadReferencein interfaceExpressionExperimentService
-
loadReferences
@Transactional(readOnly=true) public Collection<ExpressionExperiment> loadReferences(Collection<Long> ids)
Description copied from interface:ExpressionExperimentServiceLoad references for the given experiment IDs.- Specified by:
loadReferencesin interfaceExpressionExperimentService
-
loadAllReferences
@Transactional(readOnly=true) public Collection<ExpressionExperiment> loadAllReferences()
Description copied from interface:ExpressionExperimentServiceLoad references for all experiments.References are pre-filtered for ACLs as per
CuratableService.loadIds(Filters, Sort).- Specified by:
loadAllReferencesin interfaceExpressionExperimentService
-
addFactor
@Transactional public ExperimentalFactor addFactor(ExpressionExperiment ee, ExperimentalFactor factor)
- Specified by:
addFactorin interfaceExpressionExperimentService
-
addFactorValue
@Transactional public FactorValue addFactorValue(ExpressionExperiment ee, FactorValue fv)
- Specified by:
addFactorValuein interfaceExpressionExperimentService- Parameters:
ee- experiment.fv- must already have the experimental factor filled in.
-
addFactorValues
@Transactional public void addFactorValues(ExpressionExperiment ee, Map<BioMaterial,FactorValue> fvs)
Description copied from interface:ExpressionExperimentServiceIntended with the case of a continuous factor being added.- Specified by:
addFactorValuesin interfaceExpressionExperimentService
-
addRawDataVectors
@Transactional public int addRawDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, Collection<RawExpressionDataVector> newVectors)
Description copied from interface:ExpressionExperimentServiceUsed when we want to add data for a quantitation type. Does not remove any existing vectors.- Specified by:
addRawDataVectorsin interfaceExpressionExperimentService- Parameters:
ee- experiment to be updated.newVectors- vectors to be added.- Returns:
- the number of added vectors
-
replaceRawDataVectors
@Transactional public int replaceRawDataVectors(ExpressionExperiment ee, QuantitationType qt, Collection<RawExpressionDataVector> vectors)
- Specified by:
replaceRawDataVectorsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentDao.replaceRawDataVectors(ExpressionExperiment, QuantitationType, Collection)
-
replaceAllRawDataVectors
@Transactional public int replaceAllRawDataVectors(ExpressionExperiment ee, Collection<RawExpressionDataVector> newVectors)
Description copied from interface:ExpressionExperimentServiceUsed when we are replacing data, such as when converting an experiment from one platform to another. Examples would be exon array or RNA-seq data sets, or other situations where we are replacing data. Does not take care of computing the processed data vectors, but it does clear them out.- Specified by:
replaceAllRawDataVectorsin interfaceExpressionExperimentService- Parameters:
ee- experimentnewVectors- If they are from more than one platform, that will be dealt with.- Returns:
- the number of vectors replaced
-
removeAllRawDataVectors
@Transactional public int removeAllRawDataVectors(ExpressionExperiment ee)
- Specified by:
removeAllRawDataVectorsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentDao.removeAllRawDataVectors(ExpressionExperiment)
-
removeRawDataVectors
@Transactional public int removeRawDataVectors(ExpressionExperiment ee, QuantitationType qt)
- Specified by:
removeRawDataVectorsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentDao.removeRawDataVectors(ExpressionExperiment, QuantitationType)
-
createProcessedDataVectors
@Transactional public void createProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors)
- Specified by:
createProcessedDataVectorsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentDao.createProcessedDataVectors(ExpressionExperiment, Collection)
-
removeProcessedDataVectors
@Transactional public int removeProcessedDataVectors(ExpressionExperiment ee)
- Specified by:
removeProcessedDataVectorsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentDao.removeProcessedDataVectors(ExpressionExperiment)
-
replaceProcessedDataVectors
@Transactional public int replaceProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors)
- Specified by:
replaceProcessedDataVectorsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentDao.replaceProcessedDataVectors(ExpressionExperiment, Collection)
-
browse
@Transactional(readOnly=true) public List<ExpressionExperiment> browse(int start, int limit)
- Specified by:
browsein interfaceExpressionExperimentService
-
filter
@Transactional(readOnly=true) public Collection<Long> filter(String searchString) throws SearchException
returns ids of search results- Specified by:
filterin interfaceExpressionExperimentService- Parameters:
searchString- search string- Returns:
- collection of ids or an empty collection
- Throws:
SearchException
-
filterByTaxon
@Transactional(readOnly=true) public Collection<Long> filterByTaxon(Collection<Long> ids, Taxon taxon)
Description copied from interface:ExpressionExperimentServiceRemove IDs of Experiments that are not from the given taxon.- Specified by:
filterByTaxonin interfaceExpressionExperimentService- Parameters:
ids- collection to purge.taxon- taxon to retain.- Returns:
- purged IDs.
-
loadWithPrimaryPublication
@Transactional(readOnly=true) public ExpressionExperiment loadWithPrimaryPublication(Long id)
- Specified by:
loadWithPrimaryPublicationin interfaceExpressionExperimentService
-
loadWithMeanVarianceRelation
@Transactional(readOnly=true) public ExpressionExperiment loadWithMeanVarianceRelation(Long id)
- Specified by:
loadWithMeanVarianceRelationin interfaceExpressionExperimentService
-
findByAccession
@Transactional(readOnly=true) public Collection<ExpressionExperiment> findByAccession(DatabaseEntry accession)
- Specified by:
findByAccessionin interfaceExpressionExperimentService- Parameters:
accession- accession- Returns:
- Experiments which have the given accession. There can be more than one, because one GEO accession can result in multiple experiments in Gemma.
- See Also:
ExpressionExperimentService.findByAccession(DatabaseEntry)
-
findByAccession
@Transactional(readOnly=true) public Collection<ExpressionExperiment> findByAccession(String accession)
- Specified by:
findByAccessionin interfaceExpressionExperimentService
-
findByBibliographicReference
@Transactional(readOnly=true) public Collection<ExpressionExperiment> findByBibliographicReference(BibliographicReference bibRef)
- Specified by:
findByBibliographicReferencein interfaceExpressionExperimentService- Parameters:
bibRef- bibliographic reference- Returns:
- a collection of EE that have that reference that BibliographicReference
- See Also:
ExpressionExperimentService.findByBibliographicReference(BibliographicReference)
-
findByBioAssay
@Transactional(readOnly=true) public ExpressionExperiment findByBioAssay(BioAssay ba)
- Specified by:
findByBioAssayin interfaceExpressionExperimentService- Parameters:
ba- bio material- Returns:
- experiment the given bioassay is associated with
- See Also:
ExpressionExperimentService.findByBioAssay(BioAssay)
-
findByBioMaterial
@Transactional(readOnly=true) public ExpressionExperiment findByBioMaterial(BioMaterial bm)
- Specified by:
findByBioMaterialin interfaceExpressionExperimentService- Parameters:
bm- bio material- Returns:
- experiment the given biomaterial is associated with
- See Also:
ExpressionExperimentService.findByBioMaterial(BioMaterial)
-
findByBioMaterials
@Transactional(readOnly=true) public Map<ExpressionExperiment,BioMaterial> findByBioMaterials(Collection<BioMaterial> bioMaterials)
- Specified by:
findByBioMaterialsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.findByBioMaterials(Collection)
-
findByExpressedGene
@Transactional(readOnly=true) public Collection<ExpressionExperiment> findByExpressedGene(Gene gene, double rank)
- Specified by:
findByExpressedGenein interfaceExpressionExperimentService- Parameters:
gene- generank- rank- Returns:
- a collection of expression experiment ids that express the given gene above the given expression level
- See Also:
ExpressionExperimentService.findByExpressedGene(Gene, double)
-
findByDesign
@Transactional(readOnly=true) public ExpressionExperiment findByDesign(ExperimentalDesign ed)
- Specified by:
findByDesignin interfaceExpressionExperimentService
-
findByFactor
@Transactional(readOnly=true) public ExpressionExperiment findByFactor(ExperimentalFactor factor)
- Specified by:
findByFactorin interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.findByFactor(ExperimentalFactor)
-
findByFactorValue
@Transactional(readOnly=true) public ExpressionExperiment findByFactorValue(FactorValue factorValue)
- Specified by:
findByFactorValuein interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.findByFactorValue(FactorValue)
-
findByFactorValue
@Transactional(readOnly=true) public ExpressionExperiment findByFactorValue(Long factorValueId)
- Specified by:
findByFactorValuein interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.findByFactorValue(FactorValue)
-
findByFactorValues
@Transactional(readOnly=true) public Map<ExpressionExperiment,FactorValue> findByFactorValues(Collection<FactorValue> factorValues)
- Specified by:
findByFactorValuesin interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.findByFactorValues(Collection)
-
findByGene
@Transactional(readOnly=true) public Collection<ExpressionExperiment> findByGene(Gene gene)
- Specified by:
findByGenein interfaceExpressionExperimentService- Parameters:
gene- gene- Returns:
- a collection of expression experiments that have an AD that detects the given Gene (ie a probe on the AD hybridizes to the given Gene)
- See Also:
ExpressionExperimentService.findByGene(Gene)
-
findByName
@Transactional(readOnly=true) public Collection<ExpressionExperiment> findByName(String name)
- Specified by:
findByNamein interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.findByName(String)
-
findByQuantitationType
@Transactional(readOnly=true) public ExpressionExperiment findByQuantitationType(QuantitationType type)
- Specified by:
findByQuantitationTypein interfaceExpressionExperimentService
-
findByShortName
@Transactional(readOnly=true) public ExpressionExperiment findByShortName(String shortName)
- Specified by:
findByShortNamein interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.findByShortName(String)
-
findByTaxon
@Transactional(readOnly=true) public Collection<ExpressionExperiment> findByTaxon(Taxon taxon)
- Specified by:
findByTaxonin interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.findByTaxon(Taxon)
-
findByUpdatedLimit
@Transactional(readOnly=true) public List<ExpressionExperiment> findByUpdatedLimit(int limit)
- Specified by:
findByUpdatedLimitin interfaceExpressionExperimentService
-
findUpdatedAfter
@Transactional(readOnly=true) public Collection<ExpressionExperiment> findUpdatedAfter(Date date)
- Specified by:
findUpdatedAfterin interfaceExpressionExperimentService
-
getAnnotationCountsByIds
@Transactional(readOnly=true) public Map<Long,Long> getAnnotationCountsByIds(Collection<Long> ids)
- Specified by:
getAnnotationCountsByIdsin interfaceExpressionExperimentService- Parameters:
ids- ids- Returns:
- the map of ids to number of terms associated with each expression experiment.
-
getAnnotationsById
@Transactional(readOnly=true) public Set<AnnotationValueObject> getAnnotationsById(Long eeId)
- Specified by:
getAnnotationsByIdin interfaceExpressionExperimentService- Parameters:
eeId- experiment id.- Returns:
- the terms associated this expression experiment.
-
getFiltersWithInferredAnnotations
public Filters getFiltersWithInferredAnnotations(Filters f, @Nullable Collection<OntologyTerm> mentionedTerms, @Nullable Collection<OntologyTerm> inferredTerms, long timeout, TimeUnit timeUnit) throws TimeoutException
The approach here is to construct a collection for each sub-clause in the expression that regroups all the predicates that apply to characteristics as well as their inferred terms.The transformation only applies to properties that represent
Characteristicobjects such ascharacteristics,allCharacteristics,bioAssays.sample.characteristicsandexperimentalDesign.experimentalFactors.factorValues.characteristicsGiven
characteristics.valueUri = a, we construct a collection clause such ascharacteristics.valueUri in (a, children of a...).For efficiency, all the terms mentioned in a sub-clause are grouped by
ExpressionExperimentServiceImpl.SubClauseKeyand aggregated in a single collection. If a term is mentioned multiple times, it is simplified as a single appearance in the collection.For example,
characteristics.termUri = a or characteristics.termUri = bwill be transformed intocharacteristics.termUri in (a, b, children of a and b...).- Specified by:
getFiltersWithInferredAnnotationsin interfaceExpressionExperimentServicementionedTerms- if non-null, all the terms explicitly mentioned in the filters are added to the collection.inferredTerms- if non-null, all the terms inferred from those mentioned in the filters are added to the collection- Throws:
TimeoutException
-
loadWithCharacteristics
@Transactional(readOnly=true) public ExpressionExperiment loadWithCharacteristics(Long id)
- Specified by:
loadWithCharacteristicsin interfaceExpressionExperimentService
-
loadBioAssaySet
@Transactional(readOnly=true) public BioAssaySet loadBioAssaySet(Long id)
Description copied from interface:ExpressionExperimentServiceLoad aBioAssaySetby ID which can be either aExpressionExperimentor aExpressionExperimentSubSet.- Specified by:
loadBioAssaySetin interfaceExpressionExperimentService
-
loadAndThawLiteOrFail
@Transactional(readOnly=true) public <T extends Exception> ExpressionExperiment loadAndThawLiteOrFail(Long id, Function<String,T> exceptionSupplier, String message) throws T extends Exception
Description copied from interface:ExpressionExperimentServiceLoad an experiment and thaw it as perExpressionExperimentService.thawLite(ExpressionExperiment)or fail with the supplied exception and message.- Specified by:
loadAndThawLiteOrFailin interfaceExpressionExperimentService- Throws:
T extends Exception
-
loadAndThaw
@Nullable @Transactional(readOnly=true) public ExpressionExperiment loadAndThaw(Long id)
Description copied from interface:ExpressionExperimentServiceLoad an experiment and thaw it as perExpressionExperimentService.thaw(ExpressionExperiment).- Specified by:
loadAndThawin interfaceExpressionExperimentService
-
loadAndThawWithRefreshCacheMode
@Transactional(readOnly=true) public ExpressionExperiment loadAndThawWithRefreshCacheMode(Long id)
Description copied from interface:ExpressionExperimentServiceLoad an experiment without cache and thaw it as perExpressionExperimentService.thaw(ExpressionExperiment)withCacheMode.REFRESH.This has the side effect of refreshing the cache with the latest data. Since this can be expensive, only administrators are allowed to do this.
- Specified by:
loadAndThawWithRefreshCacheModein interfaceExpressionExperimentService
-
loadAndThawLiteWithRefreshCacheMode
@Transactional(readOnly=true) public ExpressionExperiment loadAndThawLiteWithRefreshCacheMode(Long id)
Description copied from interface:ExpressionExperimentServiceA lightweight version ofExpressionExperimentService.loadAndThawWithRefreshCacheMode(Long)which thaws as perExpressionExperimentService.thawLite(ExpressionExperiment).- Specified by:
loadAndThawLiteWithRefreshCacheModein interfaceExpressionExperimentService
-
loadAndThawOrFail
@Transactional(readOnly=true) public <T extends Exception> ExpressionExperiment loadAndThawOrFail(Long id, Function<String,T> exceptionSupplier, String message) throws T extends Exception
Description copied from interface:ExpressionExperimentServiceLoad an experiment and thaw it as perExpressionExperimentService.thawLite(ExpressionExperiment)or fail with the supplied exception and message.- Specified by:
loadAndThawOrFailin interfaceExpressionExperimentService- Throws:
T extends Exception
-
loadIdsWithCache
@Transactional(readOnly=true) public List<Long> loadIdsWithCache(@Nullable Filters filters, @Nullable Sort sort)
- Specified by:
loadIdsWithCachein interfaceExpressionExperimentService
-
countWithCache
@Transactional(readOnly=true) public long countWithCache(@Nullable Filters filters, @Nullable Set<Long> extraIds)
- Specified by:
countWithCachein interfaceExpressionExperimentService
-
loadValueObjectsWithCache
@Transactional(readOnly=true) public Slice<ExpressionExperimentValueObject> loadValueObjectsWithCache(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit)
- Specified by:
loadValueObjectsWithCachein interfaceExpressionExperimentService
-
getCategoriesUsageFrequency
@Transactional(readOnly=true) public Map<Characteristic,Long> getCategoriesUsageFrequency(@Nullable Filters filters, @Nullable Set<Long> extraIds, @Nullable Collection<String> excludedCategoryUris, @Nullable Collection<String> excludedTermUris, @Nullable Collection<String> retainedTermUris, int maxResults)
Description copied from interface:ExpressionExperimentServiceObtain category usage frequency for datasets matching the given filter.- Specified by:
getCategoriesUsageFrequencyin interfaceExpressionExperimentService- Parameters:
filters- filters restricting the terms to a given set of datasetsexcludedCategoryUris- ensure that the given category URIs are excludedexcludedTermUris- ensure that the given term URIs and their sub-terms (as persubClassOfrelation) are excluded; this requires relevant ontologies to be loaded inOntologyService.retainedTermUris- ensure that the given terms are retained (overrides any exclusion from minFrequency and excludedTermUris)maxResults- maximum number of results to return
-
getAnnotationsUsageFrequency
@Transactional(readOnly=true) public List<ExpressionExperimentService.CharacteristicWithUsageStatisticsAndOntologyTerm> getAnnotationsUsageFrequency(@Nullable Filters filters, @Nullable Set<Long> extraIds, @Nullable String category, @Nullable Collection<String> excludedCategoryUris, @Nullable Collection<String> excludedTermUris, int minFrequency, @Nullable Collection<String> retainedTermUris, int maxResults)
If the term cannot be resolved viaOntologyService.getTerm(String), an attempt is done to resolve its category and assign it as its parent. This handles free-text terms that lack a value URI.- Specified by:
getAnnotationsUsageFrequencyin interfaceExpressionExperimentService- Parameters:
filters- filters restricting the terms to a given set of datasetscategory- a category to restrict annotations to, or null to include all categoriesexcludedCategoryUris- ensure that the given category URIs are excludedexcludedTermUris- ensure that the given term URIs and their sub-terms (as persubClassOfrelation) are excluded; this requires relevant ontologies to be loaded inOntologyService.minFrequency- minimum occurrences of a term to be included in the resultsretainedTermUris- ensure that the given terms are retained (overrides any exclusion from minFrequency and excludedTermUris)maxResults- maximum number of results to return- Returns:
- mapping annotations grouped by category and term (URI or value if null) to their number of occurrences in the matched datasets and ordered in descending number of associated experiments
- See Also:
ExpressionExperimentDao.getAnnotationsUsageFrequency(Collection, Class, int, int, String, Collection, Collection, Collection)
-
getArrayDesignsUsed
@Transactional(readOnly=true) public Collection<ArrayDesign> getArrayDesignsUsed(BioAssaySet expressionExperiment)
- Specified by:
getArrayDesignsUsedin interfaceExpressionExperimentService- Parameters:
expressionExperiment- experiment- Returns:
- a collection of ArrayDesigns referenced by any of the BioAssays that make up the given ExpressionExperiment.
-
getTechnologyTypeUsageFrequency
@Transactional(readOnly=true) public Map<TechnologyType,Long> getTechnologyTypeUsageFrequency(@Nullable Filters filters, @Nullable Set<Long> extraIds)
- Specified by:
getTechnologyTypeUsageFrequencyin interfaceExpressionExperimentService
-
getArrayDesignUsedOrOriginalPlatformUsageFrequency
@Transactional(readOnly=true) public Map<ArrayDesign,Long> getArrayDesignUsedOrOriginalPlatformUsageFrequency(@Nullable Filters filters, @Nullable Set<Long> extraIds, int maxResults)
Description copied from interface:ExpressionExperimentServiceCalculate the usage frequency of platforms by the datasets matching the provided filters.- Specified by:
getArrayDesignUsedOrOriginalPlatformUsageFrequencyin interfaceExpressionExperimentService- Parameters:
filters- a set of filters to be applied as perCuratableService.load(Filters, Sort, int, int)maxResults- the maximum of results, or unlimited if less than 1
-
getTaxaUsageFrequency
@Transactional(readOnly=true) public Map<Taxon,Long> getTaxaUsageFrequency(@Nullable Filters filters, @Nullable Set<Long> extraIds)
Description copied from interface:ExpressionExperimentServiceCalculate the usage frequency of taxa by the datasets matching the provided filters.If no filters are supplied (either being null or empty), the
ExpressionExperimentService.getPerTaxonCount()fast path is used.- Specified by:
getTaxaUsageFrequencyin interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.getPerTaxonCount()
-
getBioAssayDimensions
@Transactional(readOnly=true) public Collection<BioAssayDimension> getBioAssayDimensions(ExpressionExperiment expressionExperiment)
- Specified by:
getBioAssayDimensionsin interfaceExpressionExperimentService- Parameters:
expressionExperiment- experiment- Returns:
- the BioAssayDimensions for the study.
-
getBioMaterialCount
@Transactional(readOnly=true) public long getBioMaterialCount(ExpressionExperiment expressionExperiment)
- Specified by:
getBioMaterialCountin interfaceExpressionExperimentService- Parameters:
expressionExperiment- experiment- Returns:
- the amount of biomaterials associated with the given expression experiment.
-
getDesignElementDataVectorCount
@Transactional(readOnly=true) public long getDesignElementDataVectorCount(ExpressionExperiment ee)
- Specified by:
getDesignElementDataVectorCountin interfaceExpressionExperimentService
-
getExperimentsWithOutliers
@Transactional(readOnly=true) public Collection<ExpressionExperiment> getExperimentsWithOutliers()
- Specified by:
getExperimentsWithOutliersin interfaceExpressionExperimentService
-
getLastArrayDesignUpdate
@Transactional(readOnly=true) public Map<Long,Date> getLastArrayDesignUpdate(Collection<ExpressionExperiment> expressionExperiments)
- Specified by:
getLastArrayDesignUpdatein interfaceExpressionExperimentService
-
getLastArrayDesignUpdate
@Transactional(readOnly=true) public Date getLastArrayDesignUpdate(ExpressionExperiment ee)
- Specified by:
getLastArrayDesignUpdatein interfaceExpressionExperimentService- Parameters:
ee- experiment- Returns:
- the date of the last time any of the array designs associated with this experiment were updated.
-
getLastLinkAnalysis
@Transactional(readOnly=true) public Map<Long,AuditEvent> getLastLinkAnalysis(Collection<Long> ids)
- Specified by:
getLastLinkAnalysisin interfaceExpressionExperimentService- Parameters:
ids- ids- Returns:
- AuditEvents of the latest link analyses for the specified expression experiment ids. This returns a map of id -> AuditEvent. If the events do not exist, the map entry will point to null.
-
getLastMissingValueAnalysis
@Transactional(readOnly=true) public Map<Long,AuditEvent> getLastMissingValueAnalysis(Collection<Long> ids)
- Specified by:
getLastMissingValueAnalysisin interfaceExpressionExperimentService- Parameters:
ids- ids- Returns:
- AuditEvents of the latest missing value analysis for the specified expression experiment ids. This returns a map of id -> AuditEvent. If the events do not exist, the map entry will point to null.
-
getLastProcessedDataUpdate
@Transactional(readOnly=true) public Map<Long,AuditEvent> getLastProcessedDataUpdate(Collection<Long> ids)
- Specified by:
getLastProcessedDataUpdatein interfaceExpressionExperimentService- Parameters:
ids- ids- Returns:
- AuditEvents of the latest rank computation for the specified expression experiment ids. This returns a map of id -> AuditEvent. If the events do not exist, the map entry will point to null.
-
getPerTaxonCount
@Transactional(readOnly=true) public Map<Taxon,Long> getPerTaxonCount()
- Specified by:
getPerTaxonCountin interfaceExpressionExperimentService- Returns:
- counts of expression experiments grouped by taxon
-
getPopulatedFactorCounts
@Transactional(readOnly=true) public Map<Long,Long> getPopulatedFactorCounts(Collection<Long> ids)
- Specified by:
getPopulatedFactorCountsin interfaceExpressionExperimentService- Parameters:
ids- ids- Returns:
- map of ids to how many factor values the experiment has, counting only factor values which are associated with biomaterials.
-
getPopulatedFactorCountsExcludeBatch
@Transactional(readOnly=true) public Map<Long,Long> getPopulatedFactorCountsExcludeBatch(Collection<Long> ids)
- Specified by:
getPopulatedFactorCountsExcludeBatchin interfaceExpressionExperimentService- Parameters:
ids- ids- Returns:
- map of ids to how many factor values the experiment has, counting only factor values which are associated with biomaterials and only factors that aren't batch
-
getPreferredQuantitationType
@Transactional(readOnly=true) public QuantitationType getPreferredQuantitationType(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentServiceIterates over the quantitation types for a given expression experiment and returns the preferred quantitation types.- Specified by:
getPreferredQuantitationTypein interfaceExpressionExperimentService- Parameters:
ee- experiment- Returns:
- quantitation types
-
hasProcessedExpressionData
@Transactional(readOnly=true) public boolean hasProcessedExpressionData(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentServiceTest if the given experiment has processed data vectors.- Specified by:
hasProcessedExpressionDatain interfaceExpressionExperimentService
-
getQuantitationTypeCount
@Transactional(readOnly=true) public Map<QuantitationType,Long> getQuantitationTypeCount(ExpressionExperiment ee)
- Specified by:
getQuantitationTypeCountin interfaceExpressionExperimentService- Returns:
- counts design element data vectors grouped by quantitation type
-
getQuantitationTypes
@Transactional(readOnly=true) public Collection<QuantitationType> getQuantitationTypes(ExpressionExperiment expressionExperiment)
- Specified by:
getQuantitationTypesin interfaceExpressionExperimentService- Parameters:
expressionExperiment- experiment- Returns:
- all the quantitation types used by the given expression experiment
-
getQuantitationTypeValueObjects
@Transactional(readOnly=true) public Collection<QuantitationTypeValueObject> getQuantitationTypeValueObjects(ExpressionExperiment expressionExperiment)
Description copied from interface:ExpressionExperimentServiceLoad allQuantitationTypeassociated to an expression experiment as VOs.- Specified by:
getQuantitationTypeValueObjectsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentService.getQuantitationTypes(ExpressionExperiment)
-
getSampleRemovalEvents
@Transactional(readOnly=true) public Map<ExpressionExperiment,Collection<AuditEvent>> getSampleRemovalEvents(Collection<ExpressionExperiment> expressionExperiments)
- Specified by:
getSampleRemovalEventsin interfaceExpressionExperimentService
-
getSubSets
@Transactional(readOnly=true) public Collection<ExpressionExperimentSubSet> getSubSets(ExpressionExperiment expressionExperiment)
- Specified by:
getSubSetsin interfaceExpressionExperimentService- Parameters:
expressionExperiment- experiment- Returns:
- any ExpressionExperimentSubSets this Experiment might have.
-
getTaxa
@Transactional(readOnly=true) public <T extends BioAssaySet> Map<T,Taxon> getTaxa(Collection<T> bioAssaySets)
Description copied from interface:ExpressionExperimentServiceReturn the taxon for each of the given experiments (or subsets).- Specified by:
getTaxain interfaceExpressionExperimentService
-
getTaxon
@Transactional(readOnly=true) public Taxon getTaxon(BioAssaySet bioAssaySet)
Description copied from interface:ExpressionExperimentServiceReturns the taxon of the given experiment or subset.- Specified by:
getTaxonin interfaceExpressionExperimentService- Parameters:
bioAssaySet- bioAssaySet.- Returns:
- taxon, or null if the experiment taxon cannot be determined (i.e., if it has no samples).
-
isRNASeq
@Transactional(readOnly=true) public boolean isRNASeq(ExpressionExperiment expressionExperiment)
- Specified by:
isRNASeqin interfaceExpressionExperimentService- Parameters:
expressionExperiment- ee- Returns:
- true if this experiment was run on a sequencing-based platform.
-
isTroubled
@Transactional(readOnly=true) public boolean isTroubled(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentServiceCheck if the dataset is either troubled or uses a troubled platform.- Specified by:
isTroubledin interfaceExpressionExperimentService- Parameters:
ee- the expression experiment to be checked for trouble. This method will usually be preferred over checking the curation details of the object directly, as this method also checks all the array designs the given experiment belongs to.- Returns:
- true, if the given experiment, or any of its parenting array designs is troubled. False otherwise
-
loadDetailsValueObjects
@Transactional(readOnly=true) public Slice<ExpressionExperimentDetailsValueObject> loadDetailsValueObjects(@Nullable Collection<Long> ids, @Nullable Taxon taxon, @Nullable Sort sort, int offset, int limit)
- Specified by:
loadDetailsValueObjectsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentDao.loadDetailsValueObjects(Collection, Taxon, Sort, int, int)
-
loadDetailsValueObjectsWithCache
@Transactional(readOnly=true) public Slice<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsWithCache(Collection<Long> ids, @Nullable Taxon taxon, @Nullable Sort sort, int offset, int limit)
- Specified by:
loadDetailsValueObjectsWithCachein interfaceExpressionExperimentService
-
loadDetailsValueObjectsByIds
@Transactional(readOnly=true) public List<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIds(Collection<Long> ids)
- Specified by:
loadDetailsValueObjectsByIdsin interfaceExpressionExperimentService
-
loadDetailsValueObjectsByIdsWithCache
@Transactional(readOnly=true) public List<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIdsWithCache(Collection<Long> ids)
- Specified by:
loadDetailsValueObjectsByIdsWithCachein interfaceExpressionExperimentService
-
loadBlacklistedValueObjects
@Transactional(readOnly=true) public Slice<ExpressionExperimentValueObject> loadBlacklistedValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit)
- Specified by:
loadBlacklistedValueObjectsin interfaceExpressionExperimentService
-
loadLackingFactors
@Transactional(readOnly=true) public Collection<ExpressionExperiment> loadLackingFactors()
- Specified by:
loadLackingFactorsin interfaceExpressionExperimentService
-
loadLackingTags
@Transactional(readOnly=true) public Collection<ExpressionExperiment> loadLackingTags()
- Specified by:
loadLackingTagsin interfaceExpressionExperimentService
-
loadValueObjectsByIdsWithRelationsAndCache
@Transactional(readOnly=true) public List<ExpressionExperimentValueObject> loadValueObjectsByIdsWithRelationsAndCache(List<Long> ids)
Description copied from interface:ExpressionExperimentServiceLoad VOs for the given dataset IDs and initialize their relations likeCuratableService.load(Filters, Sort).The order of VOs is preserved.
- Specified by:
loadValueObjectsByIdsWithRelationsAndCachein interfaceExpressionExperimentService
-
loadValueObjectsByIds
@Transactional(readOnly=true) public List<ExpressionExperimentValueObject> loadValueObjectsByIds(List<Long> ids, boolean maintainOrder)
Description copied from interface:ExpressionExperimentServiceVariant ofCuratableService.loadValueObjectsByIds(Collection)that preserve its input order.- Specified by:
loadValueObjectsByIdsin interfaceExpressionExperimentService- Parameters:
ids- ids to loadmaintainOrder- If true, order of valueObjects returned will correspond to order of ids passed in.- Returns:
- value objects
-
addCharacteristic
@Transactional public void addCharacteristic(ExpressionExperiment ee, Characteristic vc)
Will add the characteristic to the expression experiment and persist the changes.- Specified by:
addCharacteristicin interfaceExpressionExperimentService- Parameters:
ee- the experiment to add the characteristics to.vc- If the evidence code is null, it will be filled in with IC. A category and value must be provided.
-
thaw
@Transactional(readOnly=true) public ExpressionExperiment thaw(ExpressionExperiment expressionExperiment)
- Specified by:
thawin interfaceExpressionExperimentService
-
thawBioAssays
@Transactional(readOnly=true) public ExpressionExperiment thawBioAssays(ExpressionExperiment expressionExperiment)
- Specified by:
thawBioAssaysin interfaceExpressionExperimentService
-
thawLite
@Transactional(readOnly=true) public ExpressionExperiment thawLite(ExpressionExperiment expressionExperiment)
Description copied from interface:ExpressionExperimentServicePartially thaw the expression experiment given - do not thaw the raw data.- Specified by:
thawLitein interfaceExpressionExperimentService- Parameters:
expressionExperiment- experiment- Returns:
- thawed experiment
-
thawLiter
@Transactional(readOnly=true) public ExpressionExperiment thawLiter(ExpressionExperiment expressionExperiment)
- Specified by:
thawLiterin interfaceExpressionExperimentService
-
remove
@Transactional public void remove(Long id)
Description copied from interface:BaseImmutableServiceRemoves the entity with given ID from the persistent storage.- Specified by:
removein interfaceBaseImmutableService<ExpressionExperiment>- Specified by:
removein interfaceCuratableService<ExpressionExperiment,ExpressionExperimentValueObject>- Overrides:
removein classAbstractService<ExpressionExperiment>- Parameters:
id- the ID of entity to be removed.
-
remove
@Transactional public void remove(ExpressionExperiment ee)
Deletes an experiment and all of its associated objects, including coexpression links. Some types of associated objects may need to be deleted before this can be run (example: analyses involving multiple experiments; these will not be deleted automatically).- Specified by:
removein interfaceBaseImmutableService<ExpressionExperiment>- Specified by:
removein interfaceCuratableService<ExpressionExperiment,ExpressionExperimentValueObject>- Overrides:
removein classAbstractService<ExpressionExperiment>- Parameters:
ee- the entity to be removed.
-
remove
@Transactional public void remove(Collection<ExpressionExperiment> entities)
Description copied from interface:BaseImmutableServiceRemoves all the given entities from persistent storage.- Specified by:
removein interfaceBaseImmutableService<ExpressionExperiment>- Overrides:
removein classAbstractService<ExpressionExperiment>- Parameters:
entities- the entities to be removed.
-
isBlackListed
@Transactional(readOnly=true) public boolean isBlackListed(String geoAccession)
- Specified by:
isBlackListedin interfaceExpressionExperimentService
-
isSuitableForDEA
@Transactional(readOnly=true) public Boolean isSuitableForDEA(ExpressionExperiment ee)
- Specified by:
isSuitableForDEAin interfaceExpressionExperimentService- Returns:
- true if the experiment is not explicitly marked as unsuitable for DEA; false otherwise.
-
getExperimentsLackingPublications
@Transactional(readOnly=true) public Collection<ExpressionExperiment> getExperimentsLackingPublications()
- Specified by:
getExperimentsLackingPublicationsin interfaceExpressionExperimentService- Returns:
- collection of GEO experiments which lack an association with a publication (non-GEO experiments will be ignored)
-
updateMeanVarianceRelation
@Transactional public MeanVarianceRelation updateMeanVarianceRelation(ExpressionExperiment ee, MeanVarianceRelation mvr)
- Specified by:
updateMeanVarianceRelationin interfaceExpressionExperimentService
-
countBioMaterials
@Transactional(readOnly=true) public long countBioMaterials(@Nullable Filters filters)
- Specified by:
countBioMaterialsin interfaceExpressionExperimentService- See Also:
ExpressionExperimentDao.countBioMaterials(Filters)
-
getFilterablePropertyConfigAttributes
public Collection<org.springframework.security.access.ConfigAttribute> getFilterablePropertyConfigAttributes(String property)
Checks for special properties that are allowed to be referenced on certain objects. E.g. characteristics on EEs. Obtain the Spring Security config attributes for a given property.- Specified by:
getFilterablePropertyConfigAttributesin interfaceFilteringService<ExpressionExperiment>- Overrides:
getFilterablePropertyConfigAttributesin classAbstractFilteringVoEnabledService<ExpressionExperiment,ExpressionExperimentValueObject>- Returns:
- the config attributes, or null if no security check should be performed
-
-