Skip to content

Commit de17c6c

Browse files
committed
Make unitas work without refseq args
1 parent 8ceffd2 commit de17c6c

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

hlsmallrna/__main__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,10 @@ def unitas_command(small_rna_path, species_name, ref_seqs, cds, unspliced_transc
190190

191191
mkdir_if_not_exists(UNITAS_OUTPUT)
192192

193+
small_rna_list = glob.glob(os.path.join(small_rna_path, '*.fastq'))
194+
193195
with Pool(threads, initializer=init_worker, initargs=(species_name, ref_seqs, quiet, UNITAS_OUTPUT,)) as p:
194-
p.map(unitas_threads, glob.glob(os.path.join(small_rna_path, '*.fastq')))
196+
p.map(unitas_threads, small_rna_list)
195197

196198
table_path = merge_summary()
197199
graph_unitas_classification_type(table_path)

hlsmallrna/unitas.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@ def run_unitas_annotation(small_rna, species_name, ref_files, quiet=0, unitas_ou
5959
'-species', species_name
6060
]
6161

62-
for refs in ref_files:
63-
unitas_command.append('-refseq')
64-
unitas_command.append(os.path.join(CWD, refs))
62+
if ref_files is not None:
63+
for refs in ref_files:
64+
unitas_command.append('-refseq')
65+
unitas_command.append(os.path.join(CWD, refs))
6566

6667
unitas_command = unitas_command + get_config_key('cli-tools', 'unitas', 'unitas_params')
6768

0 commit comments

Comments
 (0)