diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 56e1483c..88e8334b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -79,7 +79,7 @@ jobs: pip install dist/*.whl resources/buildforCI.sh - name: Clear Space - run: rm -rf /opt/hostedtoolcache + uses: jlumbroso/free-disk-space@main - name: Rebuild Dockerfile id: rebuild if: ${{ needs.changes.outputs.container == 'true' }} diff --git a/harpy/bin/molecule_coverage.py b/harpy/bin/molecule_coverage.py index 165749e5..e1c373bf 100755 --- a/harpy/bin/molecule_coverage.py +++ b/harpy/bin/molecule_coverage.py @@ -64,7 +64,7 @@ def initialize_contig(length): def process_alignment(start, end): """Function to insert or update counts for numbers in a given range""" cursor.executemany( - 'UPDATE number_counts SET count = count + 1 WHERE number = ?', + 'UPDATE number_counts SET count = count + 1 WHERE number BETWEEN ? AND ?', [(num,) for num in range(start, end + 1)] ) diff --git a/harpy/reports/align_stats.qmd b/harpy/reports/align_stats.qmd index 163b6072..ef52c05a 100644 --- a/harpy/reports/align_stats.qmd +++ b/harpy/reports/align_stats.qmd @@ -472,7 +472,7 @@ list( #| title: "Mol. Stdev Depth" list( color = "#d4d4d4", - value = round(global_sd,2) + value = round(mol_global_sd,2) ) ``` diff --git a/harpy/reports/preflight_fastq.qmd b/harpy/reports/preflight_fastq.qmd index 74eed462..799bf46d 100644 --- a/harpy/reports/preflight_fastq.qmd +++ b/harpy/reports/preflight_fastq.qmd @@ -64,7 +64,7 @@ list( list( icon = ifelse(attention > 0, "exclamation-triangle", "check2-square"), color = ifelse(bxnotlast > 0, "warning", "success"), - value = scales::comma(attention) + value = scales::comma(bxnotlast) ) ``` diff --git a/resources/dev_install_conda.sh b/resources/dev_install_conda.sh index 818a207d..3bf30461 100644 --- a/resources/dev_install_conda.sh +++ b/resources/dev_install_conda.sh @@ -1,14 +1,24 @@ #! /usr/bin/env bash -conda env create --prefix harpy/.conda/harpy $1 --file harpy/resources/harpy.yaml +if ! conda env create --prefix harpy/.conda/harpy $1 --file harpy/resources/harpy.yaml; then + echo "Error: Failed to create conda environment" + exit 1 +fi -conda activate harpy/.conda/harpy +if ! conda activate harpy/.conda/harpy; then +cd harpy || { echo "Error: Failed to change directory to harpy"; exit 1; } +fi mkdir -p ${CONDA_PREFIX}/bin -cd harpy +# install harpy proper +if ! pip install --no-deps --disable-pip-version-check -e .; then + echo "Error: Failed to install harpy package" + exit 1 +fi -# compilation +# Clean up build directory if it exists +[ -d build ] && rm -rf build g++ harpy/bin/extractReads.cpp -O3 -o ${CONDA_PREFIX}/bin/extractReads # install harpy proper diff --git a/resources/dev_install_pixi.sh b/resources/dev_install_pixi.sh index df3b5581..28c806f0 100644 --- a/resources/dev_install_pixi.sh +++ b/resources/dev_install_pixi.sh @@ -2,10 +2,22 @@ ENV_PREFIX="harpy/.pixi/envs/default/bin/" -pixi init -i harpy/resources/harpy.yaml harpy -echo -e "\n[pypi-dependencies]\nharpy = { path = \".\", editable = true}" >> harpy/pixi.toml +if ! pixi init -i harpy/resources/harpy.yaml harpy; then + echo "Error: Failed to initialize pixi environment" + exit 1 +fi -cd harpy && pixi shell +if ! echo -e "\n[pypi-dependencies]\nharpy = { path = \".\", editable = true}" >> harpy/pixi.toml; then + echo "Error: Failed to update pixi.toml" + exit 1 +fi + +if ! cd harpy; then + echo "Error: Failed to change directory to harpy" + exit 1 +fi + +pixi shell mkdir -p ${ENV_PREFIX}/bin