Changeset 1837:3ca19c9e0eb2 in orange-bioinformatics for _bioinformatics/widgets/OWCustomSets.py


Ignore:
Timestamp:
07/15/13 16:45:26 (9 months ago)
Author:
Flashpoint <vid.flashpoint@…>
Branch:
default
Message:

Fixed a filename bug in OWCustomSets.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _bioinformatics/widgets/OWCustomSets.py

    r1822 r1837  
    22<name>Custom Gene Sets</name> 
    33<description>Manage custom geneset files</description> 
    4 <icon></icon> 
     4<icon>icons/customSets.svg</icon> 
    55<contact>Vid Jelen (vid.jelen1@gmail.com)</contact> 
    66""" 
     
    7878        if self.listView.selectedItems(): 
    7979            self.info.clear() 
    80             name = self.listView.selectedItems()[0].text(0)             
     80            name = self.listView.selectedItems()[0].text(0).replace(" - ", "_._")  
    8181            for geneset in os.listdir(local_path()): 
    8282                if geneset.__contains__(str(name)): 
     
    9595        for geneset in os.listdir(local_path()): 
    9696            item = QTreeWidgetItem(self.listView) 
    97             name = geneset[geneset.index("_._")+3:geneset.index(".gmt")+4] 
     97            name = geneset[geneset.index("_")+1:geneset.rfind("_._")] 
    9898            the_file = os.path.join(local_path(), geneset) 
    9999            mod_time = str(modification_date(the_file)) 
    100             item.setText(0, name) 
     100            item.setText(0, name.replace("_._", " - ")) 
    101101            item.setText(1, mod_time[:mod_time.rfind(".")]) 
    102102 
     
    125125            final_text = "" 
    126126            self.preview_view.clear() 
    127             name = self.listView.selectedItems()[0].text(0)             
     127            name = self.listView.selectedItems()[0].text(0).replace(" - ", "_._")             
    128128            for geneset in os.listdir(local_path()): 
    129129                if geneset.__contains__(str(name)): 
Note: See TracChangeset for help on using the changeset viewer.