diff --git a/bifrost_chewbbaca/datadump.py b/bifrost_chewbbaca/datadump.py index b8d4d65..d005126 100755 --- a/bifrost_chewbbaca/datadump.py +++ b/bifrost_chewbbaca/datadump.py @@ -28,7 +28,8 @@ def extract_cgmlst(cgmlst: Category, results: Dict, component_name: str) -> None lines = input.readlines() lines = [i.strip() for i in lines] locus_names = lines[0].split()[1:] - allele_values = lines[1].split()[1:] + allele_values = [int(x) if x.isdigit() else x for x in lines[1].split()[1:]] + allele_dict = { locus_names[i]: allele_values[i] for i in range(len(locus_names)) } diff --git a/environment.yml b/environment.yml index 15b02fc..bcb4719 100755 --- a/environment.yml +++ b/environment.yml @@ -3,12 +3,14 @@ channels: - bioconda - defaults dependencies: - - snakemake-minimal>=5.31.1 # updated from 5.7.1 because of envvars - - blast>=2.14.0 # updated from blast>=2.9 - - prodigal>=2.6.3 - - chewbbaca>=3.2.0 + - snakemake-minimal==5.7.1 + - blast=2.9 + - prodigal=2.6.3 + - chewbbaca=3.2.0 - pip - pip: + - jsonschema<4 + - warlock==1.3.3 - pytest - pytest-cov - pytest-profiling @@ -17,5 +19,3 @@ dependencies: - argh - watchdog - bifrostlib - - black - - -e . diff --git a/install.sh b/install.sh index 6b7b603..bcc1ef6 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -euo pipefail + helpFunction() { echo "" @@ -39,7 +41,7 @@ if [ "$parameterI" == "COMP" ] then echo "Starting computerome install" module load tools computerome_utils/2.0 - module load tools anaconda3/2022.10 + module load tools $CONDA_VERSION #if $BIFROST_CONDA_PATH is not set then exit with help message if [ -z "$BIFROST_CONDA_PATH" ] then @@ -121,7 +123,7 @@ if test -f "$REQ_TXT"; then echo "Making conda env" echo "$ENV_NAME will be created" - mamba env create -f "$REQ_TXT" --name $ENV_NAME + mamba env create --file "$REQ_TXT" --name $ENV_NAME else echo "environment.yml file cannot be found in the script folder" exit 1 @@ -148,7 +150,5 @@ fi if test -f "$CUSTOM_INSTALL_PATH"; then echo -e "\nRunning custom_install.sh" - eval "$(conda shell.bash hook)" - conda activate $ENV_NAME - bash $CUSTOM_INSTALL_PATH -i $parameterI -fi \ No newline at end of file + bash -i $CUSTOM_INSTALL_PATH $ENV_NAME #-i required for interactive mode to active env +fi