<commit_before>#!/usr/bin/env bash

# ------------------------------------------------------------------------------
# 
# Author: <NAME>
# Email: <EMAIL>
# Version: 1.1.0
# Description: analyze GPSeq sequencing data
# 
# Help page: ./main.sh -h
# 
# ------------------------------------------------------------------------------



# ENV VAR ======================================================================
export LC_ALL=C

# DEPENDENCIES =================================================================

# Code folder
scriptdir="`dirname ${BASH_SOURCE}`/scripts/"
moddir="`dirname ${BASH_SOURCE}`/modules/"

# Load functions
source $moddir/main.functions.sh

# CHECK OPTIONS ================================================================

# Load input options module
source $moddir/main.options.mod.sh

# Ask the user to double-check everything
check_settings

# Save command line
echo "$0 $*" > "$outdir/CMD"
mkdir -p $outdir/log

# GLOBAL VARS ==================================================================

timestamp=`date +"%Y-%m-%e.%H-%M-%S"`
main_logpath=$outdir/log/$timestamp".main.log"

# START LOG ====================================================================
clear
{

# Start
echo -e "$settings
START\n====================="

source $moddir/main.library_run.mod.sh

# RUN BY LIBRARY ---------------------------------------------------------------

for exp in ${expv[@]}; do library_run $exp; done

# Merge library summary
exp0=`echo ${expv[0]} | cut -d ' ' -f 1`
echo -e "expID\t`head -n 1 "$outdir/$exp0/summary"`" > $outdir/summary
for exp in ${expv[@]}; do
	echo -e "$exp\t$(cat $outdir/$exp/summary | sed 1d)" >> $outdir/summary
done

# END --------------------------------------------------------------------------

echo -e "\n\n~~ fin ~~"

# END LOG ======================================================================

} &> >(tee $main_logpath)

################################################################################
<commit_msg>Fixed empty space in single-digit date days for log name.<commit_after>#!/usr/bin/env bash

# ------------------------------------------------------------------------------
# 
# Author: <NAME>
# Email: <EMAIL>
# Version: 1.1.0
# Description: analyze GPSeq sequencing data
# 
# Help page: ./main.sh -h
# 
# ------------------------------------------------------------------------------



# ENV VAR ======================================================================
export LC_ALL=C

# DEPENDENCIES =================================================================

# Code folder
scriptdir="`dirname ${BASH_SOURCE}`/scripts/"
moddir="`dirname ${BASH_SOURCE}`/modules/"

# Load functions
source $moddir/main.functions.sh

# CHECK OPTIONS ================================================================

# Load input options module
source $moddir/main.options.mod.sh

# Ask the user to double-check everything
check_settings

# Save command line
echo "$0 $*" > "$outdir/CMD"
mkdir -p $outdir/log

# GLOBAL VARS ==================================================================

timestamp=`date +"%Y-%m-%e.%H-%M-%S" | tr -d ' '`
main_logpath=$outdir/log/$timestamp".main.log"
echo -e "$main_logpath"

# START LOG ====================================================================
clear
{

# Start
echo -e "$settings
START\n====================="

source $moddir/main.library_run.mod.sh

# RUN BY LIBRARY ---------------------------------------------------------------

for exp in ${expv[@]}; do library_run $exp; done

# Merge library summary
exp0=`echo ${expv[0]} | cut -d ' ' -f 1`
echo -e "expID\t`head -n 1 "$outdir/$exp0/summary"`" > $outdir/summary
for exp in ${expv[@]}; do
	echo -e "$exp\t$(cat $outdir/$exp/summary | sed 1d)" >> $outdir/summary
done

# END --------------------------------------------------------------------------

echo -e "\n\n~~ fin ~~"

# END LOG ======================================================================

} &> >(tee $main_logpath)

################################################################################

{'fraction_non_alphanumeric': 0.4995049504950495, 'fraction_numerical': 0.0049504950495049506, 'mean_word_length': 2.6405405405405404, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '2023478', 'n_tokens_mistral': 1090, 'n_tokens_neox': 1006, 'n_words': 254}