Skip to content
Permalink
4f40b11ca2
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
35 lines (25 sloc) 972 Bytes
class Validator:
"""
Class to validate the gtf-output-file.
@author: Sebastian Beyvers
@contact: sebastian.beyvers@med.uni-giessen.de
"""
def __init__(self, out_file):
# Constructor
# input_parameter: out_file = path to output file
self.out_file = out_file
self.test_read_file()
def test_read_file(self):
# Method to test the output file-format
with open(self.out_file) as outfile:
line = outfile.readline()
if line:
if len(line.split("\t")) == 9:
print("Validation complete no errors found !")
else:
print("Incorrect output Format: Try again after deleting data folder.")
else:
print("Outputfile not in correct Format: Try again after deleting data Folder.")
exit(1)
# Debug
# v = Validator("/home/basti/Schreibtisch/test_hg38.gtf")