@classmethod
def from_fastx(cls, fastx, name=None):
    """Create a Read from a fasta/q file.

        :param fastx: input file path.
        :param name: name of Read. If not given the filename will be used.

        """
    try:
        read = next(cls.multi_from_fastx(fastx, take_all=True))
    except Exception:
        raise IOError('Could not create Read from file {}.'.format(fastx))
    return read
