<commit_before>package CoGe::Factory::RequestFactory;

use Moose;
use CoGe::Request::Experiment;
use CoGe::Request::ExperimentAnalysis;
use CoGe::Request::Genome;
use CoGe::Request::Empty;
use CoGe::Request::TwoGenomes;

has 'user'    => (
    is        => 'ro',
    required  => 1
);

has 'db'      => (
    is        => 'ro',
    required  => 1
);

has 'jex'     => (
    is        => 'ro',
    required  => 1
);

sub get {
    my ($self, $message) = @_;
    unless (defined $message && defined $message->{type}) {
        print STDERR "RequestFactory: error: invalid message\n";
        return;
    }

    my $options = {
        db         => $self->db,
        jex        => $self->jex,
        user       => $self->user,
        parameters => $message->{parameters}
    };

    my $type = $message->{type};
    if ($type eq "export_gff" ||
        $type eq "export_fasta" ||
        $type eq "export_genome" ||
        $type eq "load_experiment" ||
        $type eq "load_batch" ||
        $type eq "load_annotation")
    {
        return CoGe::Request::Genome->new($options);
    }
    elsif ($type eq "export_experiment") {
        return CoGe::Request::Experiment->new($options);
    }
    elsif ($type eq "analyze_snps" ||
           $type eq "analyze_expression" ||
           $type eq "analyze_methylation") <commit_msg>Fix merge error<commit_after>package CoGe::Factory::RequestFactory;

use Moose;
use CoGe::Request::Experiment;
use CoGe::Request::ExperimentAnalysis;
use CoGe::Request::Genome;
use CoGe::Request::Empty;
use CoGe::Request::TwoGenomes;

has 'user'    => (
    is        => 'ro',
    required  => 1
);

has 'db'      => (
    is        => 'ro',
    required  => 1
);

has 'jex'     => (
    is        => 'ro',
    required  => 1
);

sub get {
    my ($self, $message) = @_;
    unless (defined $message && defined $message->{type}) {
        print STDERR "RequestFactory: error: invalid message\n";
        return;
    }

    my $options = {
        db         => $self->db,
        jex        => $self->jex,
        user       => $self->user,
        parameters => $message->{parameters}
    };

    my $type = $message->{type};
    if ($type eq "export_gff" ||
        $type eq "export_fasta" ||
        $type eq "export_genome" ||
        $type eq "load_experiment" ||
        $type eq "load_batch" ||
        $type eq "load_annotation")
    {
        return CoGe::Request::Genome->new($options);
    }
    elsif ($type eq "export_experiment") {
        return CoGe::Request::Experiment->new($options);
    }
    elsif ($type eq "analyze_snps" ||
           $type eq "analyze_expression" ||
           $type eq "analyze_methylation" || 
{'fraction_non_alphanumeric': 0.16229385307346328, 'fraction_numerical': 0.0022488755622188904, 'mean_word_length': 2.2390776699029127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4038328', 'n_tokens_mistral': 885, 'n_tokens_neox': 868, 'n_words': 200}