Class CoexpressionServiceImpl
java.lang.Object
ubic.gemma.persistence.service.association.coexpression.CoexpressionServiceImpl
- All Implemented Interfaces:
CoexpressionService
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncountLinks
(ExpressionExperiment ee, Gene gene) countOldLinks
(Collection<Gene> genes) void
createOrUpdate
(ExpressionExperiment ee, List<NonPersistentNonOrderedCoexpLink> links, LinkCreator c, Set<Gene> genesTested) Maintenance method.void
deleteLinks
(ExpressionExperiment experiment) Maintenance method.findCoexpressionRelationships
(Gene gene, Collection<Long> bas, int maxResults, boolean quick) Find links which are common to all of the given data sets.findCoexpressionRelationships
(Gene gene, Collection<Long> bas, int stringency, int maxResults, boolean quick) Search for coexpression across all available data sets, for the given genes considered individually, subject to a stringency constraint.findCoexpressionRelationships
(Taxon t, Collection<Long> genes, Collection<Long> bas, int maxResults, boolean quick) Find coexpression links for the genes that are common to all the given datasets (that is, the stringency is equal to the size of the set of datasets)findCoexpressionRelationships
(Taxon t, Collection<Long> genes, Collection<Long> bas, int stringency, int maxResults, boolean quick) Find coexpression links for the genes that are common to at least stringency of the given datasets.findInterCoexpressionRelationships
(Taxon t, Collection<Long> genes, Collection<Long> bas, int stringency, boolean quick) Return coexpression relationships among the given genes in the given data sets, in a map of query gene to coexpression objects.getCoexpression
(ExpressionExperiment experiment, boolean quick) boolean
Check if a given dataset has coexpression links.initializeLinksFromOldData
(Gene g, Map<Long, Gene> idMap, Map<NonPersistentNonOrderedCoexpLink, SupportDetails> linksSoFar, Set<Long> skipGenes) void
-
Constructor Details
-
CoexpressionServiceImpl
public CoexpressionServiceImpl()
-
-
Method Details
-
hasLinks
Description copied from interface:CoexpressionService
Check if a given dataset has coexpression links.- Specified by:
hasLinks
in interfaceCoexpressionService
-
countLinks
- Specified by:
countLinks
in interfaceCoexpressionService
- Parameters:
ee
- bio assay setgene
- gene- Returns:
- the number of links the gene has in the given data set ("node degree")
-
createOrUpdate
@Transactional public void createOrUpdate(ExpressionExperiment ee, List<NonPersistentNonOrderedCoexpLink> links, LinkCreator c, Set<Gene> genesTested) Description copied from interface:CoexpressionService
Maintenance method.- Specified by:
createOrUpdate
in interfaceCoexpressionService
- Parameters:
ee
- should be all of them for the bioAssaySet (not a batch)links
- linksc
- link creatorgenesTested
- genes which were tested
-
deleteLinks
Description copied from interface:CoexpressionService
Maintenance method. Remove coexpression information from the database about the experiment in question (this does not remove the analysis object).- Specified by:
deleteLinks
in interfaceCoexpressionService
- Parameters:
experiment
- experiment
-
findCoexpressionRelationships
@Transactional(readOnly=true) public List<CoexpressionValueObject> findCoexpressionRelationships(Gene gene, Collection<Long> bas, int maxResults, boolean quick) Description copied from interface:CoexpressionService
Find links which are common to all of the given data sets.- Specified by:
findCoexpressionRelationships
in interfaceCoexpressionService
- Parameters:
gene
- genebas
- data sets the link must be supported by; that is, the stringency is implied by bas.size(). Assumed to be security-filtered.maxResults
- max resultsquick
- quick- Returns:
- coexpression results.
-
findCoexpressionRelationships
@Transactional(readOnly=true) public List<CoexpressionValueObject> findCoexpressionRelationships(Gene gene, Collection<Long> bas, int stringency, int maxResults, boolean quick) Description copied from interface:CoexpressionService
Search for coexpression across all available data sets, for the given genes considered individually, subject to a stringency constraint.- Specified by:
findCoexpressionRelationships
in interfaceCoexpressionService
- Parameters:
gene
- genebas
- assumed to be security-filtered.stringency
- the minimum number of data sets for which the coexpression must be observed, among the given datasets.maxResults
- max resultsquick
- quick- Returns:
- coexpression results.
-
findCoexpressionRelationships
@Transactional(readOnly=true) public Map<Long,List<CoexpressionValueObject>> findCoexpressionRelationships(Taxon t, Collection<Long> genes, Collection<Long> bas, int maxResults, boolean quick) Description copied from interface:CoexpressionService
Find coexpression links for the genes that are common to all the given datasets (that is, the stringency is equal to the size of the set of datasets)- Specified by:
findCoexpressionRelationships
in interfaceCoexpressionService
- Parameters:
t
- taxongenes
- genesbas
- - assumed to already be security-filteredmaxResults
- max resultsquick
- quick- Returns:
- a map of gene IDs to coexpression results.
-
findCoexpressionRelationships
@Transactional(readOnly=true) public Map<Long,List<CoexpressionValueObject>> findCoexpressionRelationships(Taxon t, Collection<Long> genes, Collection<Long> bas, int stringency, int maxResults, boolean quick) Description copied from interface:CoexpressionService
Find coexpression links for the genes that are common to at least stringency of the given datasets.- Specified by:
findCoexpressionRelationships
in interfaceCoexpressionService
- Parameters:
t
- taxongenes
- genesbas
- assumed to already be security-filteredstringency
- the minimum number of data sets for which the coexpression must be observed, among the given datasets.maxResults
- limit to the number of results per gene, but connections among the query genes (if there is more than one) are given priority and not subject to the limit.quick
- quick- Returns:
- a map of gene IDs to coexpression results.
-
findInterCoexpressionRelationships
@Transactional(readOnly=true) public Map<Long,List<CoexpressionValueObject>> findInterCoexpressionRelationships(Taxon t, Collection<Long> genes, Collection<Long> bas, int stringency, boolean quick) Description copied from interface:CoexpressionService
Return coexpression relationships among the given genes in the given data sets, in a map of query gene to coexpression objects.- Specified by:
findInterCoexpressionRelationships
in interfaceCoexpressionService
- Parameters:
t
- taxongenes
- genesbas
- data sets to be considered, presumed to be security filtered alreadystringency
- Must be less than or equal to the number of data sets datasets.quick
- quick- Returns:
- a map of gene IDs to coexpression results.
-
getCoexpression
@Transactional(readOnly=true) public Collection<CoexpressionValueObject> getCoexpression(ExpressionExperiment experiment, boolean quick) - Specified by:
getCoexpression
in interfaceCoexpressionService
- Parameters:
experiment
- experimentquick
- quick- Returns:
- all the coexpression links for the given experiment, but not including flipped versions
-
updateNodeDegrees
- Specified by:
updateNodeDegrees
in interfaceCoexpressionService
-
getNodeDegree
- Specified by:
getNodeDegree
in interfaceCoexpressionService
-
getNodeDegrees
@Transactional(readOnly=true) public Map<Long,GeneCoexpressionNodeDegreeValueObject> getNodeDegrees(Collection<Long> g) - Specified by:
getNodeDegrees
in interfaceCoexpressionService
-
initializeLinksFromOldData
@Transactional public Map<SupportDetails,Gene2GeneCoexpression> initializeLinksFromOldData(Gene g, Map<Long, Gene> idMap, Map<NonPersistentNonOrderedCoexpLink, SupportDetails> linksSoFar, Set<Long> skipGenes) - Specified by:
initializeLinksFromOldData
in interfaceCoexpressionService
- Parameters:
g
- geneidMap
- id maplinksSoFar
- links so farskipGenes
- skip genes- Returns:
- links that were made
-
countOldLinks
- Specified by:
countOldLinks
in interfaceCoexpressionService
-