<commit_before>#!/usr/bin/env/bash
set -e

usage="$(basename "$0") [-e <environment_name> -p <conda_path> -x <existing_conda_env>]

where:
    -h  Show this help text
    -e  Conda environment name [string]
    -p  Conda path [string]
    -x  Install in already existing conda environment [flag]"

unset OPTARG
unset OPTIND

CONDA_PATH="$HOME/miniconda3"
ENV_NAME='mip7_rd-dna'
EXISTING_ENV='false'

while getopts ':he:p:x' option; do
  case "$option" in
    h) echo "$usage"
       exit
       ;;
    e) ENV_NAME=$OPTARG
       ;;
    p) CONDA_PATH=$OPTARG
       ;;
    x) EXISTING_ENV='true'
       ;;
   \?) printf "illegal option: -%s\n" "$OPTARG" >&2
       echo "$usage" >&2
       exit 1
       ;;
  esac
done
shift $((OPTIND-1))

## Enable trap for signal(s) DEBUG
trap 'previous_command="$BASH_COMMAND"' DEBUG

error() {

        local program="$1"

        local return_code="$2"

        ## Display error message and exit
        echo "${program}: ${return_code}: Unknown Error - ExitCode=$return_code" 1>&2
        exit 1
}

## Enable trap for signal(s) ERR
trap '$(error "$previous_command" "$?")' ERR

## Create or install conda env
if [ "$EXISTING_ENV" = true ]
then
  conda install --name "$ENV_NAME" --yes  -c conda-forge libgcc-ng gxx_linux-64
else
  conda create --name "$ENV_NAME" --yes  -c conda-forge libgcc-ng gxx_linux-64
fi

conda install --name "$ENV_NAME" --yes -c conda-forge perl=5.26 perl-app-cpanminus

conda install --name "$ENV_NAME" --yes -c bioconda perl-log-log4perl perl-moosex-app

## Source conda
source "$CONDA_PATH"/etc/profile.d/conda.sh

conda activate "$ENV_NAME"

cpanm --installdeps .

conda deactivate
<commit_msg>feat(mip_perl): Added perl-file-copy-recursive to conda install<commit_after>#!/usr/bin/env/bash
set -e

usage="$(basename "$0") [-e <environment_name> -p <conda_path> -x <existing_conda_env>]

where:
    -h  Show this help text
    -e  Conda environment name [string]
    -p  Conda path [string]
    -x  Install in already existing conda environment [flag]"

unset OPTARG
unset OPTIND

CONDA_PATH="$HOME/miniconda3"
ENV_NAME='mip7_rd-dna'
EXISTING_ENV='false'

while getopts ':he:p:x' option; do
  case "$option" in
    h) echo "$usage"
       exit
       ;;
    e) ENV_NAME=$OPTARG
       ;;
    p) CONDA_PATH=$OPTARG
       ;;
    x) EXISTING_ENV='true'
       ;;
   \?) printf "illegal option: -%s\n" "$OPTARG" >&2
       echo "$usage" >&2
       exit 1
       ;;
  esac
done
shift $((OPTIND-1))

## Enable trap for signal(s) DEBUG
trap 'previous_command="$BASH_COMMAND"' DEBUG

error() {

        local program="$1"

        local return_code="$2"

        ## Display error message and exit
        echo "${program}: ${return_code}: Unknown Error - ExitCode=$return_code" 1>&2
        exit 1
}

## Enable trap for signal(s) ERR
trap '$(error "$previous_command" "$?")' ERR

## Create or install conda env
if [ "$EXISTING_ENV" = true ]
then
  conda install --name "$ENV_NAME" --yes  -c conda-forge libgcc-ng gxx_linux-64
else
  conda create --name "$ENV_NAME" --yes  -c conda-forge libgcc-ng gxx_linux-64
fi

conda install --name "$ENV_NAME" --yes -c conda-forge perl=5.26 perl-app-cpanminus

conda install --name "$ENV_NAME" --yes -c bioconda perl-log-log4perl perl-moosex-app perl-file-copy-recursive

## Source conda
source "$CONDA_PATH"/etc/profile.d/conda.sh

conda activate "$ENV_NAME"

cpanm --installdeps .

conda deactivate

{'fraction_non_alphanumeric': 0.14210061782877317, 'fraction_numerical': 0.011768167107972934, 'mean_word_length': 3.07185628742515, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '2952121', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1245, 'n_words': 342}