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
-
hasLinks
public boolean hasLinks(Taxon taxon, BioAssaySet ee)
- Specified by:
hasLinks
in interfaceCoexpressionDao
-
countLinks
public Integer countLinks(Gene gene, BioAssaySet ee)
- Specified by:
countLinks
in interfaceCoexpressionDao
-
createOrUpdate
public void createOrUpdate(BioAssaySet bioAssaySet, List<NonPersistentNonOrderedCoexpLink> links, LinkCreator c, Set<Gene> genesTested)
- Specified by:
createOrUpdate
in interfaceCoexpressionDao
- Parameters:
bioAssaySet
- bio assay setlinks
- in gene orderc
- link creatorgenesTested
- genes tested
-
deleteLinks
public void deleteLinks(Taxon t, BioAssaySet experiment)
- Specified by:
deleteLinks
in interfaceCoexpressionDao
-
findCoexpressionRelationships
public List<CoexpressionValueObject> findCoexpressionRelationships(Gene gene, Collection<Long> bas, int maxResults, boolean quick)
Description copied from interface:CoexpressionDao
Find coexpression links for a gene that are common to all the given datasets. That is the stringency is bas.size().- Specified by:
findCoexpressionRelationships
in 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:CoexpressionDao
Find coexpression links for the genes that are common to all the given datasets, so stringency = bas.size().- Specified by:
findCoexpressionRelationships
in 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:
findCoexpressionRelationships
in 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:CoexpressionDao
Return coexpression relationships among the given genes, limited to the given data sets.- Specified by:
findInterCoexpressionRelationships
in 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:CoexpressionDao
This 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:
updateNodeDegree
in interfaceCoexpressionDao
- Parameters:
g
- genend
- node degree- Returns:
- updated value object
-
getCoexpression
public Collection<CoexpressionValueObject> getCoexpression(Taxon taxon, BioAssaySet experiment, boolean quick)
- Specified by:
getCoexpression
in interfaceCoexpressionDao
- Parameters:
taxon
- taxonexperiment
- experimentquick
- quick- Returns:
- links, but not including flipped versions
-
queryAndCache
public int queryAndCache(Gene gene)
- Specified by:
queryAndCache
in 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:
initializeFromOldData
in interfaceCoexpressionDao
-
countOldLinks
public Map<Gene,Integer> countOldLinks(Collection<Gene> genes)
- Specified by:
countOldLinks
in interfaceCoexpressionDao
-
updateRelativeNodeDegrees
public void updateRelativeNodeDegrees(Map<Long,List<Double>> relRanksPerGenePositive, Map<Long,List<Double>> relRanksPerGeneNegative)
- Specified by:
updateRelativeNodeDegrees
in 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)
-
-