def makeSplicedFasta(infile):

    fasta_dict = {}
    with IOTools.openFile(infile, "rb") as fafile:
        for line in fafile.readlines():
            if line[0] == '>':
                header = line.rstrip("\n")
                fasta_dict[header] = ''
            else:
                fasta_dict[header] += line.rstrip("\n")

    for key, value in fasta_dict.items():
        yield "%s\n%s\n" % (key, value)
Merge fasta sequences together into a single
dataset/ETHPy150Open CGATOxford/cgat/scripts/cgat_fasta2cDNA.py/makeSplicedFasta