Class CoexpressionDaoImpl
java.lang.Object
ubic.gemma.persistence.service.association.coexpression.CoexpressionDaoImpl
- All Implemented Interfaces:
CoexpressionDao
Manages and queries coexpression 'links' between genes.
- Author:
- klc, paul
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncountLinks(Gene gene, ExpressionExperiment ee) countOldLinks(Collection<Gene> genes) voidcreateOrUpdate(ExpressionExperiment ee, List<NonPersistentNonOrderedCoexpLink> links, LinkCreator c, Set<Gene> genesTested) voiddeleteLinks(Taxon t, ExpressionExperiment experiment) findCoexpressionRelationships(Gene gene, Collection<Long> bas, int maxResults, boolean quick) Find coexpression links for a gene that are common to all the given datasets.findCoexpressionRelationships(Taxon taxon, Collection<Long> genes, Collection<Long> bas, int maxResults, boolean quick) Find coexpression links for the genes that are common to all the given datasets, so stringency = bas.size().findCoexpressionRelationships(Taxon t, Collection<Long> genes, Collection<Long> bas, int stringency, int maxResults, boolean quick) findInterCoexpressionRelationships(Taxon taxon, Collection<Long> genes, Collection<Long> bas, int stringency, boolean quick) Return coexpression relationships among the given genes, limited to the given data sets.getCoexpression(Taxon taxon, ExpressionExperiment experiment, boolean quick) getRawCoexpressionFromDbViaGenes(Collection<Long> geneIds, Taxon t, int stringency) booleanhasLinks(Taxon taxon, ExpressionExperiment ee) initializeFromOldData(Gene gene, Map<Long, Gene> geneIdMap, Map<NonPersistentNonOrderedCoexpLink, SupportDetails> linksSoFar, Set<Long> skipGenes) intqueryAndCache(Gene gene) voidupdateModifiedSupportDetails(ExpressionExperiment experiment, Collection<SupportDetails> supportDetailsToDelete, Collection<SupportDetails> supportDetailsToUpdate) This is a maintenance method.voidupdateRelativeNodeDegrees(Map<Long, List<Double>> relRanksPerGenePositive, Map<Long, List<Double>> relRanksPerGeneNegative)
-
Constructor Details
-
CoexpressionDaoImpl
public CoexpressionDaoImpl()
-
-
Method Details
-
hasLinks
- Specified by:
hasLinksin interfaceCoexpressionDao
-
countLinks
- Specified by:
countLinksin interfaceCoexpressionDao
-
createOrUpdate
public void createOrUpdate(ExpressionExperiment ee, List<NonPersistentNonOrderedCoexpLink> links, LinkCreator c, Set<Gene> genesTested) - Specified by:
createOrUpdatein interfaceCoexpressionDao- Parameters:
ee- bio assay setlinks- in gene orderc- link creatorgenesTested- genes tested
-
deleteLinks
- Specified by:
deleteLinksin interfaceCoexpressionDao
-
findCoexpressionRelationships
public List<CoexpressionValueObject> findCoexpressionRelationships(Gene gene, Collection<Long> bas, int maxResults, boolean quick) Description copied from interface:CoexpressionDaoFind coexpression links for a gene that are common to all the given datasets. That is the stringency is bas.size().- Specified by:
findCoexpressionRelationshipsin interfaceCoexpressionDao- Parameters:
gene- genebas- bio assaysmaxResults- max resultsquick- quick- Returns:
- coexpression VO
-
findCoexpressionRelationships
public Map<Long,List<CoexpressionValueObject>> findCoexpressionRelationships(Taxon taxon, Collection<Long> genes, Collection<Long> bas, int maxResults, boolean quick) Description copied from interface:CoexpressionDaoFind coexpression links for the genes that are common to all the given datasets, so stringency = bas.size().- Specified by:
findCoexpressionRelationshipsin interfaceCoexpressionDao- Parameters:
taxon- taxongenes- genesbas- bio assaysmaxResults- max resultsquick- quick- Returns:
- map of ids to coexp. VOs
-
findCoexpressionRelationships
public Map<Long,List<CoexpressionValueObject>> findCoexpressionRelationships(Taxon t, Collection<Long> genes, Collection<Long> bas, int stringency, int maxResults, boolean quick) - Specified by:
findCoexpressionRelationshipsin interfaceCoexpressionDao- Parameters:
t- taxongenes- genesbas- limit on which data sets to query, or null (or empty) for no limit.stringency- minimum number of the datasets the link must be supported bymaxResults- maximum results per gene.quick- quick- Returns:
- map of ids to coexp. VOs
-
findInterCoexpressionRelationships
public Map<Long,List<CoexpressionValueObject>> findInterCoexpressionRelationships(Taxon taxon, Collection<Long> genes, Collection<Long> bas, int stringency, boolean quick) Description copied from interface:CoexpressionDaoReturn coexpression relationships among the given genes, limited to the given data sets.- Specified by:
findInterCoexpressionRelationshipsin interfaceCoexpressionDao- Parameters:
taxon- taxongenes- genesbas- bio assaysstringency- stringencyquick- quick- Returns:
- map of ids to coexp. VOs
-
updateNodeDegree
public GeneCoexpressionNodeDegreeValueObject updateNodeDegree(Gene g, GeneCoexpressionNodeDegree nd) Description copied from interface:CoexpressionDaoThis is a maintenance method. This requires doing a coexpression query for the gene, and updating (or, if need be, creating) the associated GeneCoexpressionNodeDegree object.- Specified by:
updateNodeDegreein interfaceCoexpressionDao- Parameters:
g- genend- node degree- Returns:
- updated value object
-
getCoexpression
public Collection<CoexpressionValueObject> getCoexpression(Taxon taxon, ExpressionExperiment experiment, boolean quick) - Specified by:
getCoexpressionin interfaceCoexpressionDao- Parameters:
taxon- taxonexperiment- experimentquick- quick- Returns:
- links, but not including flipped versions
-
queryAndCache
- Specified by:
queryAndCachein interfaceCoexpressionDao- Parameters:
gene- gene- Returns:
- number of links that were cached
-
initializeFromOldData
public Map<SupportDetails,Gene2GeneCoexpression> initializeFromOldData(Gene gene, Map<Long, Gene> geneIdMap, Map<NonPersistentNonOrderedCoexpLink, SupportDetails> linksSoFar, Set<Long> skipGenes) - Specified by:
initializeFromOldDatain interfaceCoexpressionDao
-
countOldLinks
- Specified by:
countOldLinksin interfaceCoexpressionDao
-
updateRelativeNodeDegrees
public void updateRelativeNodeDegrees(Map<Long, List<Double>> relRanksPerGenePositive, Map<Long, List<Double>> relRanksPerGeneNegative) - Specified by:
updateRelativeNodeDegreesin interfaceCoexpressionDao
-
updateModifiedSupportDetails
public void updateModifiedSupportDetails(ExpressionExperiment experiment, Collection<SupportDetails> supportDetailsToDelete, Collection<SupportDetails> supportDetailsToUpdate) -
getRawCoexpressionFromDbViaGenes
public List<Object[]> getRawCoexpressionFromDbViaGenes(Collection<Long> geneIds, Taxon t, int stringency)
-