15
15
import snakemake
16
16
17
17
wd = os .path .dirname (os .path .realpath (__file__ ))
18
- VERSION = '0.4'
18
+ VERSION = '0.4.2 '
19
19
20
+ # get the current directory
21
+ cd = os .getcwd ()
20
22
21
23
class SpecialHelpOrder (click .Group ):
22
24
@@ -119,6 +121,8 @@ def hcmv(evaluation, dryrun=False, conda_prefix=None, slow=False, **kwargs):
119
121
snake_kwargs = dict (runOnReads = slow )
120
122
for arg , val in kwargs .items ():
121
123
if val != None :
124
+ if arg == 'outpath' :
125
+ val = os .path .join (cd , val )
122
126
snake_kwargs [arg ] = val
123
127
if evaluation == "variantcall" :
124
128
snakes = [variantcall_smk ]
@@ -152,8 +156,12 @@ def vareval(dryrun=False, conda_prefix=None, **kwargs):
152
156
for arg , val in kwargs .items ():
153
157
if val != None :
154
158
if arg == 'refs' or arg == 'vcfs' :
155
- val = ',' .join ([os .path .join (os . getcwd () , item .strip ())
159
+ val = ',' .join ([os .path .join (cd , item .strip ())
156
160
for item in val .split (',' )])
161
+ elif arg == 'outpath' :
162
+ val = os .path .join (cd , val )
163
+ else :
164
+ continue
157
165
snake_kwargs [arg ] = val
158
166
run_snake (variantcall_smk , dryrun , conda_prefix , ** snake_kwargs )
159
167
@@ -178,6 +186,8 @@ def asmeval(dryrun=False, threads=2, conda_prefix=None, **kwargs):
178
186
snake_kwargs = {}
179
187
for arg , val in kwargs .items ():
180
188
if val != None :
189
+ if arg == 'outpath' :
190
+ val = os .path .join (cd , val )
181
191
snake_kwargs [arg ] = val
182
192
run_snake (assembly_smk , dryrun , conda_prefix , ** snake_kwargs )
183
193
0 commit comments