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 Details

    • hasLinks

      boolean hasLinks(ExpressionExperiment ee)
      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 set
      gene - 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 - links
      c - link creator
      geesTested - genes which were tested
    • deleteLinks

      @Secured({"GROUP_USER","ACL_SECURABLE_EDIT"}) void deleteLinks(ExpressionExperiment experiment)
      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 - gene
      bas - data sets the link must be supported by; that is, the stringency is implied by bas.size(). Assumed to be security-filtered.
      maxResults - max results
      quick - 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 - gene
      bas - 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 results
      quick - 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 - taxon
      genes - genes
      bas - - assumed to already be security-filtered
      maxResults - max results
      quick - 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 - taxon
      genes - genes
      bas - assumed to already be security-filtered
      stringency - 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 - taxon
      genes - genes
      bas - data sets to be considered, presumed to be security filtered already
      stringency - 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 - experiment
      quick - quick
      Returns:
      all the coexpression links for the given experiment, but not including flipped versions
    • updateNodeDegrees

      @Secured("GROUP_ADMIN") void updateNodeDegrees(Taxon taxon)
    • 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 - gene
      idMap - id map
      linksSoFar - links so far
      skipGenes - skip genes
      Returns:
      links that were made
    • countOldLinks

      @Secured("GROUP_ADMIN") Map<Gene,Integer> countOldLinks(Collection<Gene> genes)