Split line and check number of columns

def _split_line(self, line_str):
        """Split line and check number of columns"""
        arr = line_str.rstrip().split("\t")
        if len(arr) != self.expected_fields:
            raise exceptions.InvalidRecordException(
                (
                    "The line contains an invalid number of fields. Was "
                    "{} but expected {}\n{}".format(len(arr), 9 + len(self.samples.names), line_str)
                )
            )
        return arr