INNER CODE UNIT · Python
__init__
nickjcroucher/gubbins · python/gubbins/ValidateFastaAlignment.py:15
def __init__(self, input_filename):
self.input_filename = input_filename
def is_input_fasta_file_valid(self):
try:
if not self.does_each_sequence_have_the_same_length():
print("Each sequence must be the same length")
return False
if not self.are_sequence_names_unique():
print("All sequence names in the fasta file must be unique")
return False
if not self.does_each_sequence_have_a_name_and_genomic_data():
print("Each sequence must have a name and some genomic data")
return False
except:
return False
return True