def read_fasta(file_name, join=False):
    """
    Reads a fasta file and returns a single DNA sequence.

    :param file_name: the name of the fasta file
    :param join: whether to join the lines of DNA

    :return: a single string containing all DNA in the file
    """
    dna = list()
    with open(file_name) as f:
        for line in f:
            if not line.startswith('>'):
                dna.append(line.strip())
    if join:
        return ''.join(dna)
    else:
        return dna