-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #420 from monarch-initiative/release-v2.0.0-RC5
Release `v2.0.0-RC5`
- Loading branch information
Showing
75 changed files
with
3,248 additions
and
2,443 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
phenol-analysis/src/main/java/org/monarchinitiative/phenol/analysis/util/Util.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package org.monarchinitiative.phenol.analysis.util; | ||
|
||
import org.monarchinitiative.phenol.analysis.ItemAnnotations; | ||
import org.monarchinitiative.phenol.ontology.algo.OntologyAlgorithm; | ||
import org.monarchinitiative.phenol.ontology.data.Ontology; | ||
import org.monarchinitiative.phenol.ontology.data.TermId; | ||
|
||
import java.util.HashSet; | ||
import java.util.Map; | ||
import java.util.Set; | ||
|
||
public class Util { | ||
|
||
public static Set<TermId> getDomainItemsAnnotatedByOntologyTerm(TermId termId, | ||
Ontology ontology, | ||
Map<TermId, ? extends ItemAnnotations<TermId>> gene2associationMap) { | ||
Set<TermId> domainItemSet = new HashSet<>(); | ||
// the following includes termId in the descendent set | ||
Set<TermId> descendentSet = OntologyAlgorithm.getDescendents(ontology, termId); | ||
|
||
for (Map.Entry<TermId, ? extends ItemAnnotations<TermId>> entry : gene2associationMap.entrySet()) { | ||
TermId gene = entry.getKey(); | ||
for (TermId ontologyTermId : entry.getValue().getAnnotatingTermIds()) { | ||
if (descendentSet.contains(ontologyTermId) || ontologyTermId.equals(termId)) { | ||
domainItemSet.add(gene); | ||
} | ||
} | ||
} | ||
|
||
return domainItemSet; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.