<commit_before>#!/bin/bash

source definitions.sh

for method in $METHODS;
do
    for depth in $DEPTHS; 
    do
        for length in $LENGTHS;
        do
            for ends in $ENDS;
            do
                for errors in $ERRORS;
                do
                    for bias in $BIAS;
                    do
                        RUN_NAME="${method}_${depth}x_${length}b_${ends}_${errors}_${bias}"
                        RUN_DIR="output/$RUN_NAME"
                        COMMAND="prepare_quantification_run.py"
                        COMMAND="$COMMAND -d $RUN_DIR"
                        COMMAND="$COMMAND -m $method"
                        COMMAND="$COMMAND --read-depth=$depth"
                        COMMAND="$COMMAND --read-length=$length"

                        if [ "$ends" == "$PAIRED_END" ]; then
                            COMMAND="$COMMAND --paired-end"
                        fi

                        if [ "$errors" == "$WITH_ERRORS" ]; then
                            COMMAND="$COMMAND --errors"
                        fi

                        if ["$bias" == "$WITH_BIAS" ]; then
                            COMMAND="$COMMAND --bias"
                        fi

                        PARAMS_VAR=${method^^}_PARAMS
                        COMMAND="$COMMAND -p ${!PARAMS_VAR}"

                        if [ "$method" == "$CUFFLINKS_METHOD" ]; then
                            RUN_PARAMS="-rqa"
                        else
                            RUN_PARAMS="-qa"
                            READS_RUN_NAME="${CUFFLINKS_METHOD}_${depth}x_${length}b_${ends}_${errors}_${bias}"
                            READS_RUN_DIR="output/$READS_RUN_NAME"
                            COMMAND="$COMMAND --input-dir=$READS_RUN_DIR"
                        fi

                        COMMAND="$COMMAND $TRANSCRIPTS_GTF $GENOME_FASTA_DIR"

                        python $COMMAND

                        pushd $RUN_DIR
                        nohup ./run_quantification.sh ${RUN_PARAMS} &> ${RUN_NAME}.out &
                        popd
                    done
                done
            done
        done
    done
done<commit_msg>Only perform quantification runs if '-r' option is specified (otherwise the run directories and scripts are created, but then have to be executed manually).<commit_after>#!/bin/bash

source definitions.sh

# Process command line options
while getopts ":r" opt; do
    case $opt in
        r)
            RUN_QUANTIFICATION=1
            ;;
        \?)
            echo "Invalid option: -$OPTARG" >& 2
            exit 1
            ;;
    esac
done

for method in $METHODS;
do
    for depth in $DEPTHS; 
    do
        for length in $LENGTHS;
        do
            for ends in $ENDS;
            do
                for errors in $ERRORS;
                do
                    for bias in $BIAS;
                    do
                        RUN_NAME="${method}_${depth}x_${length}b_${ends}_${errors}_${bias}"
                        RUN_DIR="output/$RUN_NAME"
                        COMMAND="prepare_quantification_run.py"
                        COMMAND="$COMMAND -d $RUN_DIR"
                        COMMAND="$COMMAND -m $method"
                        COMMAND="$COMMAND --read-depth=$depth"
                        COMMAND="$COMMAND --read-length=$length"

                        if [ "$ends" == "$PAIRED_END" ]; then
                            COMMAND="$COMMAND --paired-end"
                        fi

                        if [ "$errors" == "$WITH_ERRORS" ]; then
                            COMMAND="$COMMAND --errors"
                        fi

                        if [ "$bias" == "$WITH_BIAS" ]; then
                            COMMAND="$COMMAND --bias"
                        fi

                        PARAMS_VAR=${method^^}_PARAMS
                        COMMAND="$COMMAND -p ${!PARAMS_VAR}"

                        if [ "$method" == "$CUFFLINKS_METHOD" ]; then
                            RUN_PARAMS="-rqa"
                        else
                            RUN_PARAMS="-qa"
                            READS_RUN_NAME="${CUFFLINKS_METHOD}_${depth}x_${length}b_${ends}_${errors}_${bias}"
                            READS_RUN_DIR="output/$READS_RUN_NAME"
                            COMMAND="$COMMAND --input-dir=$READS_RUN_DIR"
                        fi

                        COMMAND="$COMMAND $TRANSCRIPTS_GTF $GENOME_FASTA_DIR"

                        python $COMMAND

                        if [ -n "$RUN_QUANTIFICATION" ]; then
                            pushd $RUN_DIR
                            nohup ./run_quantification.sh ${RUN_PARAMS} &> ${RUN_NAME}.out &
                            popd
                        fi
                    done
                done
            done
        done
    done
done
{'fraction_non_alphanumeric': 0.09931719428926133, 'fraction_numerical': 0.0006207324643078833, 'mean_word_length': 0.9876644736842105, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 6, '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': '406638', 'n_tokens_mistral': 1280, 'n_tokens_neox': 1172, 'n_words': 252}