def parseFasta(file):
    """Returns sequence string from FASTA format."""
    f=open(file)
    ref=''
    for i in f:
        if i[0]!='>':
            ref+=i.rstrip()
    for l in 'RYLMKSWHBVD':
        ref=ref.replace(l,'N')
    return ref