From ffa3b286d66939157d36f1b24ae1766808f9875f Mon Sep 17 00:00:00 2001 From: Mehrdad Bakhtiari Date: Mon, 25 Mar 2019 20:07:31 -0700 Subject: [PATCH] check the input file format --- advntr/advntr_commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/advntr/advntr_commands.py b/advntr/advntr_commands.py index 707466c..76e9966 100644 --- a/advntr/advntr_commands.py +++ b/advntr/advntr_commands.py @@ -79,6 +79,8 @@ def genotype(args, genotype_parser): input_file = args.alignment_file if args.alignment_file else args.fasta 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.") 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)