Commit a239c12 1 parent 7a985c3 commit a239c12 Copy full SHA for a239c12
File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -263,7 +263,8 @@ def parse_ref(
263
263
args .workflow ,
264
264
files ,
265
265
overwrite = args .overwrite ,
266
- temp_dir = temp_dir
266
+ temp_dir = temp_dir ,
267
+ k = 31 if not args .k else args .k
267
268
)
268
269
elif args .workflow == 'nac' :
269
270
ref_nac (
Original file line number Diff line number Diff line change @@ -383,7 +383,8 @@ def download_reference(
383
383
workflow : str ,
384
384
files : Dict [str , str ],
385
385
temp_dir : str = 'tmp' ,
386
- overwrite : bool = False
386
+ overwrite : bool = False ,
387
+ k : int = 31
387
388
) -> Dict [str , str ]:
388
389
"""Downloads a provided reference file from a static url.
389
390
@@ -395,6 +396,7 @@ def download_reference(
395
396
paths to download the given reference have been provided
396
397
temp_dir: Path to temporary directory, defaults to `tmp`
397
398
overwrite: Overwrite an existing index file, defaults to `False`
399
+ k: k-mer size, defaults to `31` (only `31` and `63` are supported)
398
400
399
401
Returns:
400
402
Dictionary containing paths to generated file(s)
@@ -424,8 +426,13 @@ def download_reference(
424
426
f'The following workflow option is not supported: { workflow } '
425
427
)
426
428
429
+ long = ""
430
+ if k == 63 :
431
+ long = "_long"
432
+ elif k != 31 :
433
+ logger .info ("Only k-mer lengths 31 or 63 supported, defaulting to 31" )
427
434
url = "https://github.com/pachterlab/kallisto-transcriptome-indices/"
428
- url = url + f'releases/download/v1/{ species } _index_{ workflow } .tar.xz'
435
+ url = url + f'releases/download/v1/{ species } _index_{ workflow } { long } .tar.xz'
429
436
path = os .path .join (temp_dir , os .path .basename (url ))
430
437
logger .info (
431
438
'Downloading files for {} ({} workflow) from {} to {}' .format (
You can’t perform that action at this time.
0 commit comments