Class ExpressionExperimentServiceImpl
- All Implemented Interfaces:
BaseImmutableService<ExpressionExperiment>, BaseReadOnlyService<ExpressionExperiment>, BaseService<ExpressionExperiment>, BaseVoEnabledService<ExpressionExperiment, ExpressionExperimentValueObject>, SecurableBaseImmutableService<ExpressionExperiment>, SecurableBaseReadOnlyService<ExpressionExperiment>, SecurableBaseService<ExpressionExperiment>, SecurableBaseVoEnabledService<ExpressionExperiment, ExpressionExperimentValueObject>, SecurableFilteringVoEnabledService<ExpressionExperiment, ExpressionExperimentValueObject>, ExpressionExperimentService, FilteringService<ExpressionExperiment>, FilteringVoEnabledService<ExpressionExperiment, ExpressionExperimentValueObject>
- Author:
- pavlidis, keshav
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ExpressionExperimentService
ExpressionExperimentService.CharacteristicWithUsageStatisticsAndOntologyTerm -
Field Summary
Fields inherited from class AbstractService
logFields inherited from interface ExpressionExperimentService
FREE_TEXT, UNCATEGORIZED -
Constructor Summary
ConstructorsConstructorDescriptionExpressionExperimentServiceImpl(ExpressionExperimentDao expressionExperimentDao) -
Method Summary
Modifier and TypeMethodDescriptionPer-tag REST-write counterpart toaddCharacteristic(ExpressionExperiment, Characteristic).addAnnotation(ExpressionExperiment ee, Characteristic vc, String reason) Reason-carrying overload.voidWill add the vocab characteristic to the expression experiment and persist the changes.addFactor(ExpressionExperiment ee, ExperimentalFactor factor) voidaddFactorValues(ExpressionExperiment ee, Map<BioMaterial, FactorValue> fvs) Intended with the case of a continuous factor being added.intaddRawDataVectors(ExpressionExperiment ee, QuantitationType quantitationType, Collection<RawExpressionDataVector> newVectors) Used when we want to add data for a quantitation type.Applyproposedas the experiment's newExperimentalDesign.browse(int start, int limit) commitCuration(ExpressionExperiment ee, CurationCommitRequest request, boolean dryRun) Apply an all-or-none curation commit toee, reconciling the sections carried inrequestin a single transaction (phase 1: basics + publications).longcountBioMaterials(Filters filters) longcountWithCache(Filters filters, Set<Long> extraIds) Count the number of experiments that match the given filters.intcreateProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors) Create a new set of processed vectors for an experiment.booleanexistsByShortName(String shortName) Check if a dataset with a given short name.returns ids of search results.filterByTaxon(Collection<Long> ids, Taxon taxon) Remove IDs of Experiments that are not from the given taxon.findByAccession(String accession) findByAccession(DatabaseEntry accession) findByBioAssay(BioAssay ba, boolean includeSubSets) findByBioMaterial(BioMaterial bm, boolean includeSubSets) findByBioMaterials(Collection<BioMaterial> biomaterials) findByDesignId(Long designId) findByExpressedGene(Gene gene, double rank) findByFactor(ExperimentalFactor factor) findByFactors(Collection<ExperimentalFactor> factors) findByFactorValue(FactorValue factorValue) findByFactorValueId(Long factorValueId) findByFactorValueIds(Collection<Long> factorValueIds) findByFactorValues(Collection<FactorValue> factorValues) findByGene(Gene gene) findByName(String name) findByShortName(String shortName) findByShortNameAndThawLite(String shortName) findByShortNameWithPrimaryPublication(String shortName) findByTaxon(Taxon taxon) findByUpdatedLimit(int limit) findIdByBioAssay(BioAssay ba, boolean includeSubSets) findIdByDesign(ExperimentalDesign design) findIdByFactor(ExperimentalFactor factor) findIdByFactorValue(FactorValue factorValue) findIdsByBioMaterial(BioMaterial bm, boolean includeSubSets) findOneByAccession(String accession) findOneByName(String name) findUpdatedAfter(Date date) getAnnotations(ExpressionExperiment expressionExperiment) Retrieve annotations for a given experiment.getAnnotations(ExpressionExperiment expressionExperiment, boolean includeFreeText) Retrieve annotations for a given experiment, optionally including unmapped ones.Retrieve annotations for a given experiment subset.getAnnotations(ExpressionExperimentSubSet ee, boolean includeFreeText) Retrieve annotations for a given experiment subset, optionally including unmapped ones.getAnnotationsUsageFrequency(Filters filters, Set<Long> extraIds, String category, Collection<String> excludedCategoryUris, Collection<String> excludedTermUris, int minFrequency, Collection<String> retainedTermUris, int maxResults, boolean includePredicates, boolean includeObjects, long timeout, TimeUnit timeUnit) Obtain annotation usage frequency for datasets matching the given filters.getArrayDesignsUsed(ExpressionExperiment expressionExperiment) Obtain a collection ofArrayDesignused by a specific set of vectors.getArrayDesignsUsed(ExpressionExperiment ee, QuantitationType qt, Class<? extends DataVector> vectorType) Obtain a collection ofArrayDesignused by a specific set of vectors.getArrayDesignsUsedByExperiment(Collection<ExpressionExperiment> expressionExperiments) Per-experiment map of array designs used: one HQL covers all supplied EEs and the result preserves which platform belongs to which EE.getArrayDesignUsedOrOriginalPlatformUsageFrequency(Filters filters, Set<Long> extraIds, int maxResults) Calculate the usage frequency of platforms by the datasets matching the provided filters.Obtain the dimension associated to the given quantitation type for the given experiment.getBioAssayDimension(ExpressionExperiment ee, QuantitationType qt, Class<? extends BulkExpressionDataVector> dataVectorType) getBioAssayDimensionById(ExpressionExperiment ee, Long dimensionId) Find aBioAssayDimensionby ID.getBioAssayDimensionById(ExpressionExperiment ee, Long dimensionId, Class<? extends BulkExpressionDataVector> dataVectorType) getBioAssayDimensionsWithAssays(ExpressionExperiment expressionExperiment) Obtain all the dimensions associated to the given experiment.Obtain allBioAssayDimensions associated to a particularQuantitationType.longgetBioMaterialCount(ExpressionExperiment expressionExperiment) getCategoriesUsageFrequency(Filters filters, Set<Long> extraIds, Collection<String> excludedCategoryUris, Collection<String> excludedTermUris, Collection<String> retainedTermUris, int maxResults) Obtain category usage frequency for datasets matching the given filter.getEnhancedFilters(Filters f, Collection<OntologyTerm> mentionedTerms, Collection<OntologyTerm> inferredTerms, long timeout, TimeUnit timeUnit) Perform various transformation to the provided filters to enhance it.Build a full structured representation of an experiment'sExperimentalDesign: factors, factor values (with statements carrying stable database IDs), and per-biomaterial factor-value assignments.getExperimentsLackingPublications(int maxResults) getFilterablePropertyDescription(String property) Augments the base service description with a note about ontology inference.getGenesUsedByPreferredVectors(ExpressionExperiment experimentConstraint) Retrieve the genes used by the preferred vectors of this experiment.getLastArrayDesignUpdate(Collection<ExpressionExperiment> expressionExperiments) getNumberOfDesignElementsPerSample(ExpressionExperiment expressionExperiment) Obtain the number of design elements for the platform of each bioassay in the given experiment.Iterates over the quantitation types for a given expression experiment and returns the preferred quantitation types.getPreferredRawDataVectors(ExpressionExperiment expressionExperiment) Obtain the dimension associated to the processed data for the given experiment.Obtain the dimension associated to the processed data for the given experiment.getProcessedDataVectors(ExpressionExperiment ee, List<BioAssay> assays) getQuantitationTypes(ExpressionExperiment expressionExperiment) Retrieve all the quantitation types used by the given expression experiment.getQuantitationTypes(ExpressionExperiment expressionExperiment, BioAssayDimension dimension) Retrieve all the quantitation types used by the given experiment and dimension.getQuantitationTypes(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, Class<? extends BulkExpressionDataVector> dataVectorType) Map<Class<? extends DataVector>, Set<QuantitationType>> getQuantitationTypeValueObjects(ExpressionExperiment expressionExperiment) Load allQuantitationTypeassociated to an expression experiment as VOs.longgetRawDataVectors(ExpressionExperiment ee, List<BioAssay> samples, QuantitationType qt) getSampleRemovalEvents(Collection<ExpressionExperiment> expressionExperiments) getSubSetByIdWithCharacteristics(ExpressionExperiment ee, Long subSetId) Obtain a particular subset by ID.getSubSets(ExpressionExperiment expressionExperiment, BioAssayDimension dimension) Obtain the subsets for a particular dimension.getSubSetsByDimension(ExpressionExperiment expressionExperiment) Obtain all the subsets organized by dimension for a given dataset.getSubSetsByDimensionWithBioAssays(ExpressionExperiment expressionExperiment) Obtain all the subsets organized by dimension for a given dataset.getSubSetsByFactorValue(ExpressionExperiment expressionExperiment, BioAssayDimension dimension) Reconstitute the FV to subset mapping for a given experiment.getSubSetsByFactorValue(ExpressionExperiment expressionExperiment, ExperimentalFactor experimentalFactor, BioAssayDimension dimension) Reconstitute the FV to subset mapping for a given experiment and factor.getSubSetsByFactorValueWithCharacteristicsAndBioAssays(ExpressionExperiment expressionExperiment, ExperimentalFactor experimentalFactor, BioAssayDimension dimension) Reconstitute the FV to subset mapping for a given experiment and factor.getSubSetsWithBioAssays(Collection<ExpressionExperiment> expressionExperiments) Batched variant ofExpressionExperimentService.getSubSetsWithBioAssays(ExpressionExperiment): obtain subsets for every experiment in the input collection in a single query, keyed by source experiment.getSubSetsWithBioAssays(ExpressionExperiment expressionExperiment) Obtain all the subsets for a given dataset.getSubSetsWithBioAssays(ExpressionExperiment expressionExperiment, BioAssayDimension dimension) Obtain the subsets for a particular dimension.Obtain all the subsets for a given dataset.Return the taxon for each of the given experiments.getTaxaUsageFrequency(Filters filters, Set<Long> extraIds) Calculate the usage frequency of taxa by the datasets matching the provided filters.Returns the taxon of the given experiment.getTechnologyTypeUsageFrequency(Filters filters, Set<Long> extraIds) booleanTest if the given experiment has processed data vectors.booleanbooleanisBlackListed(String geoAccession) booleanisRNASeq(ExpressionExperiment expressionExperiment) booleanIndicate if the given experiment is a single-cell experiment.booleanCheck if the dataset is either troubled or uses a troubled platform.booleanisTwoChannel(ExpressionExperiment expressionExperiment) Deprecated.loadAllIdentifiersAndName(boolean includeNames) Load all possible identifiers for experiments.Load references for all experiments.loadAndThaw(Long id) Load an experiment and thaw it as perExpressionExperimentService.thaw(ExpressionExperiment).loadAndThawLite(Long id) <T extends Exception>
ExpressionExperimentloadAndThawLiteOrFail(Long id, Function<String, T> exceptionSupplier) <T extends Exception>
ExpressionExperimentloadAndThawLiteOrFail(Long id, Function<String, T> exceptionSupplier, String message) Load an experiment and thaw it as perExpressionExperimentService.thawLite(ExpressionExperiment)or fail with the supplied exception and message.<T extends Exception>
ExpressionExperimentloadAndThawLiterOrFail(Long id, Function<String, T> exceptionSupplier) Load an experiment without cache and thaw it as perExpressionExperimentService.thaw(ExpressionExperiment)withCacheMode.REFRESH.<T extends Exception>
ExpressionExperimentloadAndThawOrFail(Long id, Function<String, T> exceptionSupplier) Load an experiment and thaw it as perExpressionExperimentService.thawLite(ExpressionExperiment)or fail with the supplied exception and message.loadBlacklistedValueObjects(Filters filters, Sort sort, int offset, int limit) loadBlacklistedValueObjectsByCursor(Filters filters, Sort sort, Cursor cursor, int limit) Cursor-mode counterpart toExpressionExperimentService.loadBlacklistedValueObjects(Filters, Sort, int, int).loadDetailsValueObjects(Collection<Long> ids, Taxon taxon, Sort sort, int offset, int limit) loadDetailsValueObjectsWithCache(Collection<Long> ids, Taxon taxon, Sort sort, int offset, int limit) loadIdentifiers(Collection<Long> ids) loadIdsWithCache(Filters filters, Sort sort) loadReference(Long id) loadReferences(Collection<Long> ids) Load references for the given experiment IDs.Load troubled experiment IDs.loadValueObjectsByIds(List<Long> ids, boolean maintainOrder) Variant ofBaseVoEnabledService.loadValueObjectsByIds(Collection)that preserve its input order.Load VOs for the given dataset IDs and initialize their relations likeSecurableFilteringVoEnabledService.load(Filters, Sort).loadValueObjectsWithCache(Filters filters, Sort sort, int offset, int limit) Load an experiment with its audit trail initialized.Predict what would happen ifproposedwere applied as the experiment's new design via PUT.previewDesignChange(ExpressionExperiment ee, ExperimentalDesignValueObject proposed, DesignCommitPlan plan) Predict what would happen ifproposedwere applied, including the bindings aDesignCommitPlandefers to a second apply pass.voidremove(Collection<ExpressionExperiment> entities) voidDeletes an experiment and all of its associated objects, including coexpression links.intremoveAnnotation(ExpressionExperiment ee, Long annotationId) Per-tag REST-write counterpart toremoveCharacteristics(ExpressionExperiment, Collection).removeAnnotation(ExpressionExperiment ee, Long annotationId, String reason) Reason-carrying overload; seeaddAnnotation(ExpressionExperiment, Characteristic, String).voidremoveCharacteristics(ExpressionExperiment ee, Collection<Characteristic> characteristicsToRemove) intRemove the processed data vectors for the given experiment.intintremoveRawDataVectors(ExpressionExperiment ee, QuantitationType qt, boolean keepDimension) intreplaceAllRawDataVectors(ExpressionExperiment ee, Collection<RawExpressionDataVector> newVectors) Used when we are replacing data, such as when converting an experiment from one platform to another.intreplaceProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors) Replace the processed data vectors for the given experiment.intreplaceRawDataVectors(ExpressionExperiment ee, QuantitationType qt, Collection<RawExpressionDataVector> vectors) thaw(ExpressionExperiment expressionExperiment) thawBioAssays(ExpressionExperiment expressionExperiment) thawLite(ExpressionExperiment expressionExperiment) thawLiter(ExpressionExperiment expressionExperiment) intupdateAnnotations(ExpressionExperiment ee, Collection<Characteristic> desired) Idempotent set-replace for an EE's direct characteristic set.booleanupdateNameAndDescription(ExpressionExperiment ee, String name, String description) Update the curator-editable "basics" ofee: itsname(title) and/ordescription.voidupdatePublications(ExpressionExperiment ee, BibliographicReference primaryPublication, Collection<BibliographicReference> otherRelevantPublications) Replace an EE's primary + other-relevant publications, recording every one as a bare curator assertion.voidupdatePublications(ExpressionExperiment ee, PublicationAssertion primaryPublication, Collection<PublicationAssertion> otherRelevantPublications, Collection<PublicationAssertion> rejectedPublications) Replace an EE's publications and the evidence behind them.voidupdateQuantitationType(ExpressionExperiment ee, QuantitationType qt, QuantitationType previousPreferredQt) Update a quantitation type.Methods inherited from class AbstractFilteringVoEnabledService
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, load, load, loadAllValueObjects, loadIds, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjects, loadValueObjects, loadValueObjectsByCursor, loadValueObjectsByIdsMethods inherited from class AbstractService
countAll, create, create, ensureInSession, ensureInSession, find, findOrCreate, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, save, save, streamAll, streamAll, update, updateMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface BaseReadOnlyService
countAll, getElementClass, loadOrFail, loadOrFailMethods inherited from interface FilteringService
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubqueryMethods inherited from interface FilteringVoEnabledService
loadValueObjectsByCursorMethods inherited from interface SecurableBaseImmutableService
create, create, findOrCreateMethods inherited from interface SecurableBaseReadOnlyService
find, findOrFail, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, streamAll, streamAllMethods inherited from interface SecurableBaseService
save, save, update, updateMethods inherited from interface SecurableBaseVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdsMethods inherited from interface SecurableFilteringVoEnabledService
load, load, loadIds, loadValueObjects, loadValueObjects
-
Constructor Details
-
ExpressionExperimentServiceImpl
-
-
Method Details
-
loadReference
- Specified by:
loadReferencein interfaceExpressionExperimentService
-
loadReferences
Description copied from interface:ExpressionExperimentServiceLoad references for the given experiment IDs.- Specified by:
loadReferencesin interfaceExpressionExperimentService
-
loadAllReferences
Description copied from interface:ExpressionExperimentServiceLoad references for all experiments.References are pre-filtered for ACLs as per
SecurableFilteringVoEnabledService.loadIds(Filters, Sort).- Specified by:
loadAllReferencesin interfaceExpressionExperimentService
-
loadWithAuditTrail
Description copied from interface:ExpressionExperimentServiceLoad an experiment with its audit trail initialized.- Specified by:
loadWithAuditTrailin interfaceExpressionExperimentService
-
loadTroubledIds
Description copied from interface:ExpressionExperimentServiceLoad troubled experiment IDs.- Specified by:
loadTroubledIdsin interfaceExpressionExperimentService- See Also:
-
loadAllIdentifiersAndName
Description copied from interface:ExpressionExperimentServiceLoad all possible identifiers for experiments.- Specified by:
loadAllIdentifiersAndNamein interfaceExpressionExperimentService- Parameters:
includeNames- if true, include experiment names as possible identifier- Returns:
- a mapping of candidate identifier to experiment name
-
loadIdentifiers
- Specified by:
loadIdentifiersin interfaceExpressionExperimentService- See Also:
-
reload
- Specified by:
reloadin interfaceExpressionExperimentService- See Also:
-
addFactor
- Specified by:
addFactorin interfaceExpressionExperimentService
-
addFactorValue
- Specified by:
addFactorValuein interfaceExpressionExperimentService- Parameters:
ee- experiment.fv- must already have the experimental factor filled in.
-
addFactorValues
Description copied from interface:ExpressionExperimentServiceIntended with the case of a continuous factor being added.- Specified by:
addFactorValuesin interfaceExpressionExperimentService
-
getRawDataVectors
public Collection<RawExpressionDataVector> getRawDataVectors(ExpressionExperiment ee, QuantitationType qt) - Specified by:
getRawDataVectorsin interfaceExpressionExperimentService- See Also:
-
getRawDataVectors
public Collection<RawExpressionDataVector> getRawDataVectors(ExpressionExperiment ee, List<BioAssay> samples, QuantitationType qt) - Specified by:
getRawDataVectorsin interfaceExpressionExperimentService- See Also:
-
getPreferredRawDataVectors
public Collection<RawExpressionDataVector> getPreferredRawDataVectors(ExpressionExperiment expressionExperiment) - Specified by:
getPreferredRawDataVectorsin interfaceExpressionExperimentService- See Also:
-
getMissingValuesVectors
public Map<QuantitationType, Collection<RawExpressionDataVector>> getMissingValuesVectors(ExpressionExperiment ee) - Specified by:
getMissingValuesVectorsin interfaceExpressionExperimentService- See Also:
-
addRawDataVectors
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
public int replaceRawDataVectors(ExpressionExperiment ee, QuantitationType qt, Collection<RawExpressionDataVector> vectors) - Specified by:
replaceRawDataVectorsin interfaceExpressionExperimentService- See Also:
-
replaceAllRawDataVectors
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
- Specified by:
removeAllRawDataVectorsin interfaceExpressionExperimentService- See Also:
-
removeRawDataVectors
- Specified by:
removeRawDataVectorsin interfaceExpressionExperimentService- See Also:
-
removeRawDataVectors
public int removeRawDataVectors(ExpressionExperiment ee, QuantitationType qt, boolean keepDimension) - Specified by:
removeRawDataVectorsin interfaceExpressionExperimentService- See Also:
-
getProcessedDataVectors
public Optional<Collection<ProcessedExpressionDataVector>> getProcessedDataVectors(ExpressionExperiment ee) - Specified by:
getProcessedDataVectorsin interfaceExpressionExperimentService- Returns:
- a collection of processed data vectors for the given experiment and list of assays, or
Optional.empty()if there are no processed vectors - See Also:
-
getProcessedDataVectors
public Optional<Collection<ProcessedExpressionDataVector>> getProcessedDataVectors(ExpressionExperiment ee, List<BioAssay> assays) - Specified by:
getProcessedDataVectorsin interfaceExpressionExperimentService- Returns:
- a collection of processed data vectors for the given experiment and list of assays, or
Optional.empty()if there are no processed vectors - See Also:
-
createProcessedDataVectors
public int createProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors) Description copied from interface:ExpressionExperimentServiceCreate a new set of processed vectors for an experiment.You might actually want to use
ProcessedExpressionDataVectorService.createProcessedDataVectors(ExpressionExperiment, boolean, boolean)as this method is fairly low-level.- Specified by:
createProcessedDataVectorsin interfaceExpressionExperimentService- See Also:
-
removeProcessedDataVectors
Description copied from interface:ExpressionExperimentServiceRemove the processed data vectors for the given experiment.You might actually want to use
ProcessedExpressionDataVectorService.removeProcessedDataVectors(ExpressionExperiment). as this method is fairly low-level.- Specified by:
removeProcessedDataVectorsin interfaceExpressionExperimentService- See Also:
-
replaceProcessedDataVectors
public int replaceProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors) Description copied from interface:ExpressionExperimentServiceReplace the processed data vectors for the given experiment.You might actually want to use
ProcessedExpressionDataVectorService.replaceProcessedDataVectors(ExpressionExperiment, Collection, boolean)(ExpressionExperiment)}. as this method is fairly low-level.- Specified by:
replaceProcessedDataVectorsin interfaceExpressionExperimentService- See Also:
-
browse
- Specified by:
browsein interfaceExpressionExperimentService
-
filter
Description copied from interface:ExpressionExperimentServicereturns ids of search results.- Specified by:
filterin interfaceExpressionExperimentService- Parameters:
searchString- search string- Returns:
- collection of ids or an empty collection.
- Throws:
SearchException
-
filterByTaxon
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
- Specified by:
loadWithPrimaryPublicationin interfaceExpressionExperimentService
-
loadWithPrimaryPublicationAndOtherRelevantPublications
- Specified by:
loadWithPrimaryPublicationAndOtherRelevantPublicationsin interfaceExpressionExperimentService
-
loadWithMeanVarianceRelation
- Specified by:
loadWithMeanVarianceRelationin interfaceExpressionExperimentService
-
findByAccession
- 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.
-
findByAccession
- Specified by:
findByAccessionin interfaceExpressionExperimentService
-
findOneByAccession
- Specified by:
findOneByAccessionin interfaceExpressionExperimentService
-
findByBibliographicReference
- Specified by:
findByBibliographicReferencein interfaceExpressionExperimentService- Parameters:
bibRef- bibliographic reference- Returns:
- a collection of EE that have that reference that BibliographicReference
-
findByBioAssay
- Specified by:
findByBioAssayin interfaceExpressionExperimentService- Parameters:
ba- bio material- Returns:
- experiment the given bioassay is associated with
-
findByBioAssay
- Specified by:
findByBioAssayin interfaceExpressionExperimentService- Parameters:
includeSubSets- include assays that belong to subsets of the experiment
-
findIdByBioAssay
- Specified by:
findIdByBioAssayin interfaceExpressionExperimentService
-
findByBioMaterial
- Specified by:
findByBioMaterialin interfaceExpressionExperimentService- Parameters:
bm- bio material- Returns:
- experiment the given biomaterial is associated with
-
findByBioMaterial
- Specified by:
findByBioMaterialin interfaceExpressionExperimentService- Parameters:
includeSubSets- include samples that are associated to assays that belong to subsets of the experiment
-
findIdsByBioMaterial
- Specified by:
findIdsByBioMaterialin interfaceExpressionExperimentService
-
findByBioMaterials
public Map<ExpressionExperiment, Collection<BioMaterial>> findByBioMaterials(Collection<BioMaterial> biomaterials) - Specified by:
findByBioMaterialsin interfaceExpressionExperimentService
-
findByExpressedGene
- 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
-
findByDesign
- Specified by:
findByDesignin interfaceExpressionExperimentService
-
findIdByDesign
- Specified by:
findIdByDesignin interfaceExpressionExperimentService
-
findByDesignId
- Specified by:
findByDesignIdin interfaceExpressionExperimentService
-
findByFactor
- Specified by:
findByFactorin interfaceExpressionExperimentService
-
findIdByFactor
- Specified by:
findIdByFactorin interfaceExpressionExperimentService
-
findByFactors
- Specified by:
findByFactorsin interfaceExpressionExperimentService
-
findByFactorValue
- Specified by:
findByFactorValuein interfaceExpressionExperimentService
-
findIdByFactorValue
- Specified by:
findIdByFactorValuein interfaceExpressionExperimentService
-
findByFactorValueId
- Specified by:
findByFactorValueIdin interfaceExpressionExperimentService
-
findByFactorValues
- Specified by:
findByFactorValuesin interfaceExpressionExperimentService
-
findByFactorValueIds
- Specified by:
findByFactorValueIdsin interfaceExpressionExperimentService
-
findByGene
- 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)
-
findByName
- Specified by:
findByNamein interfaceExpressionExperimentService
-
findOneByName
- Specified by:
findOneByNamein interfaceExpressionExperimentService
-
findByQuantitationType
- Specified by:
findByQuantitationTypein interfaceExpressionExperimentService
-
findByShortName
- Specified by:
findByShortNamein interfaceExpressionExperimentService
-
findByShortNameWithPrimaryPublication
- Specified by:
findByShortNameWithPrimaryPublicationin interfaceExpressionExperimentService
-
findByShortNameAndThawLite
- Specified by:
findByShortNameAndThawLitein interfaceExpressionExperimentService
-
findByTaxon
- Specified by:
findByTaxonin interfaceExpressionExperimentService
-
findByUpdatedLimit
- Specified by:
findByUpdatedLimitin interfaceExpressionExperimentService
-
findUpdatedAfter
- Specified by:
findUpdatedAfterin interfaceExpressionExperimentService
-
findByMeanVarianceRelation
- Specified by:
findByMeanVarianceRelationin interfaceExpressionExperimentService
-
findIdByMeanVarianceRelation
- Specified by:
findIdByMeanVarianceRelationin interfaceExpressionExperimentService
-
existsByShortName
Description copied from interface:ExpressionExperimentServiceCheck if a dataset with a given short name.No ACL checks are performed.
- Specified by:
existsByShortNamein interfaceExpressionExperimentService
-
getAnnotationCountsByIds
- Specified by:
getAnnotationCountsByIdsin interfaceExpressionExperimentService- Parameters:
ids- ids- Returns:
- the map of ids to number of terms associated with each expression experiment.
-
previewDesignChange
@Transactional(readOnly=true) public DesignPreflightReport previewDesignChange(ExpressionExperiment ee, ExperimentalDesignValueObject proposed) Description copied from interface:ExpressionExperimentServicePredict what would happen ifproposedwere applied as the experiment's new design via PUT. Performs both validation (blockers) and impact analysis (deletions, dependent analyses, affected subsets). Never mutates state.- Specified by:
previewDesignChangein interfaceExpressionExperimentService- Parameters:
ee- the target experimentproposed- the candidate design as it would be sent toPUT /datasets/{id}/design- Returns:
- a
DesignPreflightReportdescribing the diff and its consequences
-
previewDesignChange
@Transactional(readOnly=true) public DesignPreflightReport previewDesignChange(ExpressionExperiment ee, ExperimentalDesignValueObject proposed, @Nullable DesignCommitPlan plan) Description copied from interface:ExpressionExperimentServicePredict what would happen ifproposedwere applied, including the bindings aDesignCommitPlandefers to a second apply pass.Why the plan is needed to get the count right
A
ExperimentalDesignValueObject.BioMaterialFactorValueAssignmentcarries factor value IDs, so a biomaterial being bound to a factor value the commit CREATES cannot be expressed inproposedat all — the factor value has no ID until the first apply pass makes it. Those bindings live inDesignCommitPlan.getPendingAssignments(). Preflighting without them reportsbiomaterialsWithChangedAssignments = 0for a pure create whose bindings do land.- Specified by:
previewDesignChangein interfaceExpressionExperimentService- Parameters:
plan- the commit plan whose deferred assignments should be counted, ornullwhen the caller has none — a plainPUT /datasets/{id}/designpayload, which can only name factor values that already exist- See Also:
-
applyDesignChange
@Transactional @AuditedConditional(value=DesignChangeEvent.class, when="#result.applied", messageSpel="'Design replaced via REST: factors +' + #result.preflightAtApply.summary.factorsToCreate + ' / -' + #result.preflightAtApply.summary.factorsToDelete + ' / ~' + #result.preflightAtApply.summary.factorsToUpdate + ', factor values +' + #result.preflightAtApply.summary.factorValuesToCreate + ' / -' + #result.preflightAtApply.summary.factorValuesToDelete + ' / ~' + #result.preflightAtApply.summary.factorValuesToUpdate + ', biomaterial assignments changed: ' + #result.preflightAtApply.summary.biomaterialsWithChangedAssignments + ', analyses removed: ' + #result.preflightAtApply.summary.differentialExpressionAnalysesToDelete + '.'") public DesignApplyOutcome applyDesignChange(ExpressionExperiment ee, ExperimentalDesignValueObject proposed) Description copied from interface:ExpressionExperimentServiceApplyproposedas the experiment's newExperimentalDesign.Performs the same validation as
ExpressionExperimentService.previewDesignChange(ExpressionExperiment, ExperimentalDesignValueObject)and throwsIllegalArgumentExceptionwhen blockers are present; the caller is expected to surface preflight feedback before invoking this method. Statements on kept factor values are replaced wholesale (any statement not echoed in the payload is deleted); factor values and factors not echoed are deleted. Differential expression analyses whose factors or factor values are affected are cascaded.Idempotent: when the apply-time preflight reports zero factor / factor value / biomaterial / design-metadata changes, the method short-circuits and returns a
DesignApplyOutcomewithapplied=falsewithout emitting an audit event. Repeated PUTs of an already-applied design therefore produce oneDesignChangeEvent, not many.On a real change, emits a single
DesignChangeEventvia@AuditedConditional(Phase C declarative-audit pattern).- Specified by:
applyDesignChangein interfaceExpressionExperimentService- Parameters:
ee- the target experimentproposed- the new design- Returns:
- a
DesignApplyOutcomecarrying the rebuilt VO, theappliedflag, and the apply-time preflight report.
-
getExperimentalDesignValueObject
Description copied from interface:ExpressionExperimentServiceBuild a full structured representation of an experiment'sExperimentalDesign: factors, factor values (with statements carrying stable database IDs), and per-biomaterial factor-value assignments. Returnsnullif the experiment has no design attached.- Specified by:
getExperimentalDesignValueObjectin interfaceExpressionExperimentService
-
getAnnotations
Description copied from interface:ExpressionExperimentServiceRetrieve annotations for a given experiment.The following are included:
- Experiment-level tags
- Experimental design tags
- Sample-level tags
- Specified by:
getAnnotationsin interfaceExpressionExperimentService
-
getAnnotations
public Set<AnnotationValueObject> getAnnotations(ExpressionExperiment expressionExperiment, boolean includeFreeText) Description copied from interface:ExpressionExperimentServiceRetrieve annotations for a given experiment, optionally including unmapped ones.- Specified by:
getAnnotationsin interfaceExpressionExperimentService- See Also:
-
getAnnotations
Description copied from interface:ExpressionExperimentServiceRetrieve annotations for a given experiment subset.The following are included:
- Experiment-level tags
- Subset-level tags
- Experimental design tags minus the subset factor
- Sample-level tags for the samples within the subset
- Specified by:
getAnnotationsin interfaceExpressionExperimentService
-
getAnnotations
public Set<AnnotationValueObject> getAnnotations(ExpressionExperimentSubSet ee, boolean includeFreeText) Description copied from interface:ExpressionExperimentServiceRetrieve annotations for a given experiment subset, optionally including unmapped ones.- Specified by:
getAnnotationsin interfaceExpressionExperimentService- See Also:
-
getEnhancedFilters
public Filters getEnhancedFilters(Filters f, @Nullable Collection<OntologyTerm> mentionedTerms, @Nullable Collection<OntologyTerm> inferredTerms, long timeout, TimeUnit timeUnit) throws TimeoutException Description copied from interface:ExpressionExperimentServicePerform various transformation to the provided filters to enhance it.- rewrite clauses over objects and predicates to include second/third, etc... predicates/objects
- apply ontological inference to augment a filter with additional terms.
- Specified by:
getEnhancedFiltersin interfaceExpressionExperimentService- Parameters:
mentionedTerms- 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
-
getFilterablePropertyDescription
Augments the base service description with a note about ontology inference. Remains on the facade because it overrides theAbstractFilteringVoEnabledServicehierarchy's contract; pure delegation here would break the inheritance chain.- Specified by:
getFilterablePropertyDescriptionin interfaceFilteringService<ExpressionExperiment>- Overrides:
getFilterablePropertyDescriptionin classAbstractFilteringVoEnabledService<ExpressionExperiment, ExpressionExperimentValueObject>- See Also:
-
getNumberOfDesignElementsPerSample
public Map<BioAssay,Long> getNumberOfDesignElementsPerSample(ExpressionExperiment expressionExperiment) Description copied from interface:ExpressionExperimentServiceObtain the number of design elements for the platform of each bioassay in the given experiment.- Specified by:
getNumberOfDesignElementsPerSamplein interfaceExpressionExperimentService
-
loadWithCharacteristics
- Specified by:
loadWithCharacteristicsin interfaceExpressionExperimentService
-
loadAndThawLiteOrFail
public <T extends Exception> ExpressionExperiment loadAndThawLiteOrFail(Long id, Function<String, T> exceptionSupplier, String message) throws TDescription 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
-
loadAndThawLiteOrFail
public <T extends Exception> ExpressionExperiment loadAndThawLiteOrFail(Long id, Function<String, T> exceptionSupplier) throws T- Specified by:
loadAndThawLiteOrFailin interfaceExpressionExperimentService- Throws:
T
-
loadAndThawLiterOrFail
public <T extends Exception> ExpressionExperiment loadAndThawLiterOrFail(Long id, Function<String, T> exceptionSupplier) throws T- Specified by:
loadAndThawLiterOrFailin interfaceExpressionExperimentService- Throws:
T
-
loadAndThaw
Description copied from interface:ExpressionExperimentServiceLoad an experiment and thaw it as perExpressionExperimentService.thaw(ExpressionExperiment).- Specified by:
loadAndThawin interfaceExpressionExperimentService
-
loadAndThawLite
- Specified by:
loadAndThawLitein interfaceExpressionExperimentService
-
loadAndThawLiteWithRefreshCacheMode
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:
loadAndThawLiteWithRefreshCacheModein interfaceExpressionExperimentService
-
loadAndThawOrFail
public <T extends Exception> ExpressionExperiment loadAndThawOrFail(Long id, Function<String, T> exceptionSupplier) throws TDescription 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
-
loadIdsWithCache
- Specified by:
loadIdsWithCachein interfaceExpressionExperimentService
-
countWithCache
Description copied from interface:ExpressionExperimentServiceCount the number of experiments that match the given filters.- Specified by:
countWithCachein interfaceExpressionExperimentService- Parameters:
filters- a set of filters to be applied as perSecurableFilteringVoEnabledService.loadIds(Filters, Sort)extraIds- a set of extra IDs to be intersected with the IDs retrieved by the filters
-
loadValueObjectsWithCache
public Slice<ExpressionExperimentValueObject> loadValueObjectsWithCache(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit) - Specified by:
loadValueObjectsWithCachein interfaceExpressionExperimentService
-
getCategoriesUsageFrequency
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
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, boolean includePredicates, boolean includeObjects, long timeout, TimeUnit timeUnit) throws TimeoutException Description copied from interface:ExpressionExperimentServiceObtain annotation usage frequency for datasets matching the given filters.Terms may originate from the experiment tags, experimental design or samples.
The implementation uses a denormalized table for associating EEs to characteristics which is not always in sync if new terms are attached.
- 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 returnincludePredicates- include usage frequencies of predicates in the resultsincludeObjects- include usage frequencies of objects in the results- 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
- Throws:
TimeoutException- See Also:
-
getArrayDesignsUsed
@Transactional(readOnly=true) public Collection<ArrayDesign> getArrayDesignsUsed(ExpressionExperiment 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.
-
getArrayDesignsUsedByExperiment
@Transactional(readOnly=true) public Map<ExpressionExperiment, Collection<ArrayDesign>> getArrayDesignsUsedByExperiment(Collection<ExpressionExperiment> expressionExperiments) Description copied from interface:ExpressionExperimentServicePer-experiment map of array designs used: one HQL covers all supplied EEs and the result preserves which platform belongs to which EE.Use this when N EEs need their platforms inspected as part of one assembly step (e.g. bulk pipeline-status), where calling
ExpressionExperimentService.getArrayDesignsUsed(ExpressionExperiment)once per EE would serialize a query per dataset. EEs with no resolved bio-assays are absent from the map; the caller should default to "no platforms" in that case.The
"ACL_SECURABLE_COLLECTION_READ"guard mirrors the bulk read pattern used by other collection-shaped APIs in this service.- Specified by:
getArrayDesignsUsedByExperimentin interfaceExpressionExperimentService
-
getArrayDesignsUsed
@Transactional(readOnly=true) public Collection<ArrayDesign> getArrayDesignsUsed(ExpressionExperiment ee, QuantitationType qt) Description copied from interface:ExpressionExperimentServiceObtain a collection ofArrayDesignused by a specific set of vectors.The type of vectors is inferred.
- Specified by:
getArrayDesignsUsedin interfaceExpressionExperimentService- See Also:
-
getArrayDesignsUsed
@Transactional(readOnly=true) public Collection<ArrayDesign> getArrayDesignsUsed(ExpressionExperiment ee, QuantitationType qt, Class<? extends DataVector> vectorType) Description copied from interface:ExpressionExperimentServiceObtain a collection ofArrayDesignused by a specific set of vectors.- Specified by:
getArrayDesignsUsedin interfaceExpressionExperimentService
-
getGenesUsedByPreferredVectors
@Transactional(readOnly=true) public Collection<Gene> getGenesUsedByPreferredVectors(ExpressionExperiment experimentConstraint) Description copied from interface:ExpressionExperimentServiceRetrieve the genes used by the preferred vectors of this experiment.- Specified by:
getGenesUsedByPreferredVectorsin interfaceExpressionExperimentService
-
getTechnologyTypeUsageFrequency
public Map<TechnologyType, Long> getTechnologyTypeUsageFrequency(@Nullable Filters filters, @Nullable Set<Long> extraIds) - Specified by:
getTechnologyTypeUsageFrequencyin interfaceExpressionExperimentService
-
getArrayDesignUsedOrOriginalPlatformUsageFrequency
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 perSecurableFilteringVoEnabledService.loadIds(Filters, Sort)extraIds- a set of extra IDs to be intersected with the IDs retrieved by the filtersmaxResults- the maximum of results, or unlimited if less than 1
-
getTaxaUsageFrequency
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- Parameters:
filters- a set of filters to be applied as perSecurableFilteringVoEnabledService.loadIds(Filters, Sort)extraIds- a set of extra IDs to be intersected with the IDs retrieved by the filters- See Also:
-
getBioAssayDimensionsWithAssays
@Transactional(readOnly=true) public Collection<BioAssayDimension> getBioAssayDimensionsWithAssays(ExpressionExperiment expressionExperiment) Description copied from interface:ExpressionExperimentServiceObtain all the dimensions associated to the given experiment.Assays are initialized as per
Thaws.thawBioAssay(BioAssay).- Specified by:
getBioAssayDimensionsWithAssaysin interfaceExpressionExperimentService
-
getBioAssayDimension
@Transactional(readOnly=true) public BioAssayDimension getBioAssayDimension(ExpressionExperiment ee, QuantitationType qt, Class<? extends BulkExpressionDataVector> dataVectorType) - Specified by:
getBioAssayDimensionin interfaceExpressionExperimentService
-
getBioAssayDimension
@Transactional(readOnly=true) public BioAssayDimension getBioAssayDimension(ExpressionExperiment ee, QuantitationType qt) Description copied from interface:ExpressionExperimentServiceObtain the dimension associated to the given quantitation type for the given experiment.This fails if there happens to be more than one dimension for the given QT.
- Specified by:
getBioAssayDimensionin interfaceExpressionExperimentService
-
getProcessedBioAssayDimension
@Transactional(readOnly=true) public BioAssayDimension getProcessedBioAssayDimension(ExpressionExperiment ee) Description copied from interface:ExpressionExperimentServiceObtain the dimension associated to the processed data for the given experiment.- Specified by:
getProcessedBioAssayDimensionin interfaceExpressionExperimentService
-
getProcessedBioAssayDimensionsWithAssays
@Transactional(readOnly=true) public Collection<BioAssayDimension> getProcessedBioAssayDimensionsWithAssays(ExpressionExperiment ee) Description copied from interface:ExpressionExperimentServiceObtain the dimension associated to the processed data for the given experiment.Assays are initialized as per
Thaws.thawBioAssay(BioAssay).In some special edge cases, a
QuantitationTypemay have more than oneBioAssayDimension. If you cannot handle this, useExpressionExperimentService.getProcessedBioAssayDimension(ExpressionExperiment)instead.- Specified by:
getProcessedBioAssayDimensionsWithAssaysin interfaceExpressionExperimentService
-
getBioAssayDimensionsWithAssays
@Transactional(readOnly=true) public Collection<BioAssayDimension> getBioAssayDimensionsWithAssays(ExpressionExperiment ee, QuantitationType qt) Description copied from interface:ExpressionExperimentServiceObtain allBioAssayDimensions associated to a particularQuantitationType.Assays initialized as per
Thaws.thawBioAssay(BioAssay)In some special edge cases, a
QuantitationTypemay have more than oneBioAssayDimension.- Specified by:
getBioAssayDimensionsWithAssaysin interfaceExpressionExperimentService
-
getBioAssayDimensionById
@Transactional(readOnly=true) public BioAssayDimension getBioAssayDimensionById(ExpressionExperiment ee, Long dimensionId, Class<? extends BulkExpressionDataVector> dataVectorType) - Specified by:
getBioAssayDimensionByIdin interfaceExpressionExperimentService
-
getBioAssayDimensionById
@Transactional(readOnly=true) public BioAssayDimension getBioAssayDimensionById(ExpressionExperiment ee, Long dimensionId) Description copied from interface:ExpressionExperimentServiceFind aBioAssayDimensionby ID.This is less efficient than
ExpressionExperimentService.getBioAssayDimensionById(ExpressionExperiment, Long, Class)because all bulk vector types need to be inspected.- Specified by:
getBioAssayDimensionByIdin interfaceExpressionExperimentService
-
getBioMaterialCount
- Specified by:
getBioMaterialCountin interfaceExpressionExperimentService- Parameters:
expressionExperiment- experiment- Returns:
- the amount of biomaterials associated with the given expression experiment.
-
getRawDataVectorCount
- Specified by:
getRawDataVectorCountin interfaceExpressionExperimentService
-
getExperimentsWithOutliers
- Specified by:
getExperimentsWithOutliersin interfaceExpressionExperimentService
-
getLastArrayDesignUpdate
public Map<Long,Date> getLastArrayDesignUpdate(Collection<ExpressionExperiment> expressionExperiments) - Specified by:
getLastArrayDesignUpdatein interfaceExpressionExperimentService
-
getLastArrayDesignUpdate
- 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
- 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
- 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
- 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
- Specified by:
getPerTaxonCountin interfaceExpressionExperimentService- Returns:
- counts of expression experiments grouped by taxon
-
getPopulatedFactorCounts
- 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
- 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 Optional<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
-
getProcessedQuantitationType
@Transactional(readOnly=true) public Optional<QuantitationType> getProcessedQuantitationType(ExpressionExperiment ee) - Specified by:
getProcessedQuantitationTypein interfaceExpressionExperimentService
-
hasProcessedExpressionData
Description copied from interface:ExpressionExperimentServiceTest if the given experiment has processed data vectors.- Specified by:
hasProcessedExpressionDatain interfaceExpressionExperimentService
-
hasSourceMetadata
- Specified by:
hasSourceMetadatain interfaceExpressionExperimentService- See Also:
-
getSourceMetadata
- Specified by:
getSourceMetadatain interfaceExpressionExperimentService- See Also:
-
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) Description copied from interface:ExpressionExperimentServiceRetrieve all the quantitation types used by the given expression experiment.- Specified by:
getQuantitationTypesin interfaceExpressionExperimentService- See Also:
-
getQuantitationTypesByVectorType
@Transactional(readOnly=true) public Map<Class<? extends DataVector>, Set<QuantitationType>> getQuantitationTypesByVectorType(ExpressionExperiment ee) - Specified by:
getQuantitationTypesByVectorTypein interfaceExpressionExperimentService
-
getQuantitationTypes
@Transactional(readOnly=true) public Collection<QuantitationType> getQuantitationTypes(ExpressionExperiment expressionExperiment, BioAssayDimension dimension) Description copied from interface:ExpressionExperimentServiceRetrieve all the quantitation types used by the given experiment and dimension.- Specified by:
getQuantitationTypesin interfaceExpressionExperimentService
-
getQuantitationTypes
@Transactional(readOnly=true) public Collection<QuantitationType> getQuantitationTypes(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, Class<? extends BulkExpressionDataVector> dataVectorType) - Specified by:
getQuantitationTypesin interfaceExpressionExperimentService
-
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:
-
getSampleRemovalEvents
public Map<ExpressionExperiment, Collection<AuditEvent>> getSampleRemovalEvents(Collection<ExpressionExperiment> expressionExperiments) - Specified by:
getSampleRemovalEventsin interfaceExpressionExperimentService
-
getSubSetsWithBioAssays
public Collection<ExpressionExperimentSubSet> getSubSetsWithBioAssays(ExpressionExperiment expressionExperiment) Description copied from interface:ExpressionExperimentServiceObtain all the subsets for a given dataset.- Specified by:
getSubSetsWithBioAssaysin interfaceExpressionExperimentService
-
getSubSetsWithBioAssays
public Map<ExpressionExperiment, Collection<ExpressionExperimentSubSet>> getSubSetsWithBioAssays(Collection<ExpressionExperiment> expressionExperiments) Description copied from interface:ExpressionExperimentServiceBatched variant ofExpressionExperimentService.getSubSetsWithBioAssays(ExpressionExperiment): obtain subsets for every experiment in the input collection in a single query, keyed by source experiment.Replaces the
for ee : ees -> getSubSetsWithBioAssays(ee)N+1 pattern with one round-trip. Experiments without subsets are present in the result map with an empty collection so callers can iterate without null-checks.ACL_SECURABLE_COLLECTION_READvalidates every input experiment is readable; the returned subsets inherit ACL semantics from their source experiment (they are not themselves separately ACL'd).- Specified by:
getSubSetsWithBioAssaysin interfaceExpressionExperimentService- Parameters:
expressionExperiments- experiments to fetch subsets for; may be empty- Returns:
- a map from each input experiment to its subsets (empty collection if none)
-
getSubSetsWithCharacteristics
public Collection<ExpressionExperimentSubSet> getSubSetsWithCharacteristics(ExpressionExperiment ee) Description copied from interface:ExpressionExperimentServiceObtain all the subsets for a given dataset.Subsets characteristics are initialized and assays are thawed as per
Thaws.thawBioAssay(BioAssay).- Specified by:
getSubSetsWithCharacteristicsin interfaceExpressionExperimentService
-
getSubSetsByDimension
public Map<BioAssayDimension, Set<ExpressionExperimentSubSet>> getSubSetsByDimension(ExpressionExperiment expressionExperiment) Description copied from interface:ExpressionExperimentServiceObtain all the subsets organized by dimension for a given dataset.- Specified by:
getSubSetsByDimensionin interfaceExpressionExperimentService
-
getSubSetsByDimensionWithBioAssays
public Map<BioAssayDimension, Set<ExpressionExperimentSubSet>> getSubSetsByDimensionWithBioAssays(ExpressionExperiment expressionExperiment) Description copied from interface:ExpressionExperimentServiceObtain all the subsets organized by dimension for a given dataset.Assays are thawed as per
Thaws.thawBioAssay(BioAssay).- Specified by:
getSubSetsByDimensionWithBioAssaysin interfaceExpressionExperimentService
-
getSubSets
public Collection<ExpressionExperimentSubSet> getSubSets(ExpressionExperiment expressionExperiment, BioAssayDimension dimension) Description copied from interface:ExpressionExperimentServiceObtain the subsets for a particular dimension.- Specified by:
getSubSetsin interfaceExpressionExperimentService
-
getSubSetsWithBioAssays
public Collection<ExpressionExperimentSubSet> getSubSetsWithBioAssays(ExpressionExperiment expressionExperiment, BioAssayDimension dimension) Description copied from interface:ExpressionExperimentServiceObtain the subsets for a particular dimension.Assays are lightly thawed.
- Specified by:
getSubSetsWithBioAssaysin interfaceExpressionExperimentService
-
getSubSetsByFactorValue
public Map<ExperimentalFactor, Map<FactorValue, ExpressionExperimentSubSet>> getSubSetsByFactorValue(ExpressionExperiment expressionExperiment, BioAssayDimension dimension) Description copied from interface:ExpressionExperimentServiceReconstitute the FV to subset mapping for a given experiment.This will generally return a single factor that was used for splitting the dataset. However, if there are confounding factors, those will be returned as well.
- Specified by:
getSubSetsByFactorValuein interfaceExpressionExperimentService
-
getSubSetsByFactorValue
public Map<FactorValue, ExpressionExperimentSubSet> getSubSetsByFactorValue(ExpressionExperiment expressionExperiment, ExperimentalFactor experimentalFactor, BioAssayDimension dimension) Description copied from interface:ExpressionExperimentServiceReconstitute the FV to subset mapping for a given experiment and factor.- Specified by:
getSubSetsByFactorValuein interfaceExpressionExperimentService
-
getSubSetsByFactorValueWithCharacteristicsAndBioAssays
public Map<FactorValue, ExpressionExperimentSubSet> getSubSetsByFactorValueWithCharacteristicsAndBioAssays(ExpressionExperiment expressionExperiment, ExperimentalFactor experimentalFactor, BioAssayDimension dimension) Description copied from interface:ExpressionExperimentServiceReconstitute the FV to subset mapping for a given experiment and factor.Subsets characteristics are initialized and assays are thawed as per
Thaws.thawBioAssay(BioAssay).- Specified by:
getSubSetsByFactorValueWithCharacteristicsAndBioAssaysin interfaceExpressionExperimentService
-
getSubSetByIdWithCharacteristics
public ExpressionExperimentSubSet getSubSetByIdWithCharacteristics(ExpressionExperiment ee, Long subSetId) - Specified by:
getSubSetByIdWithCharacteristicsin interfaceExpressionExperimentService
-
getSubSetByIdWithCharacteristicsAndBioAssays
public ExpressionExperimentSubSet getSubSetByIdWithCharacteristicsAndBioAssays(ExpressionExperiment ee, Long subSetId) Description copied from interface:ExpressionExperimentServiceObtain a particular subset by ID.Subsets characteristics are initialized and assays are thawed as per
Thaws.thawBioAssay(BioAssay).- Specified by:
getSubSetByIdWithCharacteristicsAndBioAssaysin interfaceExpressionExperimentService
-
getTaxa
@Transactional(readOnly=true) public Map<ExpressionExperiment, Taxon> getTaxa(Collection<ExpressionExperiment> ees) Description copied from interface:ExpressionExperimentServiceReturn the taxon for each of the given experiments.- Specified by:
getTaxain interfaceExpressionExperimentService
-
getTaxon
Description copied from interface:ExpressionExperimentServiceReturns the taxon of the given experiment.- Specified by:
getTaxonin interfaceExpressionExperimentService- Returns:
- taxon, or null if the experiment taxon cannot be determined (i.e., if it has no samples).
-
isSingleCell
Description copied from interface:ExpressionExperimentServiceIndicate if the given experiment is a single-cell experiment.Gemma does not treat single-cell experiments differently from other experiments, so we need to rely on various aspect of the dataset to determine if it is a single-cell experiment.
- Specified by:
isSingleCellin interfaceExpressionExperimentService
-
isRNASeq
- Specified by:
isRNASeqin interfaceExpressionExperimentService- Parameters:
expressionExperiment- ee- Returns:
- true if this experiment was run on a sequencing-based platform.
-
isTwoChannel
@Deprecated @Transactional(readOnly=true) public boolean isTwoChannel(ExpressionExperiment expressionExperiment) Deprecated.Description copied from interface:ExpressionExperimentServiceTest if this experiment was run on a two-color microarray platform.- Specified by:
isTwoChannelin interfaceExpressionExperimentService
-
isTroubled
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
public Slice<ExpressionExperimentDetailsValueObject> loadDetailsValueObjects(@Nullable Collection<Long> ids, @Nullable Taxon taxon, @Nullable Sort sort, int offset, int limit) - Specified by:
loadDetailsValueObjectsin interfaceExpressionExperimentService- See Also:
-
loadDetailsValueObjectsWithCache
public Slice<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsWithCache(Collection<Long> ids, @Nullable Taxon taxon, @Nullable Sort sort, int offset, int limit) - Specified by:
loadDetailsValueObjectsWithCachein interfaceExpressionExperimentService
-
loadDetailsValueObjectsByIds
public List<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIds(Collection<Long> ids) - Specified by:
loadDetailsValueObjectsByIdsin interfaceExpressionExperimentService
-
loadDetailsValueObjectsByIdsWithCache
public List<ExpressionExperimentDetailsValueObject> loadDetailsValueObjectsByIdsWithCache(Collection<Long> ids) - Specified by:
loadDetailsValueObjectsByIdsWithCachein interfaceExpressionExperimentService
-
loadBlacklistedValueObjects
public Slice<ExpressionExperimentValueObject> loadBlacklistedValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit) - Specified by:
loadBlacklistedValueObjectsin interfaceExpressionExperimentService
-
loadBlacklistedValueObjectsByCursor
public CursorPage<ExpressionExperimentValueObject> loadBlacklistedValueObjectsByCursor(@Nullable Filters filters, Sort sort, @Nullable Cursor cursor, int limit) Description copied from interface:ExpressionExperimentServiceCursor-mode counterpart toExpressionExperimentService.loadBlacklistedValueObjects(Filters, Sort, int, int). Same GROUP_ADMIN gate; the cursor DAO currently forces a single-component+idsort (recce §3.4) until the index audit lands.- Specified by:
loadBlacklistedValueObjectsByCursorin interfaceExpressionExperimentService- See Also:
-
loadLackingFactors
- Specified by:
loadLackingFactorsin interfaceExpressionExperimentService
-
loadLackingTags
- Specified by:
loadLackingTagsin interfaceExpressionExperimentService
-
loadValueObjectsByIdsWithRelationsAndCache
public List<ExpressionExperimentValueObject> loadValueObjectsByIdsWithRelationsAndCache(List<Long> ids) Description copied from interface:ExpressionExperimentServiceLoad VOs for the given dataset IDs and initialize their relations likeSecurableFilteringVoEnabledService.load(Filters, Sort).The order of VOs is preserved.
- Specified by:
loadValueObjectsByIdsWithRelationsAndCachein interfaceExpressionExperimentService
-
loadValueObjectsByIds
public List<ExpressionExperimentValueObject> loadValueObjectsByIds(List<Long> ids, boolean maintainOrder) Description copied from interface:ExpressionExperimentServiceVariant ofBaseVoEnabledService.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
Description copied from interface:ExpressionExperimentServiceWill add the vocab 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.
-
removeCharacteristics
public void removeCharacteristics(ExpressionExperiment ee, Collection<Characteristic> characteristicsToRemove) - Specified by:
removeCharacteristicsin interfaceExpressionExperimentService
-
updateAnnotations
@Transactional @AuditedConditional(value=ManualAnnotationEvent.class, when="#result > 0", messageSpel="'Replaced annotations via API (' + #result + ' change(s))'") public int updateAnnotations(ExpressionExperiment ee, Collection<Characteristic> desired) Idempotent set-replace for an EE's direct characteristic set. See the interface javadoc.Implementation: diff current vs desired by (category, categoryUri, value, valueUri) using
CharacteristicUtils.equals(String, String, String, String); preserved characteristics retain their identity (no churn for unchanged tags), drops go throughcharacteristicService.remove, adds get anICevidence code by default. Emits a singleManualAnnotationEventwhen the desired set differs from the current set.- Specified by:
updateAnnotationsin interfaceExpressionExperimentService- Parameters:
ee- the experiment whose characteristic set is being replaceddesired- the desired characteristic set. Each member must have a non-blank category and value (URIs optional). The collection itself may be empty (to clear all tags).- Returns:
- total number of characteristic changes applied (added + removed). Zero means the
desired set already matched the current set (no-op, no audit event written). Callers
that don't care about the count can safely ignore the value. The non-void return is
what lets
@AuditedConditional(when = "#result > 0", ...)fire the audit event only on actual change branches — seeAUDIT_PHASE_C_RECCE.mdcandidate #2 andAuditedConditionaljavadoc.
-
updatePublications
@Transactional public void updatePublications(ExpressionExperiment ee, BibliographicReference primaryPublication, Collection<BibliographicReference> otherRelevantPublications) Replace an EE's primary + other-relevant publications, recording every one as a bare curator assertion. See the interface javadoc.- Specified by:
updatePublicationsin interfaceExpressionExperimentService- Parameters:
ee- the experiment whose publications are being replaced.primaryPublication- the desired primary publication, ornullto clear it.otherRelevantPublications- the desired other-relevant-publication set (may be empty). Any reference equal toprimaryPublicationis ignored so the primary is not duplicated into the other-relevant set.
-
updatePublications
@Transactional public void updatePublications(ExpressionExperiment ee, @Nullable PublicationAssertion primaryPublication, Collection<PublicationAssertion> otherRelevantPublications, @Nullable Collection<PublicationAssertion> rejectedPublications) Replace an EE's publications and the evidence behind them. See the interface javadoc.Set-replace: the other-relevant set is cleared and repopulated from
otherRelevantPublications(skipping any entry that equals the incoming primary, so the primary never doubles as an other-relevant row), and the primary is set toprimaryPublication(or cleared when null). Persisted through the inheritedupdate(ee), which carries the audit event — matching the legacysetPrimaryPublication(...) + update(ee)flow the gemma-web controller and the CLI used.The assertions are reconciled first, on purpose. It is the step that can refuse — a publication standing rejected by an authority the caller does not outrank throws — and doing it before the links are touched means the refusal happens with the experiment unmodified rather than relying on the transaction to undo a half-applied change.
- Specified by:
updatePublicationsin interfaceExpressionExperimentService- Parameters:
ee- the experiment whose publications are being replaced.primaryPublication- the desired primary publication and its evidence, ornullto clear it.otherRelevantPublications- the desired other-relevant set with evidence (may be empty). Any entry naming the primary's reference is ignored.rejectedPublications- publications to record as ruled out for this experiment, replacing the standing set — an empty collection clears every rejection. Passnullto leave the standing rejections alone, which is what a caller that does not manage them wants: a rejection is not returned by the plain publications read, so a client that writes back what it read has not seen them and its silence must not delete them. A reference given both here and as accepted is anIllegalArgumentException.
-
updateNameAndDescription
@Transactional public boolean updateNameAndDescription(ExpressionExperiment ee, @Nullable String name, @Nullable String description) Description copied from interface:ExpressionExperimentServiceUpdate the curator-editable "basics" ofee: itsname(title) and/ordescription. Anullargument leaves that field untouched (partial update); a non-null argument replaces it. Closes the name/description half of the retired gemma-webupdateBasics(short_name has its own path; publications moved toExpressionExperimentService.updatePublications(ExpressionExperiment, BibliographicReference, Collection)).- Specified by:
updateNameAndDescriptionin interfaceExpressionExperimentService- Parameters:
ee- the experiment.name- the new name, ornullto leave it unchanged. Must not be blank if provided.description- the new description, ornullto leave it unchanged.- Returns:
trueif any field actually changed (so the caller writes an audit event only on a real change),falseif the supplied values already matched.
-
commitCuration
@Transactional public CurationCommitResult commitCuration(ExpressionExperiment ee, CurationCommitRequest request, boolean dryRun) Description copied from interface:ExpressionExperimentServiceApply an all-or-none curation commit toee, reconciling the sections carried inrequestin a single transaction (phase 1: basics + publications). This is the transactional core of the compositePUT /datasets/{id}/curationendpoint — either every section applies or, on any failure, nothing does.When
dryRunistruethe change tally is computed without writing anything (backs/curation/preflight). Optimistic concurrency is enforced againstCurationCommitRequest.getExpectedLastUpdated(): a stale baseline throwsOptimisticLockingFailureException(the web layer maps it to 409). A short-name change withoutCurationCommitRequest.isShortNameChangeAllowed()throwsAccessDeniedException, rolling the whole commit back.RUN_AS_AGENTis what lets an applied commit refresh this experiment'sEXPRESSION_EXPERIMENT2CHARACTERISTICrows before returning:TableMaintenanceUtilis@Secured("GROUP_AGENT")and a curator holdsGROUP_USER, so without the elevation the call fails on authorization, not on timing.RunAsManagerImplswaps in a token carrying the caller's own authorities plusGROUP_RUN_AS_AGENTfor the duration of this invocation, and the role hierarchy escalates that toGROUP_AGENT— the same mechanismUserManagerandExpressionExperimentReportServicealready use.What that opens up, stated plainly: for the length of this call every
@Secured("GROUP_AGENT")method reachable from the commit becomes callable. It grants no ACL permission (the ACL authorization strategy keys onGROUP_ADMIN, and the hierarchy runsGROUP_ADMIN > GROUP_AGENT, not the reverse), does not change the principal, and ends when the method returns.- Specified by:
commitCurationin interfaceExpressionExperimentService- Returns:
- per-section change counts (identical whether applied or dry-run).
-
addAnnotation
@Transactional @Audited(value=TagAddedEvent.class, messageSpel="'Added tag ' + #vc.category + ' = ' + #vc.value") public Characteristic addAnnotation(ExpressionExperiment ee, Characteristic vc) Per-tag REST-write counterpart toaddCharacteristic(ExpressionExperiment, Characteristic).Emits one
TagAddedEventper call via the@Auditedaspect; rejects duplicates by(categoryUri, valueUri)so thePOST /annotations/datasets/{id}/annotationshandler can surface a409 Conflict. Delegates the actual persistence toExpressionExperimentWriteService.addCharacteristic(ExpressionExperiment, Characteristic)(which does theIC-evidence-code defaulting and the Hibernate session attach).- Specified by:
addAnnotationin interfaceExpressionExperimentService- Parameters:
ee- the experiment to add the tag to.vc- the characteristic to add. Must have a non-blank category and value; if the evidence code is null it defaults toGOEvidenceCode.IC.- Returns:
- the persistent
Characteristicwith its assigned id.
-
addAnnotation
@Transactional @Audited(value=TagAddedEvent.class, messageSpel="'Added tag ' + #vc.category + ' = ' + #vc.value + (#reason != null ? ' \u2014 ' + #reason : '')") public Characteristic addAnnotation(ExpressionExperiment ee, Characteristic vc, @Nullable String reason) Reason-carrying overload. Separate method rather than a parameter on the one above so that every existing caller and its tests keep the signature they have; the two differ only in the audit note the aspect writes.🛑 Both are audited and both delegate to the same private body. The delegation is a plain
thiscall, so the inner method is NOT re-advised and one call still writes one event.- Specified by:
addAnnotationin interfaceExpressionExperimentService
-
removeAnnotation
@Transactional @AuditedConditional(value=TagRemovedEvent.class, when="#result != null", messageSpel="'Removed tag ' + #result.category + ' = ' + #result.value") @Nullable public Characteristic removeAnnotation(ExpressionExperiment ee, Long annotationId) Per-tag REST-write counterpart toremoveCharacteristics(ExpressionExperiment, Collection). Returnsnullwhen the id is not inee's characteristic set so the REST handler can surface a404.- Specified by:
removeAnnotationin interfaceExpressionExperimentService- Parameters:
ee- the experiment.annotationId- the id of theCharacteristicto remove.- Returns:
- the removed characteristic, or
nullif no characteristic with that id is currently attached toee.
-
removeAnnotation
@Transactional @AuditedConditional(value=TagRemovedEvent.class, when="#result != null", messageSpel="'Removed tag ' + #result.category + ' = ' + #result.value + (#reason != null ? ' \u2014 ' + #reason : '')") @Nullable public Characteristic removeAnnotation(ExpressionExperiment ee, Long annotationId, @Nullable String reason) Reason-carrying overload; seeaddAnnotation(ExpressionExperiment, Characteristic, String).- Specified by:
removeAnnotationin interfaceExpressionExperimentService
-
thaw
- Specified by:
thawin interfaceExpressionExperimentService- See Also:
-
thawLite
- Specified by:
thawLitein interfaceExpressionExperimentService- See Also:
-
thawLiter
- Specified by:
thawLiterin interfaceExpressionExperimentService- See Also:
-
thawBioAssays
- Specified by:
thawBioAssaysin interfaceExpressionExperimentService- See Also:
-
remove
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 interfaceSecurableBaseImmutableService<ExpressionExperiment>- Overrides:
removein classAbstractService<ExpressionExperiment>- See Also:
-
remove
- Specified by:
removein interfaceBaseImmutableService<ExpressionExperiment>- Specified by:
removein interfaceSecurableBaseImmutableService<ExpressionExperiment>- Overrides:
removein classAbstractService<ExpressionExperiment>- See Also:
-
isBlackListed
- Specified by:
isBlackListedin interfaceExpressionExperimentService
-
isSuitableForDEA
- 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(int maxResults) - Specified by:
getExperimentsLackingPublicationsin interfaceExpressionExperimentService- Parameters:
maxResults- maximum number of rows to return; passInteger.MAX_VALUEfor unbounded (use with care on prod, where this set is in the thousands).- Returns:
- collection of GEO experiments which lack an association with a publication (non-GEO experiments will be ignored)
-
updateQuantitationType
public void updateQuantitationType(ExpressionExperiment ee, QuantitationType qt, @Nullable QuantitationType previousPreferredQt) Description copied from interface:ExpressionExperimentServiceUpdate a quantitation type.If the provided QT is preferred (i.e. either single-cell, raw or processed), all other QTs in the experiment for that type of vectors will be set to non-preferred.
- Specified by:
updateQuantitationTypein interfaceExpressionExperimentService- Parameters:
previousPreferredQt- if theQuantitationType.getIsPreferred()(orQuantitationType.getIsSingleCellPreferred()for single-cell data) status is changing, this indicates which QT was previously preferred. If null, it is assumed that no QT was previously preferred. This only affects the event added to the audit trail, all other QTs will have their preferred status updated regardless.- See Also:
-
updateMeanVarianceRelation
public MeanVarianceRelation updateMeanVarianceRelation(ExpressionExperiment ee, MeanVarianceRelation mvr) - Specified by:
updateMeanVarianceRelationin interfaceExpressionExperimentService
-
countBioMaterials
- Specified by:
countBioMaterialsin interfaceExpressionExperimentService- See Also:
-