<commit_before>#!/bin/bash
. src/misc/parse_yaml.sh
eval $(parse_yaml src/misc/config.yml "")

source $galaxy_dir/.venv/bin/activate

current_dir=$PWD

gi_url="http://"$host":"$port

echo "Prepare SortMeRNA databases..."
declare RESULT=($(python src/get_installed_tool_info.py \
    --tool_name "sortmerna" \
    --gi_url $gi_url \
    --api_key $master_api_key))
revision=${RESULT[0]}
owner=${RESULT[1]}
sortmerna_db_dir=$galaxy_dir/dependency_dir/sortmerna/2.0/$owner/sortmerna/$revision/rRNA_databases/

cd $sortmerna_db_dir
indexdb_rna --ref rfam-5.8s-database-id98.fasta,rfam-5.8s-database-id98
indexdb_rna --ref rfam-5s-database-id98.fasta,rfam-5s-database-id98
indexdb_rna --ref silva-arc-16s-id95.fasta,silva-arc-16s-id95
indexdb_rna --ref silva-arc-23s-id98.fasta,silva-arc-23s-id98
indexdb_rna --ref silva-bac-16s-id90.fasta,silva-bac-16s-id90
indexdb_rna --ref silva-bac-23s-id98.fasta,silva-bac-23s-id98
indexdb_rna --ref silva-euk-18s-id95.fasta,silva-euk-18s-id95
indexdb_rna --ref silva-euk-28s-id98.fasta,silva-euk-28s-id98
cd $current_dir
echo ""

echo "Prepare HUMAnN2 databases..."
declare RESULT=($(python src/get_installed_tool_info.py \
    --tool_name "humann2" \
    --gi_url $gi_url \
    --api_key $master_api_key))
revision=${RESULT[0]}
owner=${RESULT[1]}
humann2_db_dir=$galaxy_dir/dependency_dir/humann2/2.0/$owner/humann2/$revision/

cd $humann2_db_dir
if [ ! -d "databases/chocophlan" ]; then
    humann2_databases --download chocophlan full databases/
fi
if [ ! -d "databases/uniref" ]; then
    humann2_databases --download uniref diamond databases/
fi
cd $current_dir
echo ""<commit_msg>Add relative link to indexdb_rna exe<commit_after>#!/bin/bash
. src/misc/parse_yaml.sh
eval $(parse_yaml src/misc/config.yml "")

source $galaxy_dir/.venv/bin/activate

current_dir=$PWD

gi_url="http://"$host":"$port

echo "Prepare SortMeRNA databases..."
declare RESULT=($(python src/get_installed_tool_info.py \
    --tool_name "sortmerna" \
    --gi_url $gi_url \
    --api_key $master_api_key))
revision=${RESULT[0]}
owner=${RESULT[1]}
sortmerna_db_dir=$galaxy_dir/dependency_dir/sortmerna/2.0/$owner/sortmerna/$revision/rRNA_databases/

cd $sortmerna_db_dir
../bin/indexdb_rna --ref rfam-5.8s-database-id98.fasta,rfam-5.8s-database-id98
../bin/indexdb_rna --ref rfam-5s-database-id98.fasta,rfam-5s-database-id98
../bin/indexdb_rna --ref silva-arc-16s-id95.fasta,silva-arc-16s-id95
../bin/indexdb_rna --ref silva-arc-23s-id98.fasta,silva-arc-23s-id98
../bin/indexdb_rna --ref silva-bac-16s-id90.fasta,silva-bac-16s-id90
../bin/indexdb_rna --ref silva-bac-23s-id98.fasta,silva-bac-23s-id98
../bin/indexdb_rna --ref silva-euk-18s-id95.fasta,silva-euk-18s-id95
../bin/indexdb_rna --ref silva-euk-28s-id98.fasta,silva-euk-28s-id98
cd $current_dir
echo ""

echo "Prepare HUMAnN2 databases..."
declare RESULT=($(python src/get_installed_tool_info.py \
    --tool_name "humann2" \
    --gi_url $gi_url \
    --api_key $master_api_key))
revision=${RESULT[0]}
owner=${RESULT[1]}
humann2_db_dir=$galaxy_dir/dependency_dir/humann2/2.0/$owner/humann2/$revision/

cd $humann2_db_dir
if [ ! -d "databases/chocophlan" ]; then
    humann2_databases --download chocophlan full databases/
fi
if [ ! -d "databases/uniref" ]; then
    humann2_databases --download uniref diamond databases/
fi
cd $current_dir
echo ""
{'fraction_non_alphanumeric': 0.16019271303824148, 'fraction_numerical': 0.04697380307136405, 'mean_word_length': 4.323717948717949, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4005344', 'n_tokens_mistral': 1521, 'n_tokens_neox': 1428, 'n_words': 195}