<commit_before>#!/bin/bash
TIMESTAMP=$(date +%s)
SCRIPT_DIR=$(dirname ${BASH_SOURCE[0]})

CODEDIR="${SCRIPT_DIR}/.."
INPUTDIR="${SCRIPT_DIR}/../test-data"
OUTPUTDIR="$(pwd)/output_${TIMESTAMP}"
mkdir -p ${OUTPUTDIR}

/remove_selected_features_samples.py \
		-i  $INPUTDIR/ST000006_data.tsv \
		-d  $INPUTDIR/ST000006_design_group_name_underscore.tsv \
		-id Retention_Index \
		-f  $INPUTDIR/ST000006_kruskal_wallis_with_group_flags.tsv \
		-fft row \
		-fid Retention_Index \
		-fd  flag_significant_0p10_on_all_groups \
		-val 0 \
		-con 0 \
         	-ow $OUTPUTDIR/ST000006_remove_selected_features_samples_wide.tsv \
         	-of $OUTPUTDIR/ST000006_remove_selected_features_samples_flags.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="flags"       value="ST000006_kruskal_wallis_with_group_flags.tsv"/>
        <param name="typeofdrop"  value="row"/>
        <param name="flagUniqID"  value="Retention_Index" />
        <param name="flagToDrop"  value="flag_significant_0p10_on_all_groups" />
        <param name="reference"   value="0" />
        <param name="conditional" value="0" />
        <output name="outWide"    file="ST000006_remove_selected_features_samples_wide.tsv" />
        <output name="outFlags"   file="ST000006_remove_selected_features_samples_flags.tsv" />
     </test>
    </tests>

'





<commit_msg>Update remove_selected_features_samples test script to pass red/green test<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="flags"       value="ST000006_kruskal_wallis_with_group_flags.tsv"/>
#        <param name="typeofdrop"  value="row"/>
#        <param name="flagUniqID"  value="Retention_Index" />
#        <param name="flagToDrop"  value="flag_significant_0p10_on_all_groups" />
#        <param name="reference"   value="0" />
#        <param name="conditional" value="0" />
#        <output name="outWide"    file="ST000006_remove_selected_features_samples_wide.tsv" />
#        <output name="outFlags"   file="ST000006_remove_selected_features_samples_flags.tsv" />
#     </test>

SCRIPT=$(basename "${BASH_SOURCE[0]}");
TEST="${SCRIPT%.*}"
TESTDIR="testout/${TEST}"
INPUT_DIR="galaxy/test-data"
OUTPUT_DIR=$TESTDIR
rm -rf "${TESTDIR}"
mkdir -p "${TESTDIR}"
echo "### Starting test: ${TEST}"
if [[ $# -gt 0 ]]; then OUTPUT_DIR=$1 ; fi
mkdir -p "${OUTPUT_DIR}"

remove_selected_features_samples.py \
    -i  "$INPUT_DIR/ST000006_data.tsv" \
    -d  "$INPUT_DIR/ST000006_design_group_name_underscore.tsv" \
    -id Retention_Index \
    -f  "$INPUT_DIR/ST000006_kruskal_wallis_with_group_flags.tsv" \
    -fft row \
    -fid Retention_Index \
    -fd  flag_significant_0p10_on_all_groups \
    -val 0 \
    -con 0 \
    -ow "$OUTPUT_DIR/ST000006_remove_selected_features_samples_wide.tsv" \
    -of "$OUTPUT_DIR/ST000006_remove_selected_features_samples_flags.tsv"

echo "### Finished test: ${TEST} on $(date)"
{'fraction_non_alphanumeric': 0.1441550575408843, 'fraction_numerical': 0.043609933373712904, 'mean_word_length': 3.5433287482806053, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 31, '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': '1548683', 'n_tokens_mistral': 1308, 'n_tokens_neox': 1182, 'n_words': 180}