ManuSetty / wishbone

Wishbone is an algorithm to align cells along developmental trajectories with branches
GNU General Public License v2.0
41 stars 36 forks source link

Problem running gsea #31

Closed tjnitram closed 8 years ago

tjnitram commented 8 years ago

I'm having trouble with running gsea. It seems that wishbone needs a folder ".seqc" in the home directory that isn't installed with the rest of the package. Maybe there is a dependency I didn't install? As a workaround, I created the .seqc directory and and copied the human and mouse gmt files over to it. So: ~/.seqc/tools/mouse and ~/.seqc/tools/human. After making these directories, gsea ran successfully.

The error is clearest when not specifying a gmt file: scdata.run_gsea( output_stem= os.path.expanduser('~/.wishbone/tools/mouse'))

 ---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
ipython-input-23-c357cd970a12> in <module>()
----> 1 scdata.run_gsea( output_stem= os.path.expanduser('~/.wishbone/tools/mouse'))

/Users/tom/anaconda3/lib/python3.5/site-packages/wishbone/wb.py in run_gsea(self, output_stem, gmt_file, components, enrichment_threshold)
    857 
    858         if not gmt_file:
--> 859             self._gmt_options()
    860             return
    861         else:

/Users/tom/anaconda3/lib/python3.5/site-packages/wishbone/wb.py in _gmt_options()
    781     @staticmethod
    782     def _gmt_options():
--> 783         mouse_options = os.listdir(os.path.expanduser('~/.seqc/tools/mouse'))
    784         human_options = os.listdir(os.path.expanduser('~/.seqc/tools/human'))
    785         print('Available GSEA .gmt files:\n\nmouse:\n{m}\n\nhuman:\n{h}\n'.format(

FileNotFoundError: [Errno 2] No such file or directory: '/Users/tom/.seqc/tools/mouse'

When you specify the gmt file it runs, but creates a lot of error files instead of results: reports = scdata.run_gsea(output_stem= os.path.expanduser('~/.wishbone/gsea/mouse'), gmt_file=('mouse', 'gofat.bp.v1.0.gmt.txt'))

9056 [INFO ] Begun importing: RankedList from: /Users/tom/.wishbone/gsea/mouse_cmpnt_1.rnk
9778 [INFO ] No ranked list collapsing was done .. using original as is
to parse>/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt< got: [/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt]
9845 [INFO ] Renaming rpt dir on error to: /Users/tom/.wishbone/gsea/error_mouse_1.GseaPreranked.1473182259433
0853 [INFO ] Begun importing: RankedList from: /Users/tom/.wishbone/gsea/mouse_cmpnt_2.rnk
1004 [INFO ] No ranked list collapsing was done .. using original as is
to parse>/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt< got: [/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt]
1022 [INFO ] Renaming rpt dir on error to: /Users/tom/.wishbone/gsea/error_mouse_2.GseaPreranked.1473182260902
1947 [INFO ] Begun importing: RankedList from: /Users/tom/.wishbone/gsea/mouse_cmpnt_3.rnk
2093 [INFO ] No ranked list collapsing was done .. using original as is
to parse>/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt< got: [/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt]
2106 [INFO ] Renaming rpt dir on error to: /Users/tom/.wishbone/gsea/error_mouse_3.GseaPreranked.1473182262003
3037 [INFO ] Begun importing: RankedList from: /Users/tom/.wishbone/gsea/mouse_cmpnt_4.rnk
3182 [INFO ] No ranked list collapsing was done .. using original as is
to parse>/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt< got: [/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt]
3195 [INFO ] Renaming rpt dir on error to: /Users/tom/.wishbone/gsea/error_mouse_4.GseaPreranked.1473182263090
4122 [INFO ] Begun importing: RankedList from: /Users/tom/.wishbone/gsea/mouse_cmpnt_5.rnk
4262 [INFO ] No ranked list collapsing was done .. using original as is
to parse>/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt< got: [/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt]
4312 [INFO ] Renaming rpt dir on error to: /Users/tom/.wishbone/gsea/error_mouse_5.GseaPreranked.1473182264174
5239 [INFO ] Begun importing: RankedList from: /Users/tom/.wishbone/gsea/mouse_cmpnt_6.rnk
5385 [INFO ] No ranked list collapsing was done .. using original as is
to parse>/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt< got: [/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt]
5395 [INFO ] Renaming rpt dir on error to: /Users/tom/.wishbone/gsea/error_mouse_6.GseaPreranked.1473182265293
6404 [INFO ] Begun importing: RankedList from: /Users/tom/.wishbone/gsea/mouse_cmpnt_7.rnk
6570 [INFO ] No ranked list collapsing was done .. using original as is
to parse>/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt< got: [/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt]
6585 [INFO ] Renaming rpt dir on error to: /Users/tom/.wishbone/gsea/error_mouse_7.GseaPreranked.1473182266466
7630 [INFO ] Begun importing: RankedList from: /Users/tom/.wishbone/gsea/mouse_cmpnt_8.rnk
7799 [INFO ] No ranked list collapsing was done .. using original as is
to parse>/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt< got: [/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt]
7810 [INFO ] Renaming rpt dir on error to: /Users/tom/.wishbone/gsea/error_mouse_8.GseaPreranked.1473182267693
8759 [INFO ] Begun importing: RankedList from: /Users/tom/.wishbone/gsea/mouse_cmpnt_9.rnk
8904 [INFO ] No ranked list collapsing was done .. using original as is
to parse>/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt< got: [/Users/tom/.seqc/tools/mouse/gofat.bp.v1.0.gmt.txt]
8917 [INFO ] Renaming rpt dir on error to: /Users/tom/.wishbone/gsea/error_mouse_9.GseaPreranked.1473182268813

The same thing happens with the gui.

ManuSetty commented 8 years ago

Thanks for pointing this out. This was a bug in the code and a fix has been put in Release 0.4.1 to look for .wishbone folder. Please update your installation.