diff --git a/advntr/__main__.py b/advntr/__main__.py index 29dcec8..a1eef27 100644 --- a/advntr/__main__.py +++ b/advntr/__main__.py @@ -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='', + genotype_others_group.add_argument('--working_directory', type=str, metavar='', default=None, help='working directory for creating temporary files needed for computation') genotype_others_group.add_argument('-m', '--models', type=str, metavar='', default=None, help='VNTR models file [%s]' % settings.ILLUMINA_DEFAULT_MODELS_FILE) diff --git a/advntr/advntr_commands.py b/advntr/advntr_commands.py index 76e9966..ff172c7 100644 --- a/advntr/advntr_commands.py +++ b/advntr/advntr_commands.py @@ -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)