<commit_before>import random
import re
from eden import util


def null_modifier(header=None, seq=None, **options):
    yield header
    yield seq


def fasta_to_fasta(input, modifier=null_modifier, **options):
    """
    Takes a FASTA file yields a normalised FASTA file.

    Parameters
    ----------
    input : string
        A pointer to the data source.
    """
    normalize = options.get('normalize', True)
    iterable = _fasta_to_fasta(input)
    for line in iterable:
        header = line
        seq = iterable.next()
        if normalize:
            seq.upper()
            seq = seq.replace('T', 'U')
        seqs = modifier(header=header, seq=seq, **options)
        for seq in seqs:<commit_msg>BUGFIX: fasta_to_fasta was not normalizing to uppercase<commit_after>import random
import re
from eden import util


def null_modifier(header=None, seq=None, **options):
    yield header
    yield seq


def fasta_to_fasta(input, modifier=null_modifier, **options):
    """
    Takes a FASTA file yields a normalised FASTA file.

    Parameters
    ----------
    input : string
        A pointer to the data source.
    """
    normalize = options.get('normalize', True)
    iterable = _fasta_to_fasta(input)
    for line in iterable:
        header = line
        seq = iterable.next()
        if normalize:
            seq = seq.upper()
            seq = seq.replace('T', 'U')
        seqs = modifier(header=header, seq=seq, **options)
        for seq in seqs:
{'fraction_non_alphanumeric': 0.1070460704607046, 'fraction_numerical': 0.0, 'mean_word_length': 2.4269141531322505, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7112276', 'n_tokens_mistral': 461, 'n_tokens_neox': 445, 'n_words': 136}