<commit_before>#!/bin/bash
SCRIPT=$(basename "${BASH_SOURCE[0]}"); NAME="${SCRIPT%.*}"
TIMESTAMP=$(date +%s)
SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
INPUT_DIR="${SCRIPT_DIR}/../test-data"
OUTPUT_DIR="$(pwd)/output/${NAME}_${TIMESTAMP}"
if [[ $# -gt 0 ]]; then OUTPUT_DIR=$1 ; fi
mkdir -p "${OUTPUT_DIR}"

bland_altman_plot.py \
    -i  "$INPUT_DIR/ST000006_data.tsv" \
    -d  "$INPUT_DIR/ST000006_design.tsv" \
    -id Retention_Index \
    -g  White_wine_type_and_source \
    -f  "$OUTPUT_DIR/ST000006_bland_altman_plot_with_group_figure.pdf" \
    -fd "$OUTPUT_DIR/ST000006_bland_altman_plot_with_group_flag_distribution.pdf" \
    -fs "$OUTPUT_DIR/ST000006_bland_altman_plot_with_group_flag_sample.tsv" \
    -ff "$OUTPUT_DIR/ST000006_bland_altman_plot_with_group_flag_feature.tsv" \
    -pf "$OUTPUT_DIR/ST000006_bland_altman_plot_prop_feature.tsv" \
    -ps "$OUTPUT_DIR/ST000006_bland_altman_plot_prop_sample.tsv"

: '

 The piece of code below is the test for the xml file.

    <tests>
     <test>
        <param name="input"  value="ST000006_data.tsv"/>
        <param name="design" value="ST000006_design.tsv"/>
        <param name="uniqID" value="Retention_Index" />
        <param name="group"  value="White_wine_type_and_source" />
        <output name="ba_plots"           file="ST000006_bland_altman_plot_with_group_figure.pdf" compare="sim_size" delta="10000" />
        <output name="outlier_dist_plots" file="ST000006_bland_altman_plot_with_group_flag_distribution.pdf" compare="sim_size" delta="10000" />
        <output name="flag_sample"        file="ST000006_bland_altman_plot_with_group_flag_sample.tsv" />
        <output name="flag_feature"       file="ST000006_bland_altman_plot_with_group_flag_feature.tsv" />
     </test>
    </tests>

'<commit_msg>Red/green test pass for bland_altman_plot_with_group<commit_after>#!/bin/bash
#     <test>
#        <param name="input"  value="ST000006_data.tsv"/>
#        <param name="design" value="ST000006_design.tsv"/>
#        <param name="uniqID" value="Retention_Index" />
#        <param name="group"  value="White_wine_type_and_source" />
#        <output name="ba_plots"           file="ST000006_bland_altman_plot_with_group_figure.pdf" compare="sim_size" delta="10000" />
#        <output name="outlier_dist_plots" file="ST000006_bland_altman_plot_with_group_flag_distribution.pdf" compare="sim_size" delta="10000" />
#        <output name="flag_sample"        file="ST000006_bland_altman_plot_with_group_flag_sample.tsv" />
#        <output name="flag_feature"       file="ST000006_bland_altman_plot_with_group_flag_feature.tsv" />
#     </test>

TEST="bland_altman_plot_with_group"
TESTDIR="testout/${TEST}"
rm -rf ${TESTDIR}
mkdir -p ${TESTDIR}
echo "### Starting test: ${TEST}"

INPUT_DIR="galaxy/test-data"
OUTPUT_DIR=$TESTDIR
if [[ $# -gt 0 ]]; then OUTPUT_DIR=$1 ; fi
mkdir -p "${OUTPUT_DIR}"

bland_altman_plot.py \
    -i  "$INPUT_DIR/ST000006_data.tsv" \
    -d  "$INPUT_DIR/ST000006_design.tsv" \
    -id Retention_Index \
    -g  White_wine_type_and_source \
    -f  "$OUTPUT_DIR/ST000006_bland_altman_plot_with_group_figure.pdf" \
    -fd "$OUTPUT_DIR/ST000006_bland_altman_plot_with_group_flag_distribution.pdf" \
    -fs "$OUTPUT_DIR/ST000006_bland_altman_plot_with_group_flag_sample.tsv" \
    -ff "$OUTPUT_DIR/ST000006_bland_altman_plot_with_group_flag_feature.tsv" \
    -pf "$OUTPUT_DIR/ST000006_bland_altman_plot_prop_feature.tsv" \
    -ps "$OUTPUT_DIR/ST000006_bland_altman_plot_prop_sample.tsv"

    date
echo "### Finished test: ${TEST}"
{'fraction_non_alphanumeric': 0.13732692851087877, 'fraction_numerical': 0.05481774512574174, 'mean_word_length': 4.462962962962963, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '4025991', 'n_tokens_mistral': 1498, 'n_tokens_neox': 1345, 'n_words': 168}