Changeset 1795:663192bd4469 in orange-bioinformatics


Ignore:
Timestamp:
05/20/13 10:24:50 (11 months ago)
Author:
Flashpoint <vid.flashpoint@…>
Branch:
default
Message:

Removed obiCytobands.py and created genesets in obiGeneSets.py. updateCytobands.py saves only genesets now

Location:
_bioinformatics
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/obiGeneSets.py

    r1794 r1795  
    7979def cytobandGeneSets(): 
    8080    """ 
    81     Return cytoband gene sets from Stanford Microarray Database 
    82     """ 
    83     from . import obiCytobands 
    84      
    85     genesets = [GeneSet(id=band.name, name=band.descriptor, genes=obiCytobands.band_genes(band), hierarchy=("Cytobands",), organism="9606", # 352472 gathered from obiGO.py code_map -> Dicty identifier 
    86                         link="") \ 
    87                         for band in obiCytobands.bands()] 
    88    
     81    Create cytoband gene sets from Stanford Microarray Database 
     82    """ 
     83    import urllib2 
     84 
     85    url = "http://www-stat.stanford.edu/~tibs/GSA/cytobands-stanford.gmt" 
     86    stream = urllib2.urlopen(url) 
     87    data = stream.read().splitlines() 
     88 
     89    genesets = [] 
     90    for band in data: 
     91        b = band.split("\t") 
     92        genesets.append(GeneSet(id=b[0], name=b[1], genes=b[2:] if b[2:] else [], hierarchy=("Cytobands",), organism="9606", link=""))           
     93 
    8994    return GeneSets(genesets) 
    9095 
     
    391396 
    392397if __name__ == "__main__": 
     398    print cytobandGeneSets() 
     399    exit() 
    393400    rsf = orngServerFiles.ServerFiles(username=sys.argv[1], password=sys.argv[2]) 
    394401    upload_genesets(rsf) 
  • _bioinformatics/obiOMIM.py

    r1794 r1795  
    1616        string = morbidmap_line.split("|", 1)[0] 
    1717        match = self.regex.match(string) 
    18 #        print string 
    19 #        print match.groups() 
     18        print string 
     19        print match.groups() 
    2020        self.name, self.id, self.mapping = [s.strip() if s else s for s in match.groups()[:3]] 
    2121        if match.group("m2"): 
     
    3232             
    3333        filename = os.path.join(self.local_database_path, "morbidmap") 
     34        print filename 
    3435        if not os.path.exists(filename): 
    3536            stream = urllib2.urlopen("ftp://ftp.ncbi.nih.gov/repository/OMIM/ARCHIVE/morbidmap") 
Note: See TracChangeset for help on using the changeset viewer.