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:GeneService
Find 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:
find
in 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:
findByAccession
in interfaceGeneService
-
findByAlias
@Transactional(readOnly=true) public Collection<Gene> findByAlias(String search)
- Specified by:
findByAlias
in interfaceGeneService
-
findByEnsemblId
@Transactional(readOnly=true) public Gene findByEnsemblId(String exactString)
Description copied from interface:GeneService
Searches 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:
findByEnsemblId
in 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:
findByNCBIId
in interfaceGeneService
-
findByNCBIIdValueObject
@Transactional(readOnly=true) public GeneValueObject findByNCBIIdValueObject(Integer accession)
- Specified by:
findByNCBIIdValueObject
in interfaceGeneService
-
findByNcbiIds
@Transactional(readOnly=true) public Map<Integer,GeneValueObject> findByNcbiIds(Collection<Integer> ncbiIds)
Description copied from interface:GeneService
Quickly load exact matches.- Specified by:
findByNcbiIds
in 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:
findByOfficialName
in interfaceGeneService
-
findByOfficialNameInexact
@Transactional(readOnly=true) public Collection<Gene> findByOfficialNameInexact(String officialName)
- Specified by:
findByOfficialNameInexact
in interfaceGeneService
-
findByOfficialSymbol
@Transactional(readOnly=true) public Collection<Gene> findByOfficialSymbol(String officialSymbol)
- Specified by:
findByOfficialSymbol
in interfaceGeneService
-
findByOfficialSymbol
@Transactional(readOnly=true) public Gene findByOfficialSymbol(String symbol, Taxon taxon)
- Specified by:
findByOfficialSymbol
in interfaceGeneService
-
findByOfficialSymbolInexact
@Transactional(readOnly=true) public Collection<Gene> findByOfficialSymbolInexact(String officialSymbol)
- Specified by:
findByOfficialSymbolInexact
in interfaceGeneService
-
findByOfficialSymbols
@Transactional(readOnly=true) public Map<String,GeneValueObject> findByOfficialSymbols(Collection<String> query, Long taxonId)
Description copied from interface:GeneService
Quickly load exact matches.- Specified by:
findByOfficialSymbols
in 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:
findGOTerms
in interfaceGeneService
-
getCompositeSequenceCountById
@Transactional(readOnly=true) public long getCompositeSequenceCountById(Long id)
- Specified by:
getCompositeSequenceCountById
in interfaceGeneService
-
getCompositeSequences
@Transactional(readOnly=true) public Collection<CompositeSequence> getCompositeSequences(Gene gene, ArrayDesign arrayDesign)
Description copied from interface:GeneService
Returns a list of compositeSequences associated with the given gene and array design- Specified by:
getCompositeSequences
in interfaceGeneService
- Parameters:
gene
- genearrayDesign
- platform- Returns:
- composite sequences
-
getCompositeSequencesById
@Transactional(readOnly=true) public Collection<CompositeSequence> getCompositeSequencesById(Long id)
- Specified by:
getCompositeSequencesById
in 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:
getPhysicalLocationsValueObjects
in interfaceGeneService
-
getProducts
@Transactional(readOnly=true) public Collection<GeneProductValueObject> getProducts(Long geneId)
- Specified by:
getProducts
in interfaceGeneService
- Parameters:
geneId
- gene id- Returns:
- empty collection if no products
-
loadAll
@Transactional(readOnly=true) public Collection<Gene> loadAll(Taxon taxon)
- Specified by:
loadAll
in 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:GeneService
Returns a detailVO for a geneDd This method may be unnecessary now that we have put all the logic into the GeneService- Specified by:
loadFullyPopulatedValueObject
in interfaceGeneService
- Parameters:
id
- The gene id- Returns:
- GeneDetailsValueObject a representation of that gene
-
loadGenePhenotypes
@Transactional(readOnly=true) public GeneValueObject loadGenePhenotypes(Long geneId)
- Specified by:
loadGenePhenotypes
in interfaceGeneService
-
loadMicroRNAs
@Transactional(readOnly=true) public Collection<Gene> loadMicroRNAs(Taxon taxon)
- Specified by:
loadMicroRNAs
in 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:GeneService
Load with objects already thawed.- Specified by:
loadThawed
in interfaceGeneService
- Parameters:
ids
- ids- Returns:
- pre-thawed genes
-
loadThawedLiter
@Transactional(readOnly=true) public Collection<Gene> loadThawedLiter(Collection<Long> ids)
- Specified by:
loadThawedLiter
in interfaceGeneService
-
loadValueObjectById
@Transactional(readOnly=true) public GeneValueObject loadValueObjectById(Long id)
- Specified by:
loadValueObjectById
in interfaceBaseVoEnabledService<Gene,GeneValueObject>
- Overrides:
loadValueObjectById
in classAbstractFilteringVoEnabledService<Gene,GeneValueObject>
- See Also:
BaseVoEnabledDao.loadValueObjectById(Long)
-
loadValueObjectsByIds
@Transactional(readOnly=true) public List<GeneValueObject> loadValueObjectsByIds(Collection<Long> ids)
Description copied from interface:BaseVoEnabledService
Load value objects by a given collection of IDs.- Specified by:
loadValueObjectsByIds
in interfaceBaseVoEnabledService<Gene,GeneValueObject>
- Overrides:
loadValueObjectsByIds
in classAbstractFilteringVoEnabledService<Gene,GeneValueObject>
-
loadValueObjectsByIdsLiter
@Transactional(readOnly=true) public Collection<GeneValueObject> loadValueObjectsByIdsLiter(Collection<Long> ids)
- Specified by:
loadValueObjectsByIdsLiter
in interfaceGeneService
-
thaw
@Transactional(readOnly=true) public Gene thaw(Gene gene)
- Specified by:
thaw
in interfaceGeneService
-
thawAliases
@Transactional(readOnly=true) public Gene thawAliases(Gene gene)
- Specified by:
thawAliases
in interfaceGeneService
- Parameters:
gene
- gene- Returns:
- thaw the Aliases, very light version
-
thawLite
@Transactional(readOnly=true) public Collection<Gene> thawLite(Collection<Gene> genes)
- Specified by:
thawLite
in interfaceGeneService
-
thawLite
@Transactional(readOnly=true) public Gene thawLite(Gene gene)
- Specified by:
thawLite
in interfaceGeneService
-
thawLiter
@Transactional(readOnly=true) public Gene thawLiter(Gene gene)
- Specified by:
thawLiter
in interfaceGeneService
-
searchGenes
@Transactional(readOnly=true) public Collection<GeneValueObject> searchGenes(String query, Long taxonId) throws SearchException
Search for genes (by name or symbol)- Specified by:
searchGenes
in 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:
removeAll
in interfaceGeneService
-
-