Ejemplo n.º 1
0
 def import_data(self):    
     self.error(0)     
     if self.selected_file:
         try:
             self.new_geneset = loadGMT(open(self.selected_file, "rt").read(), self.genesetname)
             geneset_split = self.new_geneset.split_by_hierarchy()
             for geneset in geneset_split:
                 register(geneset)
             self.populate_table()
         except Exception, ex:
             self.error(0, "An error occurred while "
                           "loading the file:\n\t%r" % self.selected_file
                           )   
Ejemplo n.º 2
0
 def import_data(self):    
     self.error(0)     
     if self.selected_file:
         try:
             self.new_geneset = loadGMT(open(self.selected_file, "rt").read(), self.genesetname)
             geneset_split = self.new_geneset.split_by_hierarchy()
             for geneset in geneset_split:
                 register(geneset)
             self.populate_table()
         except Exception, ex:
             self.error(0, "An error occurred while "
                           "loading the file:\n\t%r" % self.selected_file
                           )   
Ejemplo n.º 3
0
##interval:7
from common import *
"""
Orange server upload for Cytoband gene sets
"""
from Orange.bio.obiGeneSets import cytobandGeneSets, register

cytoband_sets_split = cytobandGeneSets().split_by_hierarchy()
for band_sets in cytoband_sets_split:
    register(band_sets, sf_server)
Ejemplo n.º 4
0
gene_sets = []
for (ef, efv), genes in sets.items():
    ef_display = display_string(ef)
    gs = GeneSet(genes, "Diff. expressed in %s=%s." % (ef_display, efv), id=ef + ":" + efv,
                 description="Diff. expressed in %s=%s." % (ef_display, efv),
                 link="http://www.ebi.ac.uk/gxa/qrs?specie_0={organism}&gprop_0=&gnot_0=&gval_0=&fact_1=&fexp_1=UPDOWN&fmex_1=&fval_1=%22{efv}%22+&view=hm".format( \
                         organism = "+".join(organism.lower().split()), efv = "+".join(efv.lower().split())), organism=org_code, hierarchy=("Gene Expression Atlas", display_string(condition)))
    gene_sets.append(gs)

final_set = GeneSets(gene_sets)

print final_set
exit()

from Orange.bio.obiGeneSets import register
import Orange.utils.serverfiles as serverfiles
import sys

try:
    sf_server = serverfiles.ServerFiles(sys.argv[1], sys.argv[2])
except:
    print "argv[1] = username, argv[2] = password"
    exit()

set_split = final_set.split_by_hierarchy()

for s in set_split:
    register(s, sf_server)

print "Gene sets successfully registered..."
Ejemplo n.º 5
0
##interval:7
from common import *
"""
Orange server upload for Cytoband gene sets
"""
from Orange.bio.obiGeneSets import reactomePathwaysGeneSets, register

reactome_sets_split = reactomePathwaysGeneSets().split_by_hierarchy()
for pathway_sets in reactome_sets_split:
    register(pathway_sets, sf_server)
Ejemplo n.º 6
0
gene_sets = []
for (ef, efv), genes in sets.items():
    ef_display = display_string(ef)
    gs = GeneSet(genes, "Diff. expressed in %s=%s." % (ef_display, efv), id=ef + ":" + efv,
                 description="Diff. expressed in %s=%s." % (ef_display, efv),
                 link="http://www.ebi.ac.uk/gxa/qrs?specie_0={organism}&gprop_0=&gnot_0=&gval_0=&fact_1=&fexp_1=UPDOWN&fmex_1=&fval_1=%22{efv}%22+&view=hm".format( \
                         organism = "+".join(organism.lower().split()), efv = "+".join(efv.lower().split())), organism=org_code, hierarchy=("Gene Expression Atlas", display_string(condition)))
    gene_sets.append(gs)

final_set = GeneSets(gene_sets)

print final_set
exit()

from Orange.bio.obiGeneSets import register
import Orange.utils.serverfiles as serverfiles
import sys

try:
    sf_server = serverfiles.ServerFiles(sys.argv[1], sys.argv[2])
except:
    print "argv[1] = username, argv[2] = password"
    exit()

set_split = final_set.split_by_hierarchy()

for s in set_split:
    register(s, sf_server)

print "Gene sets successfully registered..."
Ejemplo n.º 7
0
Orange server upload for DictyMutants 
"""

tmpdir_mutants = tempfile.mkdtemp("dictymutants")
base_mutants = DictyMutants.download_mutants()
file_mutants = os.path.join(tmpdir_mutants, "tempMut")

fm = open(file_mutants, "wb")
fm.write(base_mutants)
fm.close()

fm_dom = DictyMutants.domain
fm_name = DictyMutants.pickle_file

print file_mutants

sf_server.upload(fm_dom, fm_name, file_mutants, title="dictyBase mutant phenotypes",
    tags=DictyMutants.tags)
sf_server.unprotect(fm_dom, fm_name)

shutil.rmtree(tmpdir_mutants)

"""
Orange server upload for Dicty mutant gene sets
"""
from Orange.bio.obiGeneSets import dictyMutantSets, update_server_list, register

mutant_sets_split = dictyMutantSets().split_by_hierarchy()
for mutant_sets in mutant_sets_split:
    register(mutant_sets, sf_server)
Ejemplo n.º 8
0
##interval:7
from common import *

"""
Orange server upload for Cytoband gene sets
"""
from Orange.bio.obiGeneSets import cytobandGeneSets, register

cytoband_sets_split = cytobandGeneSets().split_by_hierarchy()
for band_sets in cytoband_sets_split:
    register(band_sets, sf_server)
Ejemplo n.º 9
0

from common import *
from Orange.bio import obiOMIM

import os, sys

path = os.path.join(environ.buffer_dir, "tmp_OMIM")

try:
    os.mkdir(path)
except OSError:
    pass
filename = os.path.join(path, "morbidmap")
obiOMIM.OMIM.download_from_NCBI(filename)

sf_server.upload("OMIM", "morbidmap", filename, title="Online Mendelian Inheritance in Man (OMIM)",
                   tags=["genes", "diseases", "human", "OMIM" "#version:%i" % obiOMIM.OMIM.VERSION])
sf_server.unprotect("OMIM", "morbidmap")


"""
Orange server upload for OMIM morbidmap gene sets
"""
from Orange.bio.obiGeneSets import omimGeneSets, register

omim_sets_split = omimGeneSets().split_by_hierarchy()
for omim_sets in omim_sets_split:
    register(omim_sets, sf_server)

Ejemplo n.º 10
0
tmpdir_mutants = tempfile.mkdtemp("dictymutants")
base_mutants = DictyMutants.download_mutants()
file_mutants = os.path.join(tmpdir_mutants, "tempMut")

fm = open(file_mutants, "wb")
fm.write(base_mutants)
fm.close()

fm_dom = DictyMutants.domain
fm_name = DictyMutants.pickle_file

print file_mutants

sf_server.upload(fm_dom,
                 fm_name,
                 file_mutants,
                 title="dictyBase mutant phenotypes",
                 tags=DictyMutants.tags)
sf_server.unprotect(fm_dom, fm_name)

shutil.rmtree(tmpdir_mutants)
"""
Orange server upload for Dicty mutant gene sets
"""
from Orange.bio.obiGeneSets import dictyMutantSets, update_server_list, register

mutant_sets_split = dictyMutantSets().split_by_hierarchy()
for mutant_sets in mutant_sets_split:
    register(mutant_sets, sf_server)
Ejemplo n.º 11
0
##interval:7
from common import *

"""
Orange server upload for Cytoband gene sets
"""
from Orange.bio.obiGeneSets import reactomePathwaysGeneSets, register

reactome_sets_split = reactomePathwaysGeneSets().split_by_hierarchy()
for pathway_sets in reactome_sets_split:
    register(pathway_sets, sf_server)