Skip to content

Commit

Permalink
update python3 required changes to filter iterators to list and dict …
Browse files Browse the repository at this point in the history
…keys to list
  • Loading branch information
jpsmith5 committed Jan 25, 2022
1 parent e0b10ca commit f5f3a14
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pypiper/ngstk.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ class of inputs (which can in turn be a string or a list).
if any(isinstance(i, list) for i in input_args):
# We have a list of lists. Process each individually.
local_input_files = list()
n_input_files = len(filter(bool, input_args))
n_input_files = len(list(filter(bool, input_args)))
print("Number of input file sets: " + str(n_input_files))

for input_i, input_arg in enumerate(input_args):
Expand Down Expand Up @@ -549,8 +549,8 @@ def temp_func(
if type(output_files) != list:
output_files = [output_files]

n_input_files = len(filter(bool, input_files))
n_output_files = len(filter(bool, output_files))
n_input_files = len(list(filter(bool, input_files)))
n_output_files = len(list(filter(bool, output_files)))

total_reads = sum(
[
Expand Down
4 changes: 2 additions & 2 deletions pypiper/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,14 +864,14 @@ def _determine_args(argument_groups, arguments, use_all_args=False):
# Define the argument groups.
args_by_group = {
"pypiper": ["recover", "new-start", "dirty", "force-follow", "testmode"]
+ LOGGING_CLI_OPTDATA.keys(),
+ [*LOGGING_CLI_OPTDATA],
"config": ["config"],
"checkpoint": ["stop-before", "stop-after"],
"resource": ["mem", "cores"],
"looper": ["config", "output-parent", "mem", "cores", "pipeline-name"],
"common": ["input", "sample-name"],
"ngs": ["sample-name", "input", "input2", "genome", "single-or-paired"],
"logmuse": LOGGING_CLI_OPTDATA.keys(),
"logmuse": [*LOGGING_CLI_OPTDATA],
"pipestat": [
"pipestat-namespace",
"pipestat-record-id",
Expand Down

0 comments on commit f5f3a14

Please sign in to comment.