<commit_before>package Bio::EnsEMBL::Pipeline::PipeConfig::FASTA_conf;

use strict;
use warnings;

use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf');

use Bio::EnsEMBL::ApiVersion qw/software_version/;

sub default_options {
    my ($self) = @_;
    
    return {
        # inherit other stuff from the base class
        %{ $self->SUPER::default_options() }, 
        
        ### OVERRIDE
        
        #'registry' => 'Reg.pm', # default option to refer to Reg.pm, should be full path
        #'base_path' => '', #where do you want your files
        
        ### Optional overrides        
        ftp_dir => '',

        species => [],
        
        dump_types => [],
        
        db_types => [],
        
        force_species => [],
        
        version => software_version(),
        
        previous_version => (software_version() - 1),
        
        ### SCP code
        
        blast_servers => [],
        blast_genomic_dir => '',
        blast_genes_dir => '',
        
        scp_user => $self->o('ENV', 'USER'),
        scp_identity => '',
        
        ### Defaults 
        
        pipeline_name => 'fasta_dump_'.$self->o('version'),
        
        wublast_exe => 'xdformat',
        blat_exe => 'faToTwoBit',
        port_offset => 30000,
        
        email => $self->o('ENV', 'USER').'<EMAIL>',
    };
}

sub pipeline_create_commands {
    my ($self) = @_;
    return [
      # inheriting database and hive tables' creation
      @{$self->SUPER::pipeline_create_commands}, 
    ];
}

## See diagram for pipeline structure 
sub pipeline_analyses {
    my ($self) = @_;
    
    return [
    
      {
        -logic_name => 'ScheduleSpecies',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::ReuseSpeciesFactory',
        -parameters => {
          species => $self->o('species'),
          sequence_type_list => $self->o('dump_types'),
          ftp_dir => $self->o('ftp_dir'),
          force_species => $self->o('force_species'),
        },
        -input_ids  => [ {} ],
        -flow_into  => {
          1 => 'Notify',
          2 => 'DumpDNA',
          3 => 'DumpGenes',
          4 => 'CopyDNA',
          5 => 'ChecksumGeneratorFactory'
        },
        -rc_id => 1,
      },
      
      ######### DUMPING DATA
      
      {
        -logic_name => 'DumpDNA',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::DumpFile',
        -can_be_empty => 1,
        -flow_into  => {
          1 => 'ConcatFiles'
        },
        -can_be_empty     => 1,
        -max_retry_count  => 1,
        -hive_capacity    => 10,
        -rc_id => 3,
      },
      
      {
        -logic_name => 'DumpGenes',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::DumpFile',
        -flow_into  => {
          2 => ['BlastPepIndex'],
          3 => ['BlastGeneIndex']
        },
        -max_retry_count  => 1,
        -hive_capacity    => 10,
        -can_be_empty     => 1,
        -rc_id => 4,
        -wait_for         => 'DumpDNA' #block until DNA is done
      },
      
      {
        -logic_name => 'ConcatFiles',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::ConcatFiles',
        -rc_id      => 1,
        -can_be_empty => 1,
        -flow_into  => {
          1 => [qw/BlastDNAIndex BlatDNAIndex/]
        },
      },
      
      ######## COPY DATA
      
      {
        -logic_name => 'CopyDNA',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::CopyDNA',
        -rc_id      => 1,
        -can_be_empty => 1,
        -hive_capacity => 5,
        -parameters => {
          ftp_dir => $self->o('ftp_dir')
        },
        -rc_id => 1,
      },
      
      ######## INDEXING
      
      {
        -logic_name => 'BlastDNAIndex',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::WuBlastIndexer',
        -parameters => {
          molecule => 'dna', type => 'genomic', program => $self->o('wublast_exe')
        },
        -hive_capacity => 10,
        -can_be_empty => 1,
        -rc_id => 5,
      },
      
      {
        -logic_name => 'BlastPepIndex',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::WuBlastIndexer',
        -parameters => {
          molecule => 'pep', type => 'genes', program => $self->o('wublast_exe')
        },
        -hive_capacity => 5,
        -can_be_empty => 1,
        -flow_into => {
          1 => [qw/SCPBlast/],
        },
        -rc_id => 1,
      },
      
      {
        -logic_name => 'BlastGeneIndex',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::BlastIndexer',
        -parameters => {
          molecule => 'dna', type => 'genes', program => $self->o('wublast_exe')
        },
        -hive_capacity => 5,
        -can_be_empty => 1,
        -flow_into => {
          1 => [qw/SCPBlast/],
        },
        -rc_id => 1,
      },
      
      {
        -logic_name => 'BlatDNAIndex',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::BlatIndexer',
        -parameters => {<commit_msg>Missed a WU<commit_after>package Bio::EnsEMBL::Pipeline::PipeConfig::FASTA_conf;

use strict;
use warnings;

use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf');

use Bio::EnsEMBL::ApiVersion qw/software_version/;

sub default_options {
    my ($self) = @_;
    
    return {
        # inherit other stuff from the base class
        %{ $self->SUPER::default_options() }, 
        
        ### OVERRIDE
        
        #'registry' => 'Reg.pm', # default option to refer to Reg.pm, should be full path
        #'base_path' => '', #where do you want your files
        
        ### Optional overrides        
        ftp_dir => '',

        species => [],
        
        dump_types => [],
        
        db_types => [],
        
        force_species => [],
        
        version => software_version(),
        
        previous_version => (software_version() - 1),
        
        ### SCP code
        
        blast_servers => [],
        blast_genomic_dir => '',
        blast_genes_dir => '',
        
        scp_user => $self->o('ENV', 'USER'),
        scp_identity => '',
        
        ### Defaults 
        
        pipeline_name => 'fasta_dump_'.$self->o('version'),
        
        wublast_exe => 'xdformat',
        blat_exe => 'faToTwoBit',
        port_offset => 30000,
        
        email => $self->o('ENV', 'USER').'<EMAIL>',
    };
}

sub pipeline_create_commands {
    my ($self) = @_;
    return [
      # inheriting database and hive tables' creation
      @{$self->SUPER::pipeline_create_commands}, 
    ];
}

## See diagram for pipeline structure 
sub pipeline_analyses {
    my ($self) = @_;
    
    return [
    
      {
        -logic_name => 'ScheduleSpecies',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::ReuseSpeciesFactory',
        -parameters => {
          species => $self->o('species'),
          sequence_type_list => $self->o('dump_types'),
          ftp_dir => $self->o('ftp_dir'),
          force_species => $self->o('force_species'),
        },
        -input_ids  => [ {} ],
        -flow_into  => {
          1 => 'Notify',
          2 => 'DumpDNA',
          3 => 'DumpGenes',
          4 => 'CopyDNA',
          5 => 'ChecksumGeneratorFactory'
        },
        -rc_id => 1,
      },
      
      ######### DUMPING DATA
      
      {
        -logic_name => 'DumpDNA',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::DumpFile',
        -can_be_empty => 1,
        -flow_into  => {
          1 => 'ConcatFiles'
        },
        -can_be_empty     => 1,
        -max_retry_count  => 1,
        -hive_capacity    => 10,
        -rc_id => 3,
      },
      
      {
        -logic_name => 'DumpGenes',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::DumpFile',
        -flow_into  => {
          2 => ['BlastPepIndex'],
          3 => ['BlastGeneIndex']
        },
        -max_retry_count  => 1,
        -hive_capacity    => 10,
        -can_be_empty     => 1,
        -rc_id => 4,
        -wait_for         => 'DumpDNA' #block until DNA is done
      },
      
      {
        -logic_name => 'ConcatFiles',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::ConcatFiles',
        -rc_id      => 1,
        -can_be_empty => 1,
        -flow_into  => {
          1 => [qw/BlastDNAIndex BlatDNAIndex/]
        },
      },
      
      ######## COPY DATA
      
      {
        -logic_name => 'CopyDNA',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::CopyDNA',
        -rc_id      => 1,
        -can_be_empty => 1,
        -hive_capacity => 5,
        -parameters => {
          ftp_dir => $self->o('ftp_dir')
        },
        -rc_id => 1,
      },
      
      ######## INDEXING
      
      {
        -logic_name => 'BlastDNAIndex',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::WuBlastIndexer',
        -parameters => {
          molecule => 'dna', type => 'genomic', program => $self->o('wublast_exe')
        },
        -hive_capacity => 10,
        -can_be_empty => 1,
        -rc_id => 5,
      },
      
      {
        -logic_name => 'BlastPepIndex',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::WuBlastIndexer',
        -parameters => {
          molecule => 'pep', type => 'genes', program => $self->o('wublast_exe')
        },
        -hive_capacity => 5,
        -can_be_empty => 1,
        -flow_into => {
          1 => [qw/SCPBlast/],
        },
        -rc_id => 1,
      },
      
      {
        -logic_name => 'BlastGeneIndex',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::WuBlastIndexer',
        -parameters => {
          molecule => 'dna', type => 'genes', program => $self->o('wublast_exe')
        },
        -hive_capacity => 5,
        -can_be_empty => 1,
        -flow_into => {
          1 => [qw/SCPBlast/],
        },
        -rc_id => 1,
      },
      
      {
        -logic_name => 'BlatDNAIndex',
        -module     => 'Bio::EnsEMBL::Pipeline::FASTA::BlatIndexer',
        -parameters => {
{'fraction_non_alphanumeric': 0.1650191648174299, 'fraction_numerical': 0.009078071414161792, 'mean_word_length': 1.5442648190916088, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 233, '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': '4259641', 'n_tokens_mistral': 3439, 'n_tokens_neox': 3215, 'n_words': 526}