<commit_before>#!/bin/sh

# Wrapper script to create a otherfeatures database , replica of the core database, with fully populated seq_regions and assembly table

# Default coord_system is toplevel

# Todo: Move /nfs/panda/ensemblgenomes/production/final_steps/sql/EST_exonerate.sql to a generic place in cvs

if [ $# != 1 ]
then
    echo "Wrong number of command line arguments"
    echo "sh init_ensembl_pipeline.sh saccharomyces_cerevisiae_core_9_62_3"
    exit 1
fi

DB_NAME=$1

echo "DB_NAME: $DB_NAME"

# One file specific for each user, based on ${USER}

ENV_FILE="${HOME}/${USER}.env.sh"

echo "Using env file: $ENV_FILE"

if [ ! -f ${ENV_FILE} ] 
then
    echo "can't find an environment file, ${ENV_FILE}, that defines the MySQL server parameters"
    echo "create one first"
    exit 1
fi

source $ENV_FILE

echo "database server host, $DB_HOST"

# Overwrite CONFIG_DIR to the generic location

CONFIG_DIR="/nfs/panda/ensemblgenomes/apis/proteomes/ensembl_genomes/EG-pipelines/config/generic"

echo "CONFIG_DIR: $CONFIG_DIR"


OTHERFEATURES_DB_NAME=`echo $DB_NAME | perl -ne '$a = $_; $a =~ s/core/otherfeatures/; print $a'`

echo "OTHERFEATURES_DB_NAME: $OTHERFEATURES_DB_NAME"

SPECIES=`echo $DB_NAME | perl -ne '$_ =~ /^([^_]+)_([^_]+)_core.+/; $a = $1; $b = $2; print $a . "_" . $b;'`

echo "SPECIES: $SPECIES"

if [ "$SPECIES" == "" ] 
then
	echo "SPECIES not defined, make sure you pass a core database name in argument"
	echo "e.g. sh init_est_ensembl_pipeline.sh saccharomyces_cerevisiae_core_9_62_3"
	exit 1
fi

# e.g. anidulans
SPECIES_SHORT_NAME=`echo $SPECIES | perl -ne '$_ =~ /^(\w)[^_]+_(\w+)/; $a = $1; $b = $2; print "$a$b";'`

echo "SPECIES_SHORT_NAME: $SPECIES_SHORT_NAME"

echo ""

ESTs_OUTPUT_DIR=/nfs/panda/ensemblgenomes/production/est_pipeline/data/${SPECIES_SHORT_NAME}
ESTs_FILE_PATH=${ESTs_OUTPUT_DIR}/cDNAs.fa

if [ ! -f "$ESTs_FILE_PATH" ]
then
    echo "cDNAs.fa, $ESTs_FILE_PATH, file not found"
    exit 1
fi

PERL_PATH=/nfs/panda/ensemblgenomes/perl/
#ENS_PATH=/nfs/panda/ensemblgenomes/apis/ensembl/64/ensembl
ENS_PATH=/nfs/panda/ensemblgenomes/production/ensembl_pipelines_init/ensembl-head
#ENS_ANALYSIS_PATH=/nfs/panda/ensemblgenomes/apis/ensembl/analysis/head
ENS_ANALYSIS_PATH=/nfs/panda/ensemblgenomes/production/ensembl_pipelines_init/ensembl-analysis-head
ENS_PIPELINE_PATH=/nfs/panda/ensemblgenomes/apis/ensembl/pipeline/head<commit_msg>use specific ensembl-analysis and ensembl-pipeline, to better control updates without affecting other pipelines<commit_after>#!/bin/sh

# Wrapper script to create a otherfeatures database , replica of the core database, with fully populated seq_regions and assembly table

# Default coord_system is toplevel

# Todo: Move /nfs/panda/ensemblgenomes/production/final_steps/sql/EST_exonerate.sql to a generic place in cvs

if [ $# != 1 ]
then
    echo "Wrong number of command line arguments"
    echo "sh init_ensembl_pipeline.sh saccharomyces_cerevisiae_core_9_62_3"
    exit 1
fi

DB_NAME=$1

echo "DB_NAME: $DB_NAME"

# One file specific for each user, based on ${USER}

ENV_FILE="${HOME}/${USER}.env.sh"

echo "Using env file: $ENV_FILE"

if [ ! -f ${ENV_FILE} ] 
then
    echo "can't find an environment file, ${ENV_FILE}, that defines the MySQL server parameters"
    echo "create one first"
    exit 1
fi

source $ENV_FILE

echo "database server host, $DB_HOST"

# Overwrite CONFIG_DIR to the generic location

CONFIG_DIR="/nfs/panda/ensemblgenomes/apis/proteomes/ensembl_genomes/EG-pipelines/config/generic"

echo "CONFIG_DIR: $CONFIG_DIR"


OTHERFEATURES_DB_NAME=`echo $DB_NAME | perl -ne '$a = $_; $a =~ s/core/otherfeatures/; print $a'`

echo "OTHERFEATURES_DB_NAME: $OTHERFEATURES_DB_NAME"

SPECIES=`echo $DB_NAME | perl -ne '$_ =~ /^([^_]+)_([^_]+)_core.+/; $a = $1; $b = $2; print $a . "_" . $b;'`

echo "SPECIES: $SPECIES"

if [ "$SPECIES" == "" ] 
then
	echo "SPECIES not defined, make sure you pass a core database name in argument"
	echo "e.g. sh init_est_ensembl_pipeline.sh saccharomyces_cerevisiae_core_9_62_3"
	exit 1
fi

# e.g. anidulans
SPECIES_SHORT_NAME=`echo $SPECIES | perl -ne '$_ =~ /^(\w)[^_]+_(\w+)/; $a = $1; $b = $2; print "$a$b";'`

echo "SPECIES_SHORT_NAME: $SPECIES_SHORT_NAME"

echo ""

ESTs_OUTPUT_DIR=/nfs/panda/ensemblgenomes/production/est_pipeline/data/${SPECIES_SHORT_NAME}
ESTs_FILE_PATH=${ESTs_OUTPUT_DIR}/cDNAs.fa

if [ ! -f "$ESTs_FILE_PATH" ]
then
    echo "cDNAs.fa, $ESTs_FILE_PATH, file not found"
    exit 1
fi

PERL_PATH=/nfs/panda/ensemblgenomes/perl/
#ENS_PATH=/nfs/panda/ensemblgenomes/apis/ensembl/64/ensembl
ENS_PATH=/nfs/panda/ensemblgenomes/production/ensembl_pipelines_init/ensembl-head
#ENS_ANALYSIS_PATH=/nfs/panda/ensemblgenomes/apis/ensembl/analysis/head
ENS_ANALYSIS_PATH=/nfs/panda/ensemblgenomes/production/ensembl_pipelines_init/ensembl-analysis-head
#ENS_PIPELINE_PATH=/nfs/panda/ensemblgenomes/apis/ensembl/pipeline/head
ENS_ANALYSIS_PATH=/nfs/panda/ensemblgenomes/production/ensembl_pipelines_init/ensembl-pipeline-head
{'fraction_non_alphanumeric': 0.12909054406745635, 'fraction_numerical': 0.008030515960650473, 'mean_word_length': 5.0608272506082725, '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': '4507225', 'n_tokens_mistral': 2055, 'n_tokens_neox': 1974, 'n_words': 412}