Skip to content

Commit

Permalink
fix: take arg string in the blaze() function
Browse files Browse the repository at this point in the history
  • Loading branch information
youyupei committed Dec 17, 2024
1 parent ad625d4 commit cdb77d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions blaze/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,9 @@ def print_logo(args):
{BLAZE_LOGO}
'''))

def main():
def main(args_string=None):
# Start running: Welcome logo
args = parse_arg()
args = parse_arg(args_string)
print_logo(args)

# TMP: print all the arguments in args
Expand Down
8 changes: 5 additions & 3 deletions blaze/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)

def parse_arg():
def parse_arg(arg_string=None):
parser = argparse.ArgumentParser(
description=textwrap.dedent(helper.bold_text(
'''BLAZE2 is a tool for demultiplexing 10X single cell long-read RNA-seq data. It takes fastq files as
Expand Down Expand Up @@ -127,8 +127,10 @@ def get_files_from_dir(fastq_dir):
###############################
####### checking the argument:
###############################

args = parser.parse_args()
if arg_string is None:
args = parser.parse_args()
else:
args = parser.parse_args(arg_string.split())

# config the output filenames
args.output_fastq = args.output_prefix + args.output_fastq
Expand Down

0 comments on commit cdb77d2

Please sign in to comment.