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 AbstractService
log -
Constructor Summary
Constructors -
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.loadBlacklistedValueObjectsByCursor(Filters filters, Sort sort, Cursor cursor, int limit) Cursor-mode counterpart toArrayDesignService.loadBlacklistedValueObjects(Filters, Sort, int, int)— seeCURSOR_PAGINATION_STEP1_PLAN.mdstep 1h.Load the platforms a dataset was ORIGINALLY submitted on, before any platform switch.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 AbstractFilteringVoEnabledService
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, 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, remove, remove, 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, getFilterablePropertyDescription, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubqueryMethods inherited from interface FilteringVoEnabledService
loadValueObjectsByCursorMethods inherited from interface SecurableBaseImmutableService
create, create, findOrCreate, remove, removeMethods 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
-
ArrayDesignServiceImpl
-
-
Method Details
-
loadAllGenericGenePlatforms
Description copied from interface:ArrayDesignServiceLoad *generic* gene-based platforms.- Specified by:
loadAllGenericGenePlatformsin interfaceArrayDesignService
-
loadAndThaw
- Specified by:
loadAndThawin interfaceArrayDesignService
-
loadAndThawLiteOrFail
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
-
findByAlternateName
- Specified by:
findByAlternateNamein interfaceArrayDesignService
-
findOneByAlternateName
- Specified by:
findOneByAlternateNamein interfaceArrayDesignService
-
findByManufacturer
- Specified by:
findByManufacturerin interfaceArrayDesignService
-
findByName
- Specified by:
findByNamein interfaceArrayDesignService
-
findByCompositeSequenceName
- 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
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
- Specified by:
getAllAssociatedBioAssaysin interfaceArrayDesignService
-
getBioSequences
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
- Specified by:
getGenesin interfaceArrayDesignService- See Also:
-
getGenesByCompositeSequence
public Map<CompositeSequence, Set<Gene>> getGenesByCompositeSequence(ArrayDesign arrayDesign, boolean useGene2Cs) - Specified by:
getGenesByCompositeSequencein interfaceArrayDesignService- See Also:
-
getGenesByCompositeSequence
public Map<CompositeSequence, Set<Gene>> getGenesByCompositeSequence(Collection<ArrayDesign> arrayDesign, boolean useGene2Cs) - Specified by:
getGenesByCompositeSequencein interfaceArrayDesignService
-
countCompositeSequences
- Specified by:
countCompositeSequencesin interfaceArrayDesignService
-
getCompositeSequences
- Specified by:
getCompositeSequencesin interfaceArrayDesignService
-
getCompositeSequences
public Collection<CompositeSequence> getCompositeSequences(ArrayDesign arrayDesign, int limit, int offset) - Specified by:
getCompositeSequencesin interfaceArrayDesignService
-
getExpressionExperiments
- 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
- Specified by:
getLastRepeatAnalysisin interfaceArrayDesignService
-
getLastSequenceAnalysis
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
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
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
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.
-
loadBlacklistedValueObjects
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:
-
loadBlacklistedValueObjectsByCursor
public CursorPage<ArrayDesignValueObject> loadBlacklistedValueObjectsByCursor(@Nullable Filters filters, Sort sort, @Nullable Cursor cursor, int limit) Description copied from interface:ArrayDesignServiceCursor-mode counterpart toArrayDesignService.loadBlacklistedValueObjects(Filters, Sort, int, int)— seeCURSOR_PAGINATION_STEP1_PLAN.mdstep 1h. No need forACL_VALUE_OBJECT_COLLECTION_READbecause the filtering is done in the query.- Specified by:
loadBlacklistedValueObjectsByCursorin interfaceArrayDesignService- See Also:
-
loadValueObjectsWithCache
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
-
loadOriginalPlatformValueObjectsForEE
Description copied from interface:ArrayDesignServiceLoad the platforms a dataset was ORIGINALLY submitted on, before any platform switch.A dataset can have more than one — its assays need not have come from a single submitted platform. A platform recorded as an original that is ALSO the one in use is a no-op switch and is left out, so an unswitched dataset answers with an empty list rather than echoing its current platform. That is the same rule the details VO applies, kept identical so the two cannot drift into disagreeing.
- Specified by:
loadOriginalPlatformValueObjectsForEEin interfaceArrayDesignService- See Also:
-
countCompositeSequencesWithBioSequences
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
public long countCompositeSequencesWithBlatResults()Description copied from interface:ArrayDesignServiceFunction to return all composite sequences with blat results- Specified by:
countCompositeSequencesWithBlatResultsin interfaceArrayDesignService- Returns:
- count
-
countCompositeSequencesWithGenes
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
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
- Specified by:
countCompositeSequencesWithBioSequencesin interfaceArrayDesignService
-
countCompositeSequencesWithBlatResults
- Specified by:
countCompositeSequencesWithBlatResultsin interfaceArrayDesignService
-
countCompositeSequencesWithGenes
- 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
-
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
- 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
- Specified by:
thawLitein 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
-
deleteGeneProductAnnotationAssociations
- Specified by:
deleteGeneProductAnnotationAssociationsin interfaceArrayDesignService
-
deleteGeneProductAlignmentAssociations
- Specified by:
deleteGeneProductAlignmentAssociationsin interfaceArrayDesignService
-
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
-
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
-