Commits

Flashpoint committed c2e4880

Added functionality to obiGeneSets.py to remove locally stored gene sets. Created a prototype widget OWtest.py to store and remove own gene sets. The front-end still needs work

  • Participants
  • Parent commits f1e7390

Comments (0)

Files changed (1)

_bioinformatics/obiGeneSets.py

     annotations = obiGO.Annotations(org, ontology=ontology)
 
     go_sets = obimiRNA.get_GO(mirnas, annotations, enrichment=enrichment, pval=pval, goSwitch=False)
-    print go_sets
 
     go_sets = obimiRNA.filter_GO(go_sets, annotations, treshold=treshold)
 
     gs_files = filter(is_genesets_file, os.listdir(pth))
     return [ filename_parse(fn) + (True,) for fn in gs_files ]
 
+def remove_local(gene_set):
+    """ Removes a given gene set from the local repository. """
+    pth = local_path()
+    gs_files = filter(is_genesets_file, os.listdir(pth)) 
+    for setfile in gs_files:
+        if setfile.__contains__(gene_set):
+            setBgone = os.path.join(pth, setfile)
+            os.remove(setBgone) 
+
 def list_serverfiles_from_flist(flist):
     gs_files = filter(is_genesets_file, flist)
     localfiles = set(orngServerFiles.listfiles(sfdomain))
                 print "organism not found", org
 
 if __name__ == "__main__":
-    print reactomePathwaysGeneSets()
-    exit()
     rsf = orngServerFiles.ServerFiles(username=sys.argv[1], password=sys.argv[2])
     upload_genesets(rsf)
     pass