-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dd11dfc
commit cc49fac
Showing
15 changed files
with
266 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
c256c884 | ||
dd11dfcb |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
import networkx | ||
from onto2nx import OWLParser, parse_owl | ||
|
||
from command.lib.anno.base_parser import BaseParser | ||
|
||
|
||
class OWLFileParser(BaseParser): | ||
FILE_TYPE_NAME = 'OWL' | ||
|
||
def parse(self, filename): | ||
graph = parse_owl(filename) | ||
return networkx.readwrite.cytoscape_data(graph) |
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 |
---|---|---|
@@ -1,16 +1,17 @@ | ||
from django.db import models | ||
|
||
from command.lib.db.compendium.annotation_value import AnnotationValue | ||
from command.lib.db.compendium.bio_feature import BioFeature | ||
from command.lib.db.compendium.ontology_node import OntologyNode | ||
|
||
|
||
class BioFeatureAnnotation(models.Model): | ||
bio_feature = models.ForeignKey(BioFeature, on_delete=models.CASCADE, default=1, null=False, blank=False) | ||
ontology_node = models.ForeignKey(OntologyNode, on_delete=models.CASCADE, default=1, null=False, blank=False) | ||
annotation_value = models.ForeignKey(AnnotationValue, on_delete=models.CASCADE, null=False, default=1) | ||
|
||
class Meta: | ||
unique_together = ('bio_feature', 'ontology_node',) | ||
unique_together = ('bio_feature', 'annotation_value') | ||
|
||
def to_dict(self): | ||
fields = ['id', 'bio_feature_id', 'ontology_node_id'] | ||
fields = ['id', 'bio_feature_id', 'annotation_value_id'] | ||
return {k: self.__dict__[k] for k in fields} |
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.