Skip to content
Permalink
947cbfb2e5
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) 960 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 Outputfile
self.out_file = out_file
self.test_read_file()
def test_read_file(self):
# Method to testread the file
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")