Commits

Anonymous committed fb430b7

target dir for GO and annotation conversion

  • Participants
  • Parent commits f80e7ed

Comments (0)

Files changed (1)

 ## usage:
 ##     GOlib.txtGO2pickle('200312')
 ##
-def txtGO2pickle(GOver = '200312'):
+def txtGO2pickle(GOver = '200312', putIntoDir='.'):
 ##    exit("forced error - this function is not tested yet")
     dataDir = './go_' + GOver + '-termdb-tables/'
 
 
         if not(obsolete):
             if type == 'relationship':
-                termRelTypes[termID] = 'name'
+                termRelTypes[termID] = name
             else:
                 assert( term.get(GOID, None) == None)
                 term[GOID] = (name, type, isroot)
         print "\t%d %s nodes" % (len(GOIDtoGOID[aspect].keys()), aspect)
         print "\t%d %s nodes in reverse GO" % (len(rGOIDtoGOID[aspect].keys()), aspect)
         GO = {'aspect': aspect, 'term': term, 'relationTypes': termRelTypes, 'GO': GOIDtoGOID[aspect], 'rGO': rGOIDtoGOID[aspect]}
-        fname = GOver + '-' + aspect + '.go'
+        fname = putIntoDir + '\\' + GOver + '-' + aspect + '.go'
         cPickle.dump(GO, open(fname, 'w'))
     print
     print