Class ArrayDesignServiceImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractService<ArrayDesign>
ubic.gemma.persistence.service.AbstractFilteringVoEnabledService<ArrayDesign,ArrayDesignValueObject>
ubic.gemma.persistence.service.expression.arrayDesign.ArrayDesignServiceImpl
- All Implemented Interfaces:
BaseImmutableService<ArrayDesign>,BaseReadOnlyService<ArrayDesign>,BaseService<ArrayDesign>,BaseVoEnabledService<ArrayDesign,,ArrayDesignValueObject> SecurableBaseImmutableService<ArrayDesign>,SecurableBaseReadOnlyService<ArrayDesign>,SecurableBaseService<ArrayDesign>,SecurableBaseVoEnabledService<ArrayDesign,,ArrayDesignValueObject> SecurableFilteringVoEnabledService<ArrayDesign,,ArrayDesignValueObject> ArrayDesignService,FilteringService<ArrayDesign>,FilteringVoEnabledService<ArrayDesign,ArrayDesignValueObject>
@Service("arrayDesignService")
public class ArrayDesignServiceImpl
extends AbstractFilteringVoEnabledService<ArrayDesign,ArrayDesignValueObject>
implements ArrayDesignService
- Author:
- klc
- See Also:
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log -
Constructor Summary
ConstructorsConstructorDescriptionArrayDesignServiceImpl(ArrayDesignDao arrayDesignDao, AuditEventDao auditEventDao) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProbes(ArrayDesign arrayDesign, Collection<CompositeSequence> newProbes) longcountBioSequences(ArrayDesign arrayDesign) returns the number of bioSequences associated with this ArrayDesign idlongcountBlatResults(ArrayDesign arrayDesign) returns the number of BlatResults (BioSequence2GeneProduct) entries associated with this ArrayDesign id.longcountCompositeSequences(ArrayDesign arrayDesign) longFunction to return a count of all compositeSequences with bioSequence associationslongcountCompositeSequencesWithBioSequences(ArrayDesign arrayDesign) longFunction to return all composite sequences with blat resultslongcountCompositeSequencesWithBlatResults(ArrayDesign arrayDesign) longcountCompositeSequencesWithGenes(boolean useGene2Cs) Function to return a count of all composite sequences with associated genes.longcountCompositeSequencesWithGenes(ArrayDesign arrayDesign, boolean useGene2Cs) longcountExpressionExperiments(ArrayDesign arrayDesign) longcountGenes(boolean useGene2Cs) Returns a count of the number of genes associated with an array design.longcountGenes(ArrayDesign arrayDesign, boolean useGene2Cs) Returns the number of unique Genes associated with this ArrayDesign idlonglongcountWithCache(Filters filters) voiddeleteAlignmentData(ArrayDesign arrayDesign) remove sequence alignment results associated with the bioSequences for this array design.voiddeleteGeneProductAlignmentAssociations(ArrayDesign arrayDesign) voiddeleteGeneProductAnnotationAssociations(ArrayDesign arrayDesign) voiddeleteGeneProductAssociations(ArrayDesign arrayDesign) deletes the gene product associations on the specified array design.findByAlternateName(String queryString) findByManufacturer(String searchString) findByName(String name) findByShortName(String shortName) findByTaxon(Taxon taxon) Find by the primary taxon.findOneByAlternateName(String name) findOneByName(String name) getAlignments(ArrayDesign arrayDesign) Retrieves alignments for the platform elements, limited to those which map to a gene product (so not all blat results)getAllAssociatedBioAssays(ArrayDesign arrayDesign) getBioSequences(ArrayDesign arrayDesign) Return all the (unique) biosequences associated with the array design.getCompositeSequences(ArrayDesign arrayDesign) getCompositeSequences(ArrayDesign arrayDesign, int limit, int offset) getExpressionExperiments(ArrayDesign arrayDesign) getGenes(ArrayDesign arrayDesign, boolean useGene2Cs) getGenesByCompositeSequence(Collection<ArrayDesign> arrayDesign, boolean useGene2Cs) getGenesByCompositeSequence(ArrayDesign arrayDesign, boolean useGene2Cs) getLastGeneMapping(Collection<Long> ids) Gets the AuditEvents of the latest gene mapping for the specified array design ids.Gets the AuditEvents of the latest sequence analyses for the specified array design ids.Gets the AuditEvents of the latest sequence update for the specified array design ids.getSwitchedExperiments(ArrayDesign arrayDesign) Get the ids of experiments that "originally" used this platform, but which don't any more due to a platform switch.getTaxaFromBioSequences(ArrayDesign arrayDesign) Return the taxa for the array design.isMerged(Collection<Long> ids) isMergee(Collection<Long> ids) isSubsumed(Collection<Long> ids) isSubsumer(Collection<Long> ids) Load *generic* gene-based platforms.loadAndThaw(Long id) <T extends Exception>
ArrayDesignloadAndThawLiteOrFail(Long id, Function<String, T> exceptionSupplier, String message) Load a platform by ID and thaw it withArrayDesignService.thawLite(ArrayDesign)loadBlacklistedValueObjects(Filters filters, Sort sort, int offset, int limit) No need for ACL_VALUE_OBJECT_COLLECTION_READ because the filtering is done in the query.loadValueObjectsForEE(Long eeId) Loads the Value Objects for array designs used by expression experiment with the given IDloadValueObjectsWithCache(Filters filters, Sort sort) voidremoveBiologicalCharacteristics(ArrayDesign arrayDesign) Remove all associations that this array design has with BioSequences.thaw(Collection<ArrayDesign> aas) Thaw a collection of platforms.thaw(ArrayDesign arrayDesign) Thaw a given platform.thawCompositeSequences(ArrayDesign arrayDesign) Thaw the composite sequences of a given platformthawLite(Collection<ArrayDesign> arrayDesigns) thawLite(ArrayDesign arrayDesign) Perform a less intensive thaw of an array design: not the composite sequences.booleanupdateSubsumingStatus(ArrayDesign candidateSubsumer, ArrayDesign candidateSubsumee) Test whether the candidateSubsumer subsumes the candidateSubsumee.Methods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledService
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, load, load, loadAllValueObjects, loadIds, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjects, loadValueObjects, loadValueObjectsByIdsMethods 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, 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, getElementClass, loadOrFail, loadOrFailMethods inherited from interface ubic.gemma.persistence.service.FilteringService
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubqueryMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseImmutableService
create, create, findOrCreate, remove, removeMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseReadOnlyService
find, findOrFail, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, streamAll, streamAllMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseService
save, save, update, updateMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableBaseVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjectById, loadValueObjects, loadValueObjectsByIdsMethods inherited from interface ubic.gemma.persistence.service.common.auditAndSecurity.SecurableFilteringVoEnabledService
load, load, loadIds, loadValueObjects, loadValueObjects
-
Constructor Details
-
ArrayDesignServiceImpl
@Autowired public ArrayDesignServiceImpl(ArrayDesignDao arrayDesignDao, AuditEventDao auditEventDao)
-
-
Method Details
-
loadAllGenericGenePlatforms
Description copied from interface:ArrayDesignServiceLoad *generic* gene-based platforms.- Specified by:
loadAllGenericGenePlatformsin interfaceArrayDesignService
-
loadAndThaw
- Specified by:
loadAndThawin interfaceArrayDesignService
-
loadAndThawLiteOrFail
@Transactional(readOnly=true) public <T extends Exception> ArrayDesign loadAndThawLiteOrFail(Long id, Function<String, T> exceptionSupplier, String message) throws TDescription copied from interface:ArrayDesignServiceLoad a platform by ID and thaw it withArrayDesignService.thawLite(ArrayDesign)- Specified by:
loadAndThawLiteOrFailin interfaceArrayDesignService- Throws:
T
-
loadWithAuditTrail
- Specified by:
loadWithAuditTrailin interfaceArrayDesignService
-
addProbes
@Transactional public void addProbes(ArrayDesign arrayDesign, Collection<CompositeSequence> newProbes) - Specified by:
addProbesin interfaceArrayDesignService
-
deleteAlignmentData
Description copied from interface:ArrayDesignServiceremove sequence alignment results associated with the bioSequences for this array design. This can indirectly * affect other platforms that use the same sequences.- Specified by:
deleteAlignmentDatain interfaceArrayDesignService- Parameters:
arrayDesign- AD
-
deleteGeneProductAssociations
Description copied from interface:ArrayDesignServicedeletes the gene product associations on the specified array design. If you only want to delete alignment-based or annotation-based associations, use deleteGeneProductAlignmentAssociation deleteGeneProductAnnotationAssociations.- Specified by:
deleteGeneProductAssociationsin interfaceArrayDesignService- Parameters:
arrayDesign- AD
-
findByAlternateName
@Transactional(readOnly=true) public Collection<ArrayDesign> findByAlternateName(String queryString) - Specified by:
findByAlternateNamein interfaceArrayDesignService
-
findOneByAlternateName
- Specified by:
findOneByAlternateNamein interfaceArrayDesignService
-
findByManufacturer
@Transactional(readOnly=true) public Collection<ArrayDesign> findByManufacturer(String searchString) - Specified by:
findByManufacturerin interfaceArrayDesignService
-
findByName
- Specified by:
findByNamein interfaceArrayDesignService- See Also:
-
findByCompositeSequenceName
@Transactional(readOnly=true) public Collection<ArrayDesign> findByCompositeSequenceName(String name) - Specified by:
findByCompositeSequenceNamein interfaceArrayDesignService
-
findOneByName
- Specified by:
findOneByNamein interfaceArrayDesignService
-
findByShortName
- Specified by:
findByShortNamein interfaceArrayDesignService
-
findByTaxon
Description copied from interface:ArrayDesignServiceFind by the primary taxon.- Specified by:
findByTaxonin interfaceArrayDesignService- Parameters:
taxon- taxon- Returns:
- ADs
-
getAlignments
@Transactional(readOnly=true) public Map<CompositeSequence,Collection<BlatResult>> getAlignments(ArrayDesign arrayDesign) Description copied from interface:ArrayDesignServiceRetrieves alignments for the platform elements, limited to those which map to a gene product (so not all blat results)- Specified by:
getAlignmentsin interfaceArrayDesignService- Parameters:
arrayDesign- AD- Returns:
- map of composite sequences to alignments, if available.
-
getAllAssociatedBioAssays
@Transactional(readOnly=true) public Collection<BioAssay> getAllAssociatedBioAssays(ArrayDesign arrayDesign) - Specified by:
getAllAssociatedBioAssaysin interfaceArrayDesignService
-
getBioSequences
@Transactional(readOnly=true) public Map<CompositeSequence,BioSequence> getBioSequences(ArrayDesign arrayDesign) Description copied from interface:ArrayDesignServiceReturn all the (unique) biosequences associated with the array design. Composite sequences that don't have sequences are also returned, so this can be used to do a thawRawAndProcessed, in effect.- Specified by:
getBioSequencesin interfaceArrayDesignService- Parameters:
arrayDesign- AD- Returns:
- map of composite seqs. to bio seqs.
-
getGenes
@Transactional(readOnly=true) public Collection<Gene> getGenes(ArrayDesign arrayDesign, boolean useGene2Cs) - Specified by:
getGenesin interfaceArrayDesignService- See Also:
-
getGenesByCompositeSequence
@Transactional(readOnly=true) public Map<CompositeSequence,Set<Gene>> getGenesByCompositeSequence(ArrayDesign arrayDesign, boolean useGene2Cs) - Specified by:
getGenesByCompositeSequencein interfaceArrayDesignService- See Also:
-
getGenesByCompositeSequence
@Transactional(readOnly=true) public Map<CompositeSequence,Set<Gene>> getGenesByCompositeSequence(Collection<ArrayDesign> arrayDesign, boolean useGene2Cs) - Specified by:
getGenesByCompositeSequencein interfaceArrayDesignService
-
countCompositeSequences
- Specified by:
countCompositeSequencesin interfaceArrayDesignService
-
getCompositeSequences
@Transactional(readOnly=true) public Collection<CompositeSequence> getCompositeSequences(ArrayDesign arrayDesign) - Specified by:
getCompositeSequencesin interfaceArrayDesignService
-
getCompositeSequences
@Transactional(readOnly=true) public Collection<CompositeSequence> getCompositeSequences(ArrayDesign arrayDesign, int limit, int offset) - Specified by:
getCompositeSequencesin interfaceArrayDesignService
-
getExpressionExperiments
@Transactional(readOnly=true) public Collection<ExpressionExperiment> getExpressionExperiments(ArrayDesign arrayDesign) - Specified by:
getExpressionExperimentsin interfaceArrayDesignService
-
countExpressionExperiments
- Specified by:
countExpressionExperimentsin interfaceArrayDesignService
-
getLastGeneMapping
Description copied from interface:ArrayDesignServiceGets the AuditEvents of the latest gene mapping for the specified array design ids. This returns a map of id -> AuditEvent. If the events do not exist, the map entry will point to null.- Specified by:
getLastGeneMappingin interfaceArrayDesignService- Parameters:
ids- ids- Returns:
- map of IDs to events
-
getLastRepeatAnalysis
@Transactional(readOnly=true) public Map<Long,AuditEvent> getLastRepeatAnalysis(Collection<Long> ids) - Specified by:
getLastRepeatAnalysisin interfaceArrayDesignService
-
getLastSequenceAnalysis
@Transactional(readOnly=true) public Map<Long,AuditEvent> getLastSequenceAnalysis(Collection<Long> ids) Description copied from interface:ArrayDesignServiceGets the AuditEvents of the latest sequence analyses for the specified array design ids. This returns a map of id -> AuditEvent. If the events do not exist, the map entry will point to null.- Specified by:
getLastSequenceAnalysisin interfaceArrayDesignService- Parameters:
ids- ids- Returns:
- map of IDs to events
-
getLastSequenceUpdate
@Transactional(readOnly=true) public Map<Long,AuditEvent> getLastSequenceUpdate(Collection<Long> ids) Description copied from interface:ArrayDesignServiceGets the AuditEvents of the latest sequence update for the specified array design ids. This returns a map of id -> AuditEvent. If the events do not exist, the map entry will point to null.- Specified by:
getLastSequenceUpdatein interfaceArrayDesignService- Parameters:
ids- ids- Returns:
- map of IDs to events
-
getPerTaxonCount
- Specified by:
getPerTaxonCountin interfaceArrayDesignService- Returns:
- a map of taxon -> count of how many array designs there are for that taxon. Taxa with no arrays are excluded.
-
getSwitchedExperiments
@Transactional(readOnly=true) public Collection<ExpressionExperiment> getSwitchedExperiments(ArrayDesign arrayDesign) Description copied from interface:ArrayDesignServiceGet the ids of experiments that "originally" used this platform, but which don't any more due to a platform switch. Note that for some old platforms we may not have recorded this information.- Specified by:
getSwitchedExperimentsin interfaceArrayDesignService- Parameters:
arrayDesign- id of the platform- Returns:
- collection of EE ids
-
countSwitchedExpressionExperiments
- Specified by:
countSwitchedExpressionExperimentsin interfaceArrayDesignService
-
getTaxaFromBioSequences
@Transactional(readOnly=true) public Collection<Taxon> getTaxaFromBioSequences(ArrayDesign arrayDesign) Description copied from interface:ArrayDesignServiceReturn the taxa for the array design. This can be multiple, or zero if the array is not processed.- Specified by:
getTaxaFromBioSequencesin interfaceArrayDesignService- Parameters:
arrayDesign- The id of the array design- Returns:
- The Set of Taxons for array design.
-
deleteGeneProductAnnotationAssociations
- Specified by:
deleteGeneProductAnnotationAssociationsin interfaceArrayDesignService
-
deleteGeneProductAlignmentAssociations
- Specified by:
deleteGeneProductAlignmentAssociationsin interfaceArrayDesignService
-
loadBlacklistedValueObjects
@Transactional(readOnly=true) public Slice<ArrayDesignValueObject> loadBlacklistedValueObjects(@Nullable Filters filters, @Nullable Sort sort, int offset, int limit) Description copied from interface:ArrayDesignServiceNo need for ACL_VALUE_OBJECT_COLLECTION_READ because the filtering is done in the query.- Specified by:
loadBlacklistedValueObjectsin interfaceArrayDesignService- See Also:
-
loadValueObjectsWithCache
@Transactional(readOnly=true) public Collection<ArrayDesignValueObject> loadValueObjectsWithCache(@Nullable Filters filters, @Nullable Sort sort) - Specified by:
loadValueObjectsWithCachein interfaceArrayDesignService
-
countWithCache
- Specified by:
countWithCachein interfaceArrayDesignService
-
isMerged
- Specified by:
isMergedin interfaceArrayDesignService
-
isMergee
- Specified by:
isMergeein interfaceArrayDesignService
-
isSubsumed
- Specified by:
isSubsumedin interfaceArrayDesignService
-
isSubsumer
- Specified by:
isSubsumerin interfaceArrayDesignService
-
loadValueObjectsForEE
Description copied from interface:ArrayDesignServiceLoads the Value Objects for array designs used by expression experiment with the given ID- Specified by:
loadValueObjectsForEEin interfaceArrayDesignService- Parameters:
eeId- the id of an expression experiment- Returns:
- AD VOs
-
countCompositeSequencesWithBioSequences
@Transactional(readOnly=true) public long countCompositeSequencesWithBioSequences()Description copied from interface:ArrayDesignServiceFunction to return a count of all compositeSequences with bioSequence associations- Specified by:
countCompositeSequencesWithBioSequencesin interfaceArrayDesignService- Returns:
- count
-
countCompositeSequencesWithBlatResults
@Transactional(readOnly=true) public long countCompositeSequencesWithBlatResults()Description copied from interface:ArrayDesignServiceFunction to return all composite sequences with blat results- Specified by:
countCompositeSequencesWithBlatResultsin interfaceArrayDesignService- Returns:
- count
-
countCompositeSequencesWithGenes
@Transactional(readOnly=true) public long countCompositeSequencesWithGenes(boolean useGene2Cs) Description copied from interface:ArrayDesignServiceFunction to return a count of all composite sequences with associated genes.- Specified by:
countCompositeSequencesWithGenesin interfaceArrayDesignService- Returns:
- count
-
countGenes
@Transactional(readOnly=true) public long countGenes(boolean useGene2Cs) Description copied from interface:ArrayDesignServiceReturns a count of the number of genes associated with an array design.- Specified by:
countGenesin interfaceArrayDesignService- Returns:
- count
-
countBioSequences
Description copied from interface:ArrayDesignServicereturns the number of bioSequences associated with this ArrayDesign id- Specified by:
countBioSequencesin interfaceArrayDesignService- Parameters:
arrayDesign- AD- Returns:
- count
-
countBlatResults
Description copied from interface:ArrayDesignServicereturns the number of BlatResults (BioSequence2GeneProduct) entries associated with this ArrayDesign id.- Specified by:
countBlatResultsin interfaceArrayDesignService- Parameters:
arrayDesign- AD- Returns:
- count
-
countCompositeSequencesWithBioSequences
@Transactional(readOnly=true) public long countCompositeSequencesWithBioSequences(ArrayDesign arrayDesign) - Specified by:
countCompositeSequencesWithBioSequencesin interfaceArrayDesignService
-
countCompositeSequencesWithBlatResults
@Transactional(readOnly=true) public long countCompositeSequencesWithBlatResults(ArrayDesign arrayDesign) - Specified by:
countCompositeSequencesWithBlatResultsin interfaceArrayDesignService
-
countCompositeSequencesWithGenes
@Transactional(readOnly=true) public long countCompositeSequencesWithGenes(ArrayDesign arrayDesign, boolean useGene2Cs) - Specified by:
countCompositeSequencesWithGenesin interfaceArrayDesignService
-
countGenes
Description copied from interface:ArrayDesignServiceReturns the number of unique Genes associated with this ArrayDesign id- Specified by:
countGenesin interfaceArrayDesignService- Parameters:
arrayDesign- AD- Returns:
- count
-
removeBiologicalCharacteristics
Description copied from interface:ArrayDesignServiceRemove all associations that this array design has with BioSequences. This is needed for cases where the original import has associated the probes with the wrong sequences. A common case is for GEO data sets where the actual oligonucleotide is not given. Instead the submitter provides GenBank accessions, which are misleading. This method can be used to clear those until the "right" sequences can be identified and filled in. Note that this does not remove the BioSequences, it just nulls the BiologicalCharacteristics of the CompositeSequences.- Specified by:
removeBiologicalCharacteristicsin interfaceArrayDesignService- Parameters:
arrayDesign- AD
-
thaw
Description copied from interface:ArrayDesignServiceThaw a given platform.- Specified by:
thawin interfaceArrayDesignService- See Also:
-
thaw
Description copied from interface:ArrayDesignServiceThaw a collection of platforms.- Specified by:
thawin interfaceArrayDesignService- See Also:
-
thawCompositeSequences
Description copied from interface:ArrayDesignServiceThaw the composite sequences of a given platform- Specified by:
thawCompositeSequencesin interfaceArrayDesignService- See Also:
-
thawCompositeSequences
@Transactional(readOnly=true) public Collection<ArrayDesign> thawCompositeSequences(Collection<ArrayDesign> ads) - Specified by:
thawCompositeSequencesin interfaceArrayDesignService
-
thawLite
Description copied from interface:ArrayDesignServicePerform a less intensive thaw of an array design: not the composite sequences.- Specified by:
thawLitein interfaceArrayDesignService- Parameters:
arrayDesign- AD- Returns:
- AD
-
thawLite
@Transactional(readOnly=true) public Collection<ArrayDesign> thawLite(Collection<ArrayDesign> arrayDesigns) - Specified by:
thawLitein interfaceArrayDesignService
-
updateSubsumingStatus
@Transactional public boolean updateSubsumingStatus(ArrayDesign candidateSubsumer, ArrayDesign candidateSubsumee) Description copied from interface:ArrayDesignServiceTest whether the candidateSubsumer subsumes the candidateSubsumee. If so, the array designs are updated to reflect this fact. The boolean value returned indicates whether there was indeed a subsuming relationship found.- Specified by:
updateSubsumingStatusin interfaceArrayDesignService- Parameters:
candidateSubsumer- candidate subsumercandidateSubsumee- candidate subsumee- Returns:
- success
-