Class GeneServiceImpl
java.lang.Object
ubic.gemma.persistence.service.AbstractService<Gene>
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:
-
Field Summary
Fields inherited from class ubic.gemma.persistence.service.AbstractService
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfind(PhysicalLocation physicalLocation) Find all genes at a physical location.findByAccession(String accession, ExternalDatabase source) findByAlias(String search) findByEnsemblId(String exactString) Searches for a gene based on its ensembl ID.findByNCBIId(Integer accession) findByNcbiIds(Collection<Integer> ncbiIds) Quickly load exact matches.findByNCBIIdValueObject(Integer accession) findByOfficialName(String officialName) findByOfficialNameInexact(String officialName) findByOfficialSymbol(String officialSymbol) findByOfficialSymbol(String symbol, Taxon taxon) findByOfficialSymbolInexact(String officialSymbol) findByOfficialSymbols(Collection<String> query, Long taxonId) Quickly load exact matches.findGOTerms(Long geneId) longgetCompositeSequenceCount(Gene gene, boolean includeDummyProducts) longgetCompositeSequenceCountById(Long id, boolean includeDummyProducts) getCompositeSequences(Gene gene, boolean includeDummyProducts) getCompositeSequences(Gene gene, ArrayDesign arrayDesign, boolean includeDummyProducts) getCompositeSequencesById(Long geneId, boolean includeDummyProducts) getProducts(Long geneId) Returns a detailVO for a geneDd This method may be unnecessary now that we have put all the logic into the GeneServiceloadMicroRNAs(Taxon taxon) loadThawed(Collection<Long> ids) Load with objects already thawed.loadThawedLiter(Collection<Long> ids) Load value objects by a given collection of IDs.intsearchGenes(String query, Long taxonId) Search for genes (by name or symbol)thawAliases(Gene gene) thawLite(Collection<Gene> genes) 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, loadValueObjects, loadValueObjects, loadValueObjectsMethods 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.BaseImmutableService
create, findOrCreate, remove, removeMethods 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.BaseService
save, save, update, updateMethods inherited from interface ubic.gemma.persistence.service.BaseVoEnabledService
loadAllValueObjects, loadValueObject, loadValueObjectsMethods inherited from interface ubic.gemma.persistence.service.FilteringService
count, getFilter, getFilter, getFilter, getFilter, getFilter, getFilter, getFilterableProperties, getFilterablePropertyAllowedValues, getFilterablePropertyConfigAttributes, getFilterablePropertyDescription, getFilterablePropertyResolvableAllowedValuesLabels, getFilterablePropertyType, getSort, isFilterablePropertyDeprecated, isFilterablePropertyUsingSubquery, load, load, loadIdsMethods inherited from interface ubic.gemma.persistence.service.FilteringVoEnabledService
loadValueObjects, loadValueObjectsMethods inherited from interface ubic.gemma.persistence.service.genome.gene.GeneService
create, remove
-
Constructor Details
-
GeneServiceImpl
-
-
Method Details
-
find
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
- Specified by:
findByAliasin interfaceGeneService
-
findByEnsemblId
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
- Specified by:
findByNCBIIdin interfaceGeneService
-
findByNCBIIdValueObject
- 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
- Specified by:
findByOfficialNamein interfaceGeneService
-
findByOfficialNameInexact
@Transactional(readOnly=true) public Collection<Gene> findByOfficialNameInexact(String officialName) - Specified by:
findByOfficialNameInexactin interfaceGeneService
-
findByOfficialSymbol
- Specified by:
findByOfficialSymbolin interfaceGeneService
-
findByOfficialSymbol
- 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
- Specified by:
findGOTermsin interfaceGeneService
-
getCompositeSequenceCount
@Transactional(readOnly=true) public long getCompositeSequenceCount(Gene gene, boolean includeDummyProducts) - Specified by:
getCompositeSequenceCountin interfaceGeneService- See Also:
-
getCompositeSequenceCountById
@Transactional(readOnly=true) public long getCompositeSequenceCountById(Long id, boolean includeDummyProducts) - Specified by:
getCompositeSequenceCountByIdin interfaceGeneService- See Also:
-
getCompositeSequences
@Transactional(readOnly=true) public Collection<CompositeSequence> getCompositeSequences(Gene gene, ArrayDesign arrayDesign, boolean includeDummyProducts) - Specified by:
getCompositeSequencesin interfaceGeneService- See Also:
-
getCompositeSequences
@Transactional(readOnly=true) public Collection<CompositeSequence> getCompositeSequences(Gene gene, boolean includeDummyProducts) - Specified by:
getCompositeSequencesin interfaceGeneService- See Also:
-
getCompositeSequencesById
@Transactional(readOnly=true) public Collection<CompositeSequence> getCompositeSequencesById(Long geneId, boolean includeDummyProducts) - Specified by:
getCompositeSequencesByIdin interfaceGeneService- See Also:
-
getPhysicalLocationsValueObjects
@Transactional(readOnly=true) public List<PhysicalLocationValueObject> getPhysicalLocationsValueObjects(Gene gene) - Specified by:
getPhysicalLocationsValueObjectsin interfaceGeneService
-
getProducts
- Specified by:
getProductsin interfaceGeneService- Parameters:
geneId- gene id- Returns:
- empty collection if no products
-
loadAll
- Specified by:
loadAllin interfaceGeneService- Parameters:
taxon- taxon- Returns:
- a collection of genes for the specified taxon
-
loadFullyPopulatedValueObject
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
-
loadMicroRNAs
- 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
Description copied from interface:GeneServiceLoad with objects already thawed.- Specified by:
loadThawedin interfaceGeneService- Parameters:
ids- ids- Returns:
- pre-thawed genes
-
loadThawedLiter
- Specified by:
loadThawedLiterin interfaceGeneService
-
loadValueObjectById
- Specified by:
loadValueObjectByIdin interfaceBaseVoEnabledService<Gene,GeneValueObject> - Overrides:
loadValueObjectByIdin classAbstractFilteringVoEnabledService<Gene,GeneValueObject> - See Also:
-
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
- Specified by:
thawin interfaceGeneService
-
thawAliases
- Specified by:
thawAliasesin interfaceGeneService- Parameters:
gene- gene- Returns:
- thaw the Aliases, very light version
-
thawLite
- Specified by:
thawLitein interfaceGeneService
-
thawLite
- Specified by:
thawLitein interfaceGeneService
-
thawLiter
- Specified by:
thawLiterin interfaceGeneService
-
searchGenes
@Transactional(readOnly=true) public Collection<GeneValueObject> searchGenes(String query, @Nullable 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
-