Class GeneServiceImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.AbstractService<O>
-
- ubic.gemma.persistence.service.AbstractFilteringVoEnabledService<Gene,GeneValueObject>
-
- ubic.gemma.persistence.service.genome.gene.GeneServiceImpl
-
- All Implemented Interfaces:
BaseImmutableService<Gene>,BaseReadOnlyService<Gene>,BaseService<Gene>,BaseVoEnabledService<Gene,GeneValueObject>,FilteringService<Gene>,FilteringVoEnabledService<Gene,GeneValueObject>,GeneService
@Service @ParametersAreNonnullByDefault public class GeneServiceImpl extends AbstractFilteringVoEnabledService<Gene,GeneValueObject> implements GeneService
- Author:
- pavlidis, keshav
- See Also:
GeneService
-
-
Field Summary
-
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log
-
-
Constructor Summary
Constructors Constructor Description GeneServiceImpl(GeneDao geneDao)
-
Method Summary
-
Methods inherited from class ubic.gemma.persistence.service.AbstractFilteringVoEnabledService
count, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getIdentifierPropertyName, getSort, load, load, loadAllValueObjects, loadIds, loadValueObject, loadValueObjects, loadValueObjects, loadValueObjects
-
Methods inherited from class ubic.gemma.persistence.service.AbstractService
countAll, create, create, ensureInSession, ensureInSession, find, findOrCreate, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail, remove, remove, remove, save, save, update, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ubic.gemma.persistence.service.BaseImmutableService
create, findOrCreate, remove, remove
-
Methods inherited from interface ubic.gemma.persistence.service.BaseReadOnlyService
countAll, find, findOrFail, getElementClass, load, load, loadAll, loadOrFail, loadOrFail, loadOrFail, loadOrFail
-
Methods inherited from interface ubic.gemma.persistence.service.BaseService
save, save, update, update
-
Methods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjects
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringService
count, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, getFilterablePropertyIsUsingSubquery, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getIdentifierPropertyName, getSort, load, load, loadIds
-
Methods inherited from interface ubic.gemma.persistence.service.FilteringVoEnabledService
loadValueObjects, loadValueObjects
-
Methods inherited from interface ubic.gemma.persistence.service.genome.gene.GeneService
create, remove
-
-
-
-
Constructor Detail
-
GeneServiceImpl
@Autowired public GeneServiceImpl(GeneDao geneDao)
-
-
Method Detail
-
find
@Transactional(readOnly=true) public Collection<Gene> find(PhysicalLocation physicalLocation)
Description copied from interface:GeneServiceFind all genes at a physical location. All overlapping genes are returned. The location can be a point or a region. If strand is non-null, only genes on the same strand are returned.- Specified by:
findin interfaceGeneService- Parameters:
physicalLocation- physical location of gene- Returns:
- all genes at given location
-
findByAccession
@Transactional(readOnly=true) public Gene findByAccession(String accession, @Nullable ExternalDatabase source)
- Specified by:
findByAccessionin interfaceGeneService
-
findByAlias
@Transactional(readOnly=true) public Collection<Gene> findByAlias(String search)
- Specified by:
findByAliasin interfaceGeneService
-
findByEnsemblId
@Transactional(readOnly=true) public Gene findByEnsemblId(String exactString)
Description copied from interface:GeneServiceSearches for a gene based on its ensembl ID. There is a small amount of genes in our database that have duplicate ensembl IDs. These genes are believed to be somehow unusable anyway, so we ignore those cases at the moment - Aug. 11th 2017.- Specified by:
findByEnsemblIdin interfaceGeneService- Parameters:
exactString- the ensembl ID that the gene will be looked up by.- Returns:
- a Gene with the given Ensembl ID.
-
findByNCBIId
@Transactional(readOnly=true) public Gene findByNCBIId(Integer accession)
- Specified by:
findByNCBIIdin interfaceGeneService
-
findByNCBIIdValueObject
@Transactional(readOnly=true) public GeneValueObject findByNCBIIdValueObject(Integer accession)
- Specified by:
findByNCBIIdValueObjectin interfaceGeneService
-
findByNcbiIds
@Transactional(readOnly=true) public Map<Integer,GeneValueObject> findByNcbiIds(Collection<Integer> ncbiIds)
Description copied from interface:GeneServiceQuickly load exact matches.- Specified by:
findByNcbiIdsin interfaceGeneService- Parameters:
ncbiIds- ncbi IDs- Returns:
- map of NCBI Id to the gene.
-
findByOfficialName
@Transactional(readOnly=true) public Collection<Gene> findByOfficialName(String officialName)
- Specified by:
findByOfficialNamein interfaceGeneService
-
findByOfficialNameInexact
@Transactional(readOnly=true) public Collection<Gene> findByOfficialNameInexact(String officialName)
- Specified by:
findByOfficialNameInexactin interfaceGeneService
-
findByOfficialSymbol
@Transactional(readOnly=true) public Collection<Gene> findByOfficialSymbol(String officialSymbol)
- Specified by:
findByOfficialSymbolin interfaceGeneService
-
findByOfficialSymbol
@Transactional(readOnly=true) public Gene findByOfficialSymbol(String symbol, Taxon taxon)
- Specified by:
findByOfficialSymbolin interfaceGeneService
-
findByOfficialSymbolInexact
@Transactional(readOnly=true) public Collection<Gene> findByOfficialSymbolInexact(String officialSymbol)
- Specified by:
findByOfficialSymbolInexactin interfaceGeneService
-
findByOfficialSymbols
@Transactional(readOnly=true) public Map<String,GeneValueObject> findByOfficialSymbols(Collection<String> query, Long taxonId)
Description copied from interface:GeneServiceQuickly load exact matches.- Specified by:
findByOfficialSymbolsin interfaceGeneService- Parameters:
query- querytaxonId- taxon id- Returns:
- map of lower-cased gene symbol to the gene. The actual query that led to the gene is not retained.
-
findGOTerms
@Transactional(readOnly=true) public Collection<AnnotationValueObject> findGOTerms(Long geneId)
- Specified by:
findGOTermsin interfaceGeneService
-
getCompositeSequenceCountById
@Transactional(readOnly=true) public long getCompositeSequenceCountById(Long id)
- Specified by:
getCompositeSequenceCountByIdin interfaceGeneService
-
getCompositeSequences
@Transactional(readOnly=true) public Collection<CompositeSequence> getCompositeSequences(Gene gene, ArrayDesign arrayDesign)
Description copied from interface:GeneServiceReturns a list of compositeSequences associated with the given gene and array design- Specified by:
getCompositeSequencesin interfaceGeneService- Parameters:
gene- genearrayDesign- platform- Returns:
- composite sequences
-
getCompositeSequencesById
@Transactional(readOnly=true) public Collection<CompositeSequence> getCompositeSequencesById(Long id)
- Specified by:
getCompositeSequencesByIdin interfaceGeneService- Parameters:
id- Gemma gene id- Returns:
- Return probes for a given gene id.
-
getPhysicalLocationsValueObjects
@Transactional(readOnly=true) public List<PhysicalLocationValueObject> getPhysicalLocationsValueObjects(Gene gene)
- Specified by:
getPhysicalLocationsValueObjectsin interfaceGeneService
-
getProducts
@Transactional(readOnly=true) public Collection<GeneProductValueObject> getProducts(Long geneId)
- Specified by:
getProductsin interfaceGeneService- Parameters:
geneId- gene id- Returns:
- empty collection if no products
-
loadAll
@Transactional(readOnly=true) public Collection<Gene> loadAll(Taxon taxon)
- Specified by:
loadAllin interfaceGeneService- Parameters:
taxon- taxon- Returns:
- a collection of genes for the specified taxon
-
loadFullyPopulatedValueObject
@Transactional(readOnly=true) public GeneValueObject loadFullyPopulatedValueObject(Long id)
Description copied from interface:GeneServiceReturns a detailVO for a geneDd This method may be unnecessary now that we have put all the logic into the GeneService- Specified by:
loadFullyPopulatedValueObjectin interfaceGeneService- Parameters:
id- The gene id- Returns:
- GeneDetailsValueObject a representation of that gene
-
loadGenePhenotypes
@Transactional(readOnly=true) public GeneValueObject loadGenePhenotypes(Long geneId)
- Specified by:
loadGenePhenotypesin interfaceGeneService
-
loadMicroRNAs
@Transactional(readOnly=true) public Collection<Gene> loadMicroRNAs(Taxon taxon)
- Specified by:
loadMicroRNAsin interfaceGeneService- Parameters:
taxon- taxon- Returns:
- all the microRNAs for a given taxon. Note query could be slow or inexact due to use of wild card searching of the genes description
-
loadThawed
@Transactional(readOnly=true) public Collection<Gene> loadThawed(Collection<Long> ids)
Description copied from interface:GeneServiceLoad with objects already thawed.- Specified by:
loadThawedin interfaceGeneService- Parameters:
ids- ids- Returns:
- pre-thawed genes
-
loadThawedLiter
@Transactional(readOnly=true) public Collection<Gene> loadThawedLiter(Collection<Long> ids)
- Specified by:
loadThawedLiterin interfaceGeneService
-
loadValueObjectById
@Transactional(readOnly=true) public GeneValueObject loadValueObjectById(Long id)
- Specified by:
loadValueObjectByIdin interfaceBaseVoEnabledService<Gene,GeneValueObject>- Overrides:
loadValueObjectByIdin classAbstractFilteringVoEnabledService<Gene,GeneValueObject>- See Also:
BaseVoEnabledDao.loadValueObjectById(Long)
-
loadValueObjectsByIds
@Transactional(readOnly=true) public List<GeneValueObject> loadValueObjectsByIds(Collection<Long> ids)
Description copied from interface:BaseVoEnabledServiceLoad value objects by a given collection of IDs.- Specified by:
loadValueObjectsByIdsin interfaceBaseVoEnabledService<Gene,GeneValueObject>- Overrides:
loadValueObjectsByIdsin classAbstractFilteringVoEnabledService<Gene,GeneValueObject>
-
loadValueObjectsByIdsLiter
@Transactional(readOnly=true) public Collection<GeneValueObject> loadValueObjectsByIdsLiter(Collection<Long> ids)
- Specified by:
loadValueObjectsByIdsLiterin interfaceGeneService
-
thaw
@Transactional(readOnly=true) public Gene thaw(Gene gene)
- Specified by:
thawin interfaceGeneService
-
thawAliases
@Transactional(readOnly=true) public Gene thawAliases(Gene gene)
- Specified by:
thawAliasesin interfaceGeneService- Parameters:
gene- gene- Returns:
- thaw the Aliases, very light version
-
thawLite
@Transactional(readOnly=true) public Collection<Gene> thawLite(Collection<Gene> genes)
- Specified by:
thawLitein interfaceGeneService
-
thawLite
@Transactional(readOnly=true) public Gene thawLite(Gene gene)
- Specified by:
thawLitein interfaceGeneService
-
thawLiter
@Transactional(readOnly=true) public Gene thawLiter(Gene gene)
- Specified by:
thawLiterin interfaceGeneService
-
searchGenes
@Transactional(readOnly=true) public Collection<GeneValueObject> searchGenes(String query, Long taxonId) throws SearchException
Search for genes (by name or symbol)- Specified by:
searchGenesin interfaceGeneService- Parameters:
taxonId- , can be null to not constrain by taxon- Returns:
- Collection of Gene entity objects
- Throws:
SearchException
-
removeAll
@Transactional public int removeAll()
- Specified by:
removeAllin interfaceGeneService
-
-