Skip to content

Commit

Permalink
adding a check if the directory was passed by the user
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiia committed Jan 4, 2019
1 parent 2dfa509 commit 18a4fb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/1.1_footprint_extraction/footprints_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,9 @@ def write_to_bed_file(all_footprints, sorted_output_file_name):

#extract the name of directory where we want to save the file
output_directory = os.path.dirname(sorted_output_file_name)
#check if this directory exists, and if not, create one
check_directory(output_directory)
#check if there is a directory provided
if output_directory:
check_directory(output_directory)

#make sure the file is in .bed format
output_name = "not_sorted_" + os.path.splitext(os.path.basename(sorted_output_file_name))[0] + ".bed"
Expand Down

0 comments on commit 18a4fb5

Please sign in to comment.