Class ProcessedExpressionDataVectorServiceImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractService<ProcessedExpressionDataVector>
ubic.gemma.persistence.service.expression.bioAssayData.AbstractBulkExpressionDataVectorService<ProcessedExpressionDataVector>
ubic.gemma.persistence.service.expression.bioAssayData.ProcessedExpressionDataVectorServiceImpl
- All Implemented Interfaces:
BaseImmutableService<ProcessedExpressionDataVector>,BaseReadOnlyService<ProcessedExpressionDataVector>,BaseService<ProcessedExpressionDataVector>,BulkExpressionDataVectorService<ProcessedExpressionDataVector>,ProcessedExpressionDataVectorService
@Service
public class ProcessedExpressionDataVectorServiceImpl
extends AbstractBulkExpressionDataVectorService<ProcessedExpressionDataVector>
implements ProcessedExpressionDataVectorService
- Author:
- Paul
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected -
Method Summary
Modifier and TypeMethodDescriptionintcreateProcessedDataVectors(ExpressionExperiment expressionExperiment, boolean updateRanks) Create processed vectors and optionally update ranks.intcreateProcessedDataVectors(ExpressionExperiment expressionExperiment, boolean updateRanks, boolean ignoreQuantitationMismatch) Create processed vectors and optionally update ranks.voidgetDiffExVectors(Long resultSetId, double threshold, int maxNumberOfResults) getExpressionLevels(Collection<ExpressionExperiment> ees, Collection<Gene> genes, boolean keepGeneNonSpecific, String consolidateMode) getExpressionLevelsByIds(Collection<Long> eeIds, Collection<Gene> genes, boolean keepGeneNonSpecific, String consolidateMode) Retrieve expression levels by dataset IDs.getExpressionLevelsDiffEx(Collection<ExpressionExperiment> ees, Long diffExResultSetId, double threshold, int max, boolean keepGeneNonSpecific, String consolidateMode) getExpressionLevelsPca(Collection<ExpressionExperiment> ees, int limit, int component, boolean keepGeneNonSpecific, String consolidateMode) getProcessedDataArrays(Collection<ExpressionExperiment> expressionExperiments, Collection<Long> genes) getProcessedDataArrays(BioAssaySet bioAssaySet, Collection<Long> genes) getProcessedDataArrays(ExpressionExperiment expressionExperiment) getProcessedDataArraysByProbe(Collection<ExpressionExperiment> expressionExperiments, Collection<CompositeSequence> compositeSequences) getProcessedDataArraysByProbe(ExpressionExperiment ee, Collection<CompositeSequence> compositeSequences) getProcessedDataVectors(ExpressionExperiment expressionExperiment) getProcessedDataVectors(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, int offset, int limit) getProcessedDataVectorsAndThaw(ExpressionExperiment expressionExperiment) Retrieve and thaw a collection of vectors for a given experiment.getProcessedDataVectorsDesignElements(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, int offset, int limit) getRandomProcessedDataArrays(ExpressionExperiment ee, int limit) getRanks(Collection<ExpressionExperiment> expressionExperiments, Collection<Gene> genes, ProcessedExpressionDataVectorDao.RankMethod method) intRemove the processed vectors of an EE.voidCreates new bioAssayDimensions to match the experimental design, reorders the data to match, updates.intreplaceProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors, boolean updateRanks) Replace the processed vectors of a EE with the given vectors.voidUpdate the ranks of the processed vectors for the given experiment.Methods inherited from class ubic.gemma.persistence.service.expression.bioAssayData.AbstractBulkExpressionDataVectorService
find, find, find, findAndThaw, findAndThaw, findAndThaw, thawMethods inherited from class ubic.gemma.persistence.service.AbstractService
countAll, create, create, ensureInSession, ensureInSession, find, findOrCreate, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, remove, remove, remove, save, save, streamAll, streamAll, update, updateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, find, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, loadOrFail, streamAll, streamAllMethods inherited from interface ubic.gemma.persistence.service.expression.bioAssayData.BulkExpressionDataVectorService
find, find, find, findAndThaw, findAndThaw, findAndThaw, thaw
-
Constructor Details
-
ProcessedExpressionDataVectorServiceImpl
@Autowired protected ProcessedExpressionDataVectorServiceImpl(ProcessedExpressionDataVectorDao mainDao)
-
-
Method Details
-
createProcessedDataVectors
@Transactional(rollbackFor=QuantitationTypeConversionException.class) public int createProcessedDataVectors(ExpressionExperiment expressionExperiment, boolean updateRanks) throws QuantitationTypeConversionException Description copied from interface:ProcessedExpressionDataVectorServiceCreate processed vectors and optionally update ranks.Mismatch between quantitation type and data is ignored.
This also adds an audit event and evict the vectors from the cache.
- Specified by:
createProcessedDataVectorsin interfaceProcessedExpressionDataVectorService- Parameters:
updateRanks- whether to update the rnaks of the vectors or not- Throws:
QuantitationTypeConversionException- if the data cannot be converted, generally to log2 scale- See Also:
-
createProcessedDataVectors
@Transactional(rollbackFor={QuantitationTypeDetectionException.class,QuantitationTypeConversionException.class}) public int createProcessedDataVectors(ExpressionExperiment expressionExperiment, boolean updateRanks, boolean ignoreQuantitationMismatch) throws QuantitationTypeDetectionException, QuantitationTypeConversionException Description copied from interface:ProcessedExpressionDataVectorServiceCreate processed vectors and optionally update ranks.This also adds an audit event and evict the vectors from the cache.
- Specified by:
createProcessedDataVectorsin interfaceProcessedExpressionDataVectorService- Throws:
QuantitationTypeDetectionException- if the QT caanot be detected from data, never raised if ignoreQuantitationMismatch is set to trueQuantitationTypeConversionException- if the data cannot be converted, generally to log2 scale- See Also:
-
replaceProcessedDataVectors
@Transactional public int replaceProcessedDataVectors(ExpressionExperiment ee, Collection<ProcessedExpressionDataVector> vectors, boolean updateRanks) Description copied from interface:ProcessedExpressionDataVectorServiceReplace the processed vectors of a EE with the given vectors.Ranks are recomputed, no conversion of QT is done.
This also adds an audit event and evict the vectors from the cache.
- Specified by:
replaceProcessedDataVectorsin interfaceProcessedExpressionDataVectorService- Parameters:
ee- eevectors- non-persistent, all of the sameQuantitationTypeupdateRanks- whether to update ranks or not- See Also:
-
removeProcessedDataVectors
Description copied from interface:ProcessedExpressionDataVectorServiceRemove the processed vectors of an EE.This also adds an audit event and evict the vectors from the cache.
- Specified by:
removeProcessedDataVectorsin interfaceProcessedExpressionDataVectorService- See Also:
-
reorderByDesign
Description copied from interface:ProcessedExpressionDataVectorServiceCreates new bioAssayDimensions to match the experimental design, reorders the data to match, updates.This also adds an audit event and evict the vectors from the cache.
- Specified by:
reorderByDesignin interfaceProcessedExpressionDataVectorService
-
updateRanks
Description copied from interface:ProcessedExpressionDataVectorServiceUpdate the ranks of the processed vectors for the given experiment.This also adds an audit event and evict the vectors from the cache.
- Specified by:
updateRanksin interfaceProcessedExpressionDataVectorService
-
getExpressionLevels
@Transactional(readOnly=true) public List<ExperimentExpressionLevelsValueObject> getExpressionLevels(Collection<ExpressionExperiment> ees, Collection<Gene> genes, boolean keepGeneNonSpecific, @Nullable String consolidateMode) - Specified by:
getExpressionLevelsin interfaceProcessedExpressionDataVectorService- Parameters:
ees- expressionExperimentsgenes- geneskeepGeneNonSpecific- whether to keep vectors that are not specific to the geneconsolidateMode- how to consolidate the vectors when there is more than one- Returns:
- value objects containing structured information about the expression levels of given genes
-
getExpressionLevelsByIds
@Transactional(readOnly=true) public List<ExperimentExpressionLevelsValueObject> getExpressionLevelsByIds(Collection<Long> eeIds, Collection<Gene> genes, boolean keepGeneNonSpecific, @Nullable String consolidateMode) Description copied from interface:ProcessedExpressionDataVectorServiceRetrieve expression levels by dataset IDs.- Specified by:
getExpressionLevelsByIdsin interfaceProcessedExpressionDataVectorService- See Also:
-
getExpressionLevelsPca
@Transactional(readOnly=true) public List<ExperimentExpressionLevelsValueObject> getExpressionLevelsPca(Collection<ExpressionExperiment> ees, int limit, int component, boolean keepGeneNonSpecific, @Nullable String consolidateMode) - Specified by:
getExpressionLevelsPcain interfaceProcessedExpressionDataVectorService- Parameters:
ees- expressionExperimentslimit- thresholdcomponent- the principal componentkeepGeneNonSpecific- whether to keep vectors that are not specific to the geneconsolidateMode- how to consolidate the vectors when there is more than one- Returns:
- value objects containing structured information about the expression levels of genes highly loaded in the given principal component.
-
getExpressionLevelsDiffEx
@Transactional(readOnly=true) public List<ExperimentExpressionLevelsValueObject> getExpressionLevelsDiffEx(Collection<ExpressionExperiment> ees, Long diffExResultSetId, double threshold, int max, boolean keepGeneNonSpecific, @Nullable String consolidateMode) - Specified by:
getExpressionLevelsDiffExin interfaceProcessedExpressionDataVectorService- Parameters:
ees- eesdiffExResultSetId- the differential expression result set to accessthreshold- thresholdmax- max levelkeepGeneNonSpecific- whether to keep vectors that are not specific to the geneconsolidateMode- how to consolidate the vectors when there is more than one- Returns:
- value objects containing structured information about the expression levels of genes highly loaded in the given principal component.
-
getProcessedDataArrays
@Transactional(readOnly=true) public Collection<DoubleVectorValueObject> getProcessedDataArrays(Collection<ExpressionExperiment> expressionExperiments, Collection<Long> genes) - Specified by:
getProcessedDataArraysin interfaceProcessedExpressionDataVectorService- See Also:
-
getProcessedDataArrays
@Transactional(readOnly=true) public Collection<DoubleVectorValueObject> getProcessedDataArrays(BioAssaySet bioAssaySet, Collection<Long> genes) - Specified by:
getProcessedDataArraysin interfaceProcessedExpressionDataVectorService- See Also:
-
getProcessedDataArrays
@Transactional(readOnly=true) public Collection<DoubleVectorValueObject> getProcessedDataArrays(ExpressionExperiment expressionExperiment) - Specified by:
getProcessedDataArraysin interfaceProcessedExpressionDataVectorService- See Also:
-
getRandomProcessedDataArrays
@Transactional(readOnly=true) public Collection<DoubleVectorValueObject> getRandomProcessedDataArrays(ExpressionExperiment ee, int limit) - Specified by:
getRandomProcessedDataArraysin interfaceProcessedExpressionDataVectorService- See Also:
-
getProcessedDataArraysByProbe
@Transactional(readOnly=true) public Collection<DoubleVectorValueObject> getProcessedDataArraysByProbe(ExpressionExperiment ee, Collection<CompositeSequence> compositeSequences) - Specified by:
getProcessedDataArraysByProbein interfaceProcessedExpressionDataVectorService
-
getProcessedDataArraysByProbe
@Transactional(readOnly=true) public Collection<DoubleVectorValueObject> getProcessedDataArraysByProbe(Collection<ExpressionExperiment> expressionExperiments, Collection<CompositeSequence> compositeSequences) - Specified by:
getProcessedDataArraysByProbein interfaceProcessedExpressionDataVectorService- See Also:
-
getProcessedDataVectors
@Transactional(readOnly=true) public Collection<ProcessedExpressionDataVector> getProcessedDataVectors(ExpressionExperiment expressionExperiment) - Specified by:
getProcessedDataVectorsin interfaceProcessedExpressionDataVectorService- See Also:
-
getProcessedDataVectors
@Transactional(readOnly=true) public Slice<ProcessedExpressionDataVector> getProcessedDataVectors(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, int offset, int limit) - Specified by:
getProcessedDataVectorsin interfaceProcessedExpressionDataVectorService
-
getProcessedDataVectorsDesignElements
@Transactional(readOnly=true) public Slice<CompositeSequence> getProcessedDataVectorsDesignElements(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, int offset, int limit) - Specified by:
getProcessedDataVectorsDesignElementsin interfaceProcessedExpressionDataVectorService
-
getProcessedDataVectorsAndThaw
@Transactional(readOnly=true) public Collection<ProcessedExpressionDataVector> getProcessedDataVectorsAndThaw(ExpressionExperiment expressionExperiment) Description copied from interface:ProcessedExpressionDataVectorServiceRetrieve and thaw a collection of vectors for a given experiment.- Specified by:
getProcessedDataVectorsAndThawin interfaceProcessedExpressionDataVectorService- See Also:
-
getRanks
@Transactional(readOnly=true) public Map<ExpressionExperiment,Map<Gene, getRanksCollection<Double>>> (Collection<ExpressionExperiment> expressionExperiments, Collection<Gene> genes, ProcessedExpressionDataVectorDao.RankMethod method) - Specified by:
getRanksin interfaceProcessedExpressionDataVectorService- See Also:
-
getDiffExVectors
@Transactional(readOnly=true) public List<DoubleVectorValueObject> getDiffExVectors(Long resultSetId, double threshold, int maxNumberOfResults) - Specified by:
getDiffExVectorsin interfaceProcessedExpressionDataVectorService
-
evictFromCache
- Specified by:
evictFromCachein interfaceProcessedExpressionDataVectorService
-