<commit_before>=pod

=head1 NAME

  Bio::EnsEMBL::Compara::PipeConfig::Example::EGProteinTrees_conf

=head1 SYNOPSIS

    #1. update ensembl-hive, ensembl and ensembl-compara CVS repositories before each new release

    #2. you may need to update 'schema_version' in meta table to the current release number in ensembl-hive/sql/tables.sql

    #3. make sure that all default_options are set correctly

    #4. Run init_pipeline.pl script:
        init_pipeline.pl Bio::EnsEMBL::Compara::PipeConfig::Example::EGProteinTrees_conf \
        -password <<PASSWORD>> -mlss_id <your_current_PT_mlss_id> \
        -division <eg_division> -eg_release <egrelease> -release <release>

    #5. Sync and loop the beekeeper.pl as shown in init_pipeline.pl's output


=head1 DESCRIPTION

    The PipeConfig example file for Ensembl Genomes group's version of
    ProteinTrees pipeline. This file is inherited from & customised further
    within the Ensembl Genomes infrastructure but this file serves as
    an example of the type of configuration we perform.

=head1 CONTACT

  Please contact Compara or Ensembl Genomes with questions/suggestions

=cut


package Bio::EnsEMBL::Compara::PipeConfig::Example::EGProteinTrees_conf;

use strict;
use warnings;
use Bio::EnsEMBL::Utils::Exception qw(throw);

use base qw(Bio::EnsEMBL::Compara::PipeConfig::ProteinTrees_conf);

sub _pipeline_db_options {
  my ($self) = @_;
  return {
    #eg_release=9
    #release=61

    prefix => 'ensembl_compara',
    suffix => 'hom_'.$self->o('eg_release').'_'.$self->o('release'), #output hom_9_61
    rel_suffix => '', #done to override the idea of suffix which we do not have
    db_name => $self->o('prefix').q{_}.$self->o('division_name').q{_}.$self->o('suffix'),
  };
}

sub default_options {
  my ($self) = @_;

  #Parent defaults
  my $parent = $self->SUPER::default_options();

  #Local defaults
  my %options = (

    #Globals
#    mlss_id => 40043,
#    division_name => 'pyrococcus_collection',
    %{$self->_pipeline_db_options()},

    pipeline_name => 'PT_'.$self->o('mlss_id'),

    #Dirs
#    ensembl_cvs_root_dir  =>  '',
    exe_dir               =>  '/nfs/panda/ensemblgenomes/production/compara/binaries',
    base_dir              =>  '/nfs/panda/ensemblgenomes/production/compara/'.$ENV{USER}.'/hive',
    work_dir              =>  $self->o('base_dir').'/'.$self->o('mlss_id').'/PT',
    blast_tmp_dir         =>  $self->o('work_dir').'/blastTmp',

    #Executables
    wublastp_exe    =>  'wublastp',
    hcluster_exe    =>  $self->o('exe_dir').'/hcluster_sg',
    mcoffee_exe     =>  $self->o('exe_dir').'/t_coffee',
    mafft_exe       =>  $self->o('exe_dir').'/mafft-distro/bin/mafft',
    mafft_binaries  =>  $self->o('exe_dir').'/mafft-distro/lib/mafft',
    sreformat_exe   =>  $self->o('exe_dir').'/sreformat',
    treebest_exe    =>  $self->o('exe_dir').'/treebest',
    quicktree_exe   =>  $self->o('exe_dir').'/quicktree',
    buildhmm_exe    =>  $self->o('exe_dir').'/hmmbuild',
    codeml_exe      =>  $self->o('exe_dir').'/codeml',

    #Clustering
    outgroups => [],

    #Trees
    use_exon_boundaries     =>  0,
    use_genomedb_id         =>  1,
    tree_dir                =>  $self->o('ensembl_cvs_root_dir').'/EGCompara/config/prod/trees/Version'.$self->o('eg_release').'Trees',
#    species_tree_input_file =>  $self->o('tree_dir').'/'.$self->o('division_name').'.peptide.nh',

    #DNDS
    codeml_parameters_file  => $self->o('ensembl_cvs_root_dir').'/EGCompara/config/prod/configs/Release'.$self->o('eg_release').'/codeml.ctl.hash',
    taxlevels               => ['cellular organisms'],
    filter_high_coverage    => 0,

    ###### DB WORK
    pipeline_db => {
      -host   => $self->o('host'),
      -port   => $self->o('port'),
      -user   => $self->o('username'),
      -pass   => $self->o('password'),
      -dbname => $self->o('db_name'),
    },

#    master_db => {
#      -host   => '',
#      -port   => 1,
#      -user   => '',
#      -pass   => '',
#      -dbname => 'ensembl_compara_master',
#    },

    ######## THESE ARE PASSED INTO LOAD_REGISTRY_FROM_DB SO PASS IN DB_VERSION
    ######## ALSO RAISE THE POINT ABOUT LOAD_FROM_MULTIPLE_DBs

#    clusterprod_1 => {
#      -host   => '',
#      -port   => 1,
#      -user   => '',
#      -db_version => $self->o('release')
#    },
#
#    staging_1 => {
#      -host   => '',
#      -port   => 1,
#      -user   => '',
#      -db_version => $self->o('release')
#    },
#
#    staging_2 => {
#      -host   => '',
#      -port   => ,
#      -user   => 'ensro',
#      -db_version => $self->o('release')
#    },

    prev_release              => 0,   # 0 is the default and it means "take current release number and subtract 1"

    reuse_core_sources_locs   => [],
    reuse_db                  => q{}, #Set to this to ignore reuse otherwise ....

    ignore_reuse => [], # set this to empty or to the genome db names we should ignore

#    reuse_core_sources_locs   => [ $self->o('staging_2') ],
#    curr_core_sources_locs    => [ $self->o('clusterprod_1') ],
#    reuse_db                  => {
#       -host   => '',
#       -port   => 1,
#       -user   => 'ensro',
#       -pass   => '',
#       -dbname => '',
#    },

    #Set these up to perform stable ID mapping

#    stable_id_prev_rel_db => {
#      #HOST PARAMS
#    },

    #To skip set prev_rel_db to empty; other params do need to be set though
    stable_id_prev_release_db => q{},
    stable_id_release => $self->o('eg_release'),
    stable_id_prev_release => q{}, #means default to last -1

  );

  #Combine & return
  return {%{$parent}, %options};
}

sub pipeline_wide_parameters {
  my ($self) = @_;<commit_msg>Changes re: Leo's comments about use of ENV & do_not_reuse_list<commit_after>=pod

=head1 NAME

  Bio::EnsEMBL::Compara::PipeConfig::Example::EGProteinTrees_conf

=head1 SYNOPSIS

    #1. update ensembl-hive, ensembl and ensembl-compara CVS repositories before each new release

    #2. you may need to update 'schema_version' in meta table to the current release number in ensembl-hive/sql/tables.sql

    #3. make sure that all default_options are set correctly

    #4. Run init_pipeline.pl script:
        init_pipeline.pl Bio::EnsEMBL::Compara::PipeConfig::Example::EGProteinTrees_conf \
        -password <<PASSWORD>> -mlss_id <your_current_PT_mlss_id> \
        -division <eg_division> -eg_release <egrelease> -release <release>

    #5. Sync and loop the beekeeper.pl as shown in init_pipeline.pl's output


=head1 DESCRIPTION

    The PipeConfig example file for Ensembl Genomes group's version of
    ProteinTrees pipeline. This file is inherited from & customised further
    within the Ensembl Genomes infrastructure but this file serves as
    an example of the type of configuration we perform.

=head1 CONTACT

  Please contact Compara or Ensembl Genomes with questions/suggestions

=cut


package Bio::EnsEMBL::Compara::PipeConfig::Example::EGProteinTrees_conf;

use strict;
use warnings;
use Bio::EnsEMBL::Utils::Exception qw(throw);

use base qw(Bio::EnsEMBL::Compara::PipeConfig::ProteinTrees_conf);

sub _pipeline_db_options {
  my ($self) = @_;
  return {
    #eg_release=9
    #release=61

    prefix => 'ensembl_compara',
    suffix => 'hom_'.$self->o('eg_release').'_'.$self->o('release'), #output hom_9_61
    rel_suffix => '', #done to override the idea of suffix which we do not have
    db_name => $self->o('prefix').q{_}.$self->o('division_name').q{_}.$self->o('suffix'),
  };
}

sub default_options {
  my ($self) = @_;

  #Parent defaults
  my $parent = $self->SUPER::default_options();

  #Local defaults
  my %options = (

    #Globals
#    mlss_id => 40043,
#    division_name => 'pyrococcus_collection',
    %{$self->_pipeline_db_options()},

    pipeline_name => 'PT_'.$self->o('mlss_id'),

    #Dirs
#    ensembl_cvs_root_dir  =>  '',
    exe_dir               =>  '/nfs/panda/ensemblgenomes/production/compara/binaries',
    base_dir              =>  '/nfs/panda/ensemblgenomes/production/compara/'.$self->o('ENV', 'USER').'/hive',
    work_dir              =>  $self->o('base_dir').'/'.$self->o('mlss_id').'/PT',
    blast_tmp_dir         =>  $self->o('work_dir').'/blastTmp',

    #Executables
    wublastp_exe    =>  'wublastp',
    hcluster_exe    =>  $self->o('exe_dir').'/hcluster_sg',
    mcoffee_exe     =>  $self->o('exe_dir').'/t_coffee',
    mafft_exe       =>  $self->o('exe_dir').'/mafft-distro/bin/mafft',
    mafft_binaries  =>  $self->o('exe_dir').'/mafft-distro/lib/mafft',
    sreformat_exe   =>  $self->o('exe_dir').'/sreformat',
    treebest_exe    =>  $self->o('exe_dir').'/treebest',
    quicktree_exe   =>  $self->o('exe_dir').'/quicktree',
    buildhmm_exe    =>  $self->o('exe_dir').'/hmmbuild',
    codeml_exe      =>  $self->o('exe_dir').'/codeml',

    #Clustering
    outgroups => [],

    #Trees
    use_exon_boundaries     =>  0,
    use_genomedb_id         =>  1,
    tree_dir                =>  $self->o('ensembl_cvs_root_dir').'/EGCompara/config/prod/trees/Version'.$self->o('eg_release').'Trees',
#    species_tree_input_file =>  $self->o('tree_dir').'/'.$self->o('division_name').'.peptide.nh',

    #DNDS
    codeml_parameters_file  => $self->o('ensembl_cvs_root_dir').'/EGCompara/config/prod/configs/Release'.$self->o('eg_release').'/codeml.ctl.hash',
    taxlevels               => ['cellular organisms'],
    filter_high_coverage    => 0,

    ###### DB WORK
    pipeline_db => {
      -host   => $self->o('host'),
      -port   => $self->o('port'),
      -user   => $self->o('username'),
      -pass   => $self->o('password'),
      -dbname => $self->o('db_name'),
    },

#    master_db => {
#      -host   => '',
#      -port   => 1,
#      -user   => '',
#      -pass   => '',
#      -dbname => 'ensembl_compara_master',
#    },

    ######## THESE ARE PASSED INTO LOAD_REGISTRY_FROM_DB SO PASS IN DB_VERSION
    ######## ALSO RAISE THE POINT ABOUT LOAD_FROM_MULTIPLE_DBs

#    clusterprod_1 => {
#      -host   => '',
#      -port   => 1,
#      -user   => '',
#      -db_version => $self->o('release')
#    },
#
#    staging_1 => {
#      -host   => '',
#      -port   => 1,
#      -user   => '',
#      -db_version => $self->o('release')
#    },
#
#    staging_2 => {
#      -host   => '',
#      -port   => ,
#      -user   => 'ensro',
#      -db_version => $self->o('release')
#    },

    prev_release              => 0,   # 0 is the default and it means "take current release number and subtract 1"

    reuse_core_sources_locs   => [],
    reuse_db                  => q{}, #Set to this to ignore reuse otherwise ....

    do_not_reuse_list => [], # set this to empty or to the genome db names we should ignore

#    reuse_core_sources_locs   => [ $self->o('staging_2') ],
#    curr_core_sources_locs    => [ $self->o('clusterprod_1') ],
#    reuse_db                  => {
#       -host   => '',
#       -port   => 1,
#       -user   => 'ensro',
#       -pass   => '',
#       -dbname => '',
#    },

    #Set these up to perform stable ID mapping

#    stable_id_prev_rel_db => {
#      #HOST PARAMS
#    },

    #To skip set prev_rel_db to empty; other params do need to be set though
    stable_id_prev_release_db => q{},
    stable_id_release => $self->o('eg_release'),
    stable_id_prev_release => q{}, #means default to last -1

  );

  #Combine & return
  return {%{$parent}, %options};
}

sub pipeline_wide_parameters {
  my ($self) = @_;
{'fraction_non_alphanumeric': 0.169179523141655, 'fraction_numerical': 0.006311360448807854, 'mean_word_length': 2.757905138339921, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 236, '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': '5045040', 'n_tokens_mistral': 4268, 'n_tokens_neox': 4011, 'n_words': 783}