diff sanitize_bed.py @ 10:ee29337f905c draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/ivar/ commit 8ce6fd9aee543d9e62db33a9c95f79d8dc4e6dea
author iuc
date Wed, 13 Jul 2022 15:20:33 +0000
parents ee2beb764a7b
children
line wrap: on
line diff
--- a/sanitize_bed.py	Fri Aug 20 20:34:11 2021 +0000
+++ b/sanitize_bed.py	Wed Jul 13 15:20:33 2022 +0000
@@ -9,10 +9,11 @@
 sanitized_data = []
 try:
     for record in bed_data:
-        fields = record.split('\t')
-        sanitized_data.append(
-            '\t'.join(fields[:4] + ['60'] + fields[5:])
-        )
+        if record.strip():
+            fields = record.split('\t')
+            sanitized_data.append(
+                '\t'.join(fields[:4] + ['60'] + fields[5:])
+            )
 except IndexError:
     pass  # leave column number issue to getmasked
 else: