def METHOD_NAME(self, stream):
    try:
        self._number_of_seqs
    except AttributeError:
        return
    names, seqs = self._read_file(stream)
    seqs = ["".join(seq) for seq in seqs]
    if len(seqs) != self._number_of_seqs:
        raise ValueError(
            "Found %i records in this alignment, told to expect %i"
            % (len(seqs), self._number_of_seqs)
        )
    for seq in seqs:
        if len(seq) != self._length_of_seqs:
            raise ValueError(
                "Expected all sequences to have length %d; found %d"
                % (self._length_of_seqs, len(seq))
            )
        if "." in seq:
            raise ValueError("PHYLIP format no longer allows dots in sequence")
    coordinates = Alignment.infer_coordinates(seqs)
    seqs = [seq.replace("-", "") for seq in seqs]
    records = [
        SeqRecord(Seq(seq), id=name, description="")
        for (name, seq) in zip(names, seqs)
    ]
    alignment = Alignment(records, coordinates)
    del self._number_of_seqs
    del self._length_of_seqs
    return alignment