Skip to content

Commit

Permalink
check the input file format
Browse files Browse the repository at this point in the history
  • Loading branch information
mehrdadbakhtiari committed Mar 26, 2019
1 parent e1f0dde commit ffa3b28
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions advntr/advntr_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ffa3b28

Please sign in to comment.