Class GoMetricImpl
java.lang.Object
ubic.gemma.core.ontology.GoMetricImpl
- All Implemented Interfaces:
- GoMetric
- 
Nested Class SummaryNested classes/interfaces inherited from interface GoMetricGoMetric.Metric
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncomputeMatrixSimilarity(Gene gene1, Gene gene2, DoubleMatrix<Long, String> gene2TermMatrix, GoMetric.Metric metric) computeMaxSimilarity(Gene queryGene, Gene targetGene, Map<String, Double> GOProbMap, GoMetric.Metric metric) computeMergedOverlap(List<Gene> sameGenes1, List<Gene> sameGenes2, Map<Long, Collection<String>> geneGoMap) Tailored to handle computing overlap between two gene lists which may contain duplicate genes of the same name but different IDs.computeSimilarity(Gene queryGene, Gene targetGene, Map<String, Double> GOProbMap, GoMetric.Metric metric) computeSimpleOverlap(Gene g, Gene coexpG, Map<Long, Collection<String>> geneGoMap) createVectorMatrix(Map<Long, Collection<String>> gene2go, boolean weight) getChildrenOccurrence(Map<String, Integer> termCountMap, String term) protected voidlogIds(String prefix, Collection<OntologyTerm> terms) voidsetGene2GOAssociationService(Gene2GOAssociationService gene2GOAssociationService) voidsetGeneOntologyService(GeneOntologyService geneOntologyService) 
- 
Constructor Details- 
GoMetricImplpublic GoMetricImpl()
 
- 
- 
Method Details- 
computeMatrixSimilaritypublic Double computeMatrixSimilarity(Gene gene1, Gene gene2, DoubleMatrix<Long, String> gene2TermMatrix, GoMetric.Metric metric) - Specified by:
- computeMatrixSimilarityin interface- GoMetric
 
- 
computeMaxSimilaritypublic Double computeMaxSimilarity(Gene queryGene, Gene targetGene, Map<String, Double> GOProbMap, GoMetric.Metric metric) - Specified by:
- computeMaxSimilarityin interface- GoMetric
- Parameters:
- queryGene- query gene
- targetGene- target gene
- GOProbMap- go prob map
- metric- metric
- Returns:
- the MAX overlap score between two genes
 
- 
computeMergedOverlappublic Double computeMergedOverlap(List<Gene> sameGenes1, List<Gene> sameGenes2, Map<Long, Collection<String>> geneGoMap) Tailored to handle computing overlap between two gene lists which may contain duplicate genes of the same name but different IDs. If gene lists do not contain duplicates (size = 1) the result will be the same as that of computing simple overlap.- Specified by:
- computeMergedOverlapin interface- GoMetric
- Parameters:
- sameGenes1- same genes 1
- sameGenes2- same genes 2
- geneGoMap- gene go map
- Returns:
- number of overlapping terms between merged sets of GO terms for duplicate gene lists
 
- 
computeSimilaritypublic Double computeSimilarity(Gene queryGene, Gene targetGene, Map<String, Double> GOProbMap, GoMetric.Metric metric) - Specified by:
- computeSimilarityin interface- GoMetric
- Parameters:
- queryGene- query gene
- targetGene- target gene
- GOProbMap- go prob map
- metric- metric
- Returns:
- the overlap score between two genes
 
- 
computeSimpleOverlap- Specified by:
- computeSimpleOverlapin interface- GoMetric
- Parameters:
- g- g
- coexpG- coexp g
- geneGoMap- gene go map
- Returns:
- number of overlapping terms
 
- 
createVectorMatrixpublic DoubleMatrix<Long,String> createVectorMatrix(Map<Long, Collection<String>> gene2go, boolean weight) - Specified by:
- createVectorMatrixin interface- GoMetric
- Parameters:
- gene2go- Map
- weight- weight
- Returns:
- Sparse matrix of genes x GOTerms
 
- 
getChildrenOccurrence- Specified by:
- getChildrenOccurrencein interface- GoMetric
- Parameters:
- termCountMap- each GO term uri mapped to the number of its occurrence in the corpus
- term- the uri of the query GO term
- Returns:
- the number of times the query GO term occurs in addition to the number of times its children occur in the corpus
 
- 
setGene2GOAssociationService- Specified by:
- setGene2GOAssociationServicein interface- GoMetric
- Parameters:
- gene2GOAssociationService- the gene2GOAssociationService to set
 
- 
setGeneOntologyService- Specified by:
- setGeneOntologyServicein interface- GoMetric
- Parameters:
- geneOntologyService- the geneOntologyService to set
 
- 
logIds
 
-