-
Notifications
You must be signed in to change notification settings - Fork 39
/
tetrad.py
34 lines (27 loc) · 798 Bytes
/
tetrad.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
try:
from tetrad.tetrad import Tetrad as external_tetrad
Tetrad = external_tetrad
# takes the same input args as tetrad but only returns error message
except ImportError:
class TetradMessage(object):
"""
You must first install tetrad: 'conda install tetrad -c eaton-lab'
"""
def __init__(self,
name=None,
data=None,
workdir="analysis-tetrad",
nquartets=0,
nboots=0,
load=False,
save_invariants=False,
*args,
**kwargs):
raise ImportError(MESSAGE)
Tetrad = TetradMessage
MESSAGE = """
To run tetrad you must first install the tetrad package.
Please run:
conda install tetrad -c eaton-lab
"""