From e9850e0a0c57de694e1e35d02c72de12df3c842e Mon Sep 17 00:00:00 2001 From: anastasiia Date: Fri, 4 Jan 2019 15:20:43 +0100 Subject: [PATCH] if there is no additional information provided by the original input bed file. the point will be printed to the last column in the output bed file --- bin/1.1_footprint_extraction/footprints_extraction.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/1.1_footprint_extraction/footprints_extraction.py b/bin/1.1_footprint_extraction/footprints_extraction.py index 47f8075..17345ed 100644 --- a/bin/1.1_footprint_extraction/footprints_extraction.py +++ b/bin/1.1_footprint_extraction/footprints_extraction.py @@ -96,6 +96,9 @@ def make_bed_dictionary(bed_file): for i in range(3, len(bed_line_array)): value.append(bed_line_array[i]) + if not value: #if there is no bonus information in the original bed file, add a "." to the coulmn in the output bed file + value = ["."] + bed_dictionary[key] = value else: #this is not a bed file, force exit logger.info('Error: please make sure the input bed file has a right format, the problem occured on the line ' + bed_line)