Skip to content

Commit

Permalink
change default value of working_directory
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadbakhtiari committed Mar 27, 2019
1 parent 5700f0d commit 6985272
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion advntr/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def main():
genotype_others_group = genotype_parser.add_argument_group("Other options")
genotype_others_group.add_argument('-h', '--help', action='help',
help='show this help message and exit')
genotype_others_group.add_argument('--working_directory', type=str, metavar='<path>',
genotype_others_group.add_argument('--working_directory', type=str, metavar='<path>', default=None,
help='working directory for creating temporary files needed for computation')
genotype_others_group.add_argument('-m', '--models', type=str, metavar='<file>', default=None,
help='VNTR models file [%s]' % settings.ILLUMINA_DEFAULT_MODELS_FILE)
Expand Down
2 changes: 2 additions & 0 deletions advntr/advntr_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def genotype(args, genotype_parser):
input_is_alignment_file = input_file.endswith('bam') or input_file.endswith('sam') or input_file.endswith('cram')
if not input_is_alignment_file:
print_error(genotype_parser, "The input file format is not supported. Please use BAM/CRAM files.")
if args.working_directory is None:
print_error(genotype_parser, 'Please specify working directory by -wd or --working_directory')
working_directory = args.working_directory + '/' if args.working_directory else os.path.dirname(input_file) + '/'

log_file = working_directory + 'log_%s.log' % os.path.basename(input_file)
Expand Down

0 comments on commit 6985272

Please sign in to comment.