Skip to content

Commit

Permalink
Fixed component_version comparison in datadump.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskiil committed Feb 7, 2024
1 parent 9095384 commit aa0a76b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
9 changes: 7 additions & 2 deletions bifrost_chewbbaca/datadump.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,15 @@ def datadump(samplecomponent_ref_json: Dict):


def extract_digits_from_component_version(component_str):
version_re = re.compile(".*__(v.*)__.*")
version_re = re.compile(r".*__v(\d+\.\d+\.\d+)(__)?.*")
version_group = re.match(version_re, component_str).groups()[0]
version_digits = int("".join([i for i in version_group if i.isdigit()]))
version_digits = tuple([int(i) for i in version_group.split(".") if i.isdigit()])
return version_digits
# def extract_digits_from_component_version(component_str):
# version_re = re.compile(".*__(v.*?)(__)?.*$")
# version_group = re.match(version_re, component_str).groups()[0]
# version_digits = int("".join([i for i in version_group if i.isdigit()]))
# return version_digits


datadump(
Expand Down
12 changes: 6 additions & 6 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -17,5 +19,3 @@ dependencies:
- argh
- watchdog
- bifrostlib
- black
- -e .
12 changes: 6 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -euo pipefail

helpFunction()
{
echo ""
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -121,7 +123,7 @@ if test -f "$REQ_TXT";
then
echo "Making conda env"
echo "$ENV_NAME will be created"
conda 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
Expand All @@ -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
bash -i $CUSTOM_INSTALL_PATH $ENV_NAME #-i required for interactive mode to active env
fi

0 comments on commit aa0a76b

Please sign in to comment.