Skip to content

Commit 373c59b

Browse files
authored
Merge pull request #27 from holtgrewe/custom-models
Allow specification of custom classifier paths.
2 parents 72ce91d + b1f42b4 commit 373c59b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sv2/sv2Config.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python2
2+
import os.path
23
from sv2_backend import dump_json,errFH,get_path,query_yes_no
34
try:from configparser import ConfigParser
45
except ImportError:from ConfigParser import ConfigParser
@@ -11,7 +12,10 @@ def __init__(self):
1112
self.fh = Config.ini
1213
else:
1314
self.fh=get_path()+'/config/sv2.ini'
14-
self.json=get_path()+'/config/sv2_clf.json'
15+
if os.path.exists(os.path.join(os.path.dirname(self.fh), 'sv2_clf.json')):
16+
self.json=os.path.join(os.path.dirname(self.fh), 'sv2_clf.json')
17+
else:
18+
self.json=get_path()+'/config/sv2_clf.json'
1519
self.fasta_chr_flag=False
1620
self.clfs=None
1721
self.gtclf={} # classifiers for genotyping

0 commit comments

Comments
 (0)