def read_fasta_one_line(ifile): # @CTB deprecated; remove
    "read a single sequence line, return id,title,seq"
    id = None
    seq = ''
    while True:
        line = ifile.readline(1024) # READ AT MOST 1KB
        if line == '': # EOF
            break
        elif '>' == line[0]:
            id = line[1:].split()[0]
            title = line[len(id)+2:]
        elif id is not None: # READ SEQUENCE
            for word in line.split(): # GET RID OF WHITESPACE
                seq += word
            if len(seq) > 0:
                return id, title, seq
    raise IOError('no readable sequence in FASTA file!')
dataset/ETHPy150Open cjlee112/pygr/pygr/sequtil.py/read_fasta_one_line/original