Interface CoexpressionService
- All Known Implementing Classes:
CoexpressionServiceImpl
public interface CoexpressionService
A key service for working with coexpression at a fairly low level. This is responsible for CUD operations; retrieval
is by 'find' methods.
Note that all of the 'find' methods require a non-empty set of dataset ids to query. It is the responsibility of the
caller to security-filter the ids. The need for security is why we don't permit queries of "all" data sets at this
level. Retrieval of information on gene node degree is not constrained by security, which we deemed acceptable
because the only information returned is a summary count.
- Author:
- Gemma
-
Method Summary
Modifier and TypeMethodDescriptioncountLinks
(ExpressionExperiment ee, Gene gene) countOldLinks
(Collection<Gene> genes) void
createOrUpdate
(ExpressionExperiment ee, List<NonPersistentNonOrderedCoexpLink> links, LinkCreator c, Set<Gene> geesTested) 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) getNodeDegrees
(Collection<Long> genes) boolean
Check if a given dataset has coexpression links.initializeLinksFromOldData
(Gene gene, Map<Long, Gene> idMap, Map<NonPersistentNonOrderedCoexpLink, SupportDetails> linksSoFar, Set<Long> skipGenes) void
updateNodeDegrees
(Taxon taxon)
-
Method Details
-
hasLinks
Check if a given dataset has coexpression links. -
countLinks
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Integer countLinks(ExpressionExperiment ee, Gene gene) - Parameters:
ee
- bio assay setgene
- gene- Returns:
- the number of links the gene has in the given data set ("node degree")
-
createOrUpdate
@Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) void createOrUpdate(ExpressionExperiment ee, List<NonPersistentNonOrderedCoexpLink> links, LinkCreator c, Set<Gene> geesTested) Maintenance method.- Parameters:
ee
- should be all of them for the bioAssaySet (not a batch)links
- linksc
- link creatorgeesTested
- genes which were tested
-
deleteLinks
Maintenance method. Remove coexpression information from the database about the experiment in question (this does not remove the analysis object).- Parameters:
experiment
- experiment
-
findCoexpressionRelationships
List<CoexpressionValueObject> findCoexpressionRelationships(Gene gene, Collection<Long> bas, int maxResults, boolean quick) Find links which are common to all of the given data sets.- 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
List<CoexpressionValueObject> 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.- 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
Map<Long,List<CoexpressionValueObject>> 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)- Parameters:
t
- taxongenes
- genesbas
- - assumed to already be security-filteredmaxResults
- max resultsquick
- quick- Returns:
- a map of gene IDs to coexpression results.
-
findCoexpressionRelationships
Map<Long,List<CoexpressionValueObject>> 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.- 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
Map<Long,List<CoexpressionValueObject>> 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.- 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
@Secured({"IS_AUTHENTICATED_ANONYMOUSLY","ACL_SECURABLE_READ"}) Collection<CoexpressionValueObject> getCoexpression(ExpressionExperiment experiment, boolean quick) - Parameters:
experiment
- experimentquick
- quick- Returns:
- all the coexpression links for the given experiment, but not including flipped versions
-
updateNodeDegrees
-
getNodeDegree
-
getNodeDegrees
-
initializeLinksFromOldData
@Secured("GROUP_ADMIN") Map<SupportDetails,Gene2GeneCoexpression> initializeLinksFromOldData(Gene gene, Map<Long, Gene> idMap, Map<NonPersistentNonOrderedCoexpLink, SupportDetails> linksSoFar, Set<Long> skipGenes) - Parameters:
gene
- geneidMap
- id maplinksSoFar
- links so farskipGenes
- skip genes- Returns:
- links that were made
-
countOldLinks
-