Class CoexpressionDaoImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.association.coexpression.CoexpressionDaoImpl
-
- All Implemented Interfaces:
CoexpressionDao
@Repository public class CoexpressionDaoImpl extends Object implements CoexpressionDao
Manages and queries coexpression 'links' between genes.- Author:
- klc, paul
- See Also:
Gene2GeneCoexpression
-
-
Constructor Summary
Constructors Constructor Description CoexpressionDaoImpl()
-
Method Summary
-
-
-
Method Detail
-
countLinks
public Integer countLinks(Gene gene, BioAssaySet ee)
- Specified by:
countLinksin interfaceCoexpressionDao
-
createOrUpdate
public void createOrUpdate(BioAssaySet bioAssaySet, List<NonPersistentNonOrderedCoexpLink> links, LinkCreator c, Set<Gene> genesTested)
- Specified by:
createOrUpdatein interfaceCoexpressionDao- Parameters:
bioAssaySet- bio assay setlinks- in gene orderc- link creatorgenesTested- genes tested
-
deleteLinks
public void deleteLinks(Taxon t, BioAssaySet experiment)
- 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, BioAssaySet experiment, boolean quick)
- Specified by:
getCoexpressionin interfaceCoexpressionDao- Parameters:
taxon- taxonexperiment- experimentquick- quick- Returns:
- links, but not including flipped versions
-
queryAndCache
public int queryAndCache(Gene gene)
- 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
public Map<Gene,Integer> countOldLinks(Collection<Gene> genes)
- 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(BioAssaySet experiment, Collection<SupportDetails> supportDetailsToDelete, Collection<SupportDetails> supportDetailsToUpdate)
-
getRawCoexpressionFromDbViaGenes
public List<Object[]> getRawCoexpressionFromDbViaGenes(Collection<Long> geneIds, Taxon t, int stringency)
-
-