# Given the name of a file in FASTA format, this function reads all of the
# sequence data out of the file and returns a list of all of the sequences.
# The sequences can either be DNA, RNA, or amino acid sequences.

def readSequencesFromFastaFile(filename):
    fastaFile = open(filename)

    sequenceList = []

    readingSequence = False

    for line in fastaFile:
        line = line[0 : len(line) - 1]

        if readingSequence:
            if line[0] == '>':
                readingSequence = False
                sequenceList.append(sequence)
            else:
                sequence = sequence + line

        else:
            if line[0] != ';' and line[0] != '>':
                readingSequence = True
                sequence = line

    sequenceList.append(sequence)

    fastaFile.close()

    return sequenceList
