Aleš Erjavec avatar Aleš Erjavec committed 4ac5012

Comments (0)

Files changed (1)

     def toTuple(self):
         return (self.GOId, self.parents)
+_re_obj_name_ = re.compile("([a-zA-z0-9-_]+)")
 class Annotation:
     """Holds the data for an annotation record read from the annotation file. Fields can be
         self.GOId=self.original[4].strip(" ")
         self.evidence=self.original[6].strip(" ")
         self.aspect=self.original[8].strip(" ")
-        self.alias=self.original[10].split("|")
+        self.alias=self.original[10].split("|") 
         for key, val in zip(annotationFields, self.original):
+        self.aditionalAliases = []
+        if ":" in self.DB_Object_Name:
+            self.aditionalAliases = _re_obj_name_.findall(self.DB_Object_Name.split(":")[0])
     def __getattr__(self, name):
         if name in annotationFieldsDict:
             return self.original[annotationFieldsDict[name]]
             for alias in a.alias:
+            for alias in a.aditionalAliases:
+                aliasMapper[alias]=a.geneName
             names=[a.original[1], a.original[2]]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.