From 28c85f1b7b73b9e696454577921eaa64cba8f359 Mon Sep 17 00:00:00 2001 From: DariaGorbach <43273648+DariaGorbach@users.noreply.github.com> Date: Thu, 11 Oct 2018 20:35:24 +0300 Subject: [PATCH] Add files via upload --- bed_file.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 bed_file.py diff --git a/bed_file.py b/bed_file.py new file mode 100644 index 0000000..e6352ee --- /dev/null +++ b/bed_file.py @@ -0,0 +1,19 @@ +import sys + +def bed_parser(bfile): + output_data = [] + with open(bfile) as bed_data: + for line in bed_data.input(): + try: + line = bed_data.stdin.readline() + if not line: + break + return + for line in bed_data.input(): + if len(bed_data) < 3: + break + else: + continue + for element in range(len(bed_data)): + output_data.append(turple(element[0:5])) + return output_data