@@ -383,7 +383,8 @@ def download_reference(
383383 workflow : str ,
384384 files : Dict [str , str ],
385385 temp_dir : str = 'tmp' ,
386- overwrite : bool = False
386+ overwrite : bool = False ,
387+ k : int = 31
387388) -> Dict [str , str ]:
388389 """Downloads a provided reference file from a static url.
389390
@@ -395,6 +396,7 @@ def download_reference(
395396 paths to download the given reference have been provided
396397 temp_dir: Path to temporary directory, defaults to `tmp`
397398 overwrite: Overwrite an existing index file, defaults to `False`
399+ k: k-mer size, defaults to `31` (only `31` and `63` are supported)
398400
399401 Returns:
400402 Dictionary containing paths to generated file(s)
@@ -424,8 +426,15 @@ def download_reference(
424426 f'The following workflow option is not supported: { workflow } '
425427 )
426428
429+ long = ""
430+ if k == 63 :
431+ long = "_long"
432+ elif k != 31 :
433+ logger .info (
434+ "Only k-mer lengths 31 or 63 supported, defaulting to 31"
435+ )
427436 url = "https://github.com/pachterlab/kallisto-transcriptome-indices/"
428- url = url + f'releases/download/v1/{ species } _index_{ workflow } .tar.xz'
437+ url = url + f'releases/download/v1/{ species } _index_{ workflow } { long } .tar.xz'
429438 path = os .path .join (temp_dir , os .path .basename (url ))
430439 logger .info (
431440 'Downloading files for {} ({} workflow) from {} to {}' .format (
@@ -627,7 +636,7 @@ def ref(
627636
628637 if len (fasta_paths ) > 1 :
629638 raise RefError ((
630- 'Option `--a ` does not support multiple FASTA files as input'
639+ 'Option `--aa ` does not support multiple FASTA files as input'
631640 'while no GTF file(s) provided'
632641 ))
633642 else :
@@ -668,6 +677,8 @@ def ref(
668677 if not glob .glob (f'{ index_path } *' ) or overwrite :
669678 t2g_result = create_t2g_from_fasta (cdna_path , t2g_path , aa_flag = aa )
670679 results .update (t2g_result )
680+ if index_path .upper () == "NONE" :
681+ return results
671682
672683 if k and k != 31 :
673684 logger .warning (
@@ -1009,6 +1020,8 @@ def ref_nac(
10091020 )
10101021 t2g_result = create_t2g_from_fasta (combined_path , t2g_path )
10111022 results .update (t2g_result )
1023+ if index_path .upper () == "NONE" :
1024+ return results
10121025
10131026 if k and k != 31 :
10141027 logger .warning (
0 commit comments