tanghaibao / goatools

Python library to handle Gene Ontology (GO) terms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issue with `plot_gos()`

stefan-dam opened this issue · comments

Hi there,

I was trying to use plot_gos(), but I got an FileNotFoundError:

FileNotFoundError Traceback (most recent call last)
File ~/opt/anaconda3/envs/test/lib/python3.9/site-packages/pydot.py:1912, in Dot.create(self, prog, format, encoding)
1911 try:
-> 1912 stdout_data, stderr_data, process = call_graphviz(
1913 program=prog,
1914 arguments=arguments,
1915 working_dir=tmp_dir,
1916 )
1917 except OSError as e:

File ~/opt/anaconda3/envs/test/lib/python3.9/site-packages/pydot.py:129, in call_graphviz(program, arguments, working_dir, **kwargs)
127 program_with_args = [program, ] + arguments
--> 129 process = subprocess.Popen(
130 program_with_args,
131 env=env,
132 cwd=working_dir,
133 shell=False,
134 stderr=subprocess.PIPE,
135 stdout=subprocess.PIPE,
136 **kwargs
137 )
138 stdout_data, stderr_data = process.communicate()

File ~/opt/anaconda3/envs/test/lib/python3.9/subprocess.py:947, in Popen.init(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, user, group, extra_groups, encoding, errors, text, umask)
...
-> 1922 raise OSError(*args)
1923 else:
1924 raise

FileNotFoundError: [Errno 2] "dot" not found in path.

Could you please help me to fix this?

PS: I am using MacOS. As suggested in #170, I checked to be sure that I installed the Graphviz's dot program.

Thank you for your interest in GOA tools and for the great question.

On the command line, when you do dot -V, do you see a version of dot?:

$ dot -V
dot - graphviz version 2.50.0 (20220216.1147)