Skip to content

Commit

Permalink
suggestions and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimens committed Jan 6, 2025
1 parent f09d066 commit 5e850bc
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
2 changes: 1 addition & 1 deletion harpy/bin/molecule_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
)

Expand Down
2 changes: 1 addition & 1 deletion harpy/reports/align_stats.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ list(
#| title: "Mol. Stdev Depth"
list(
color = "#d4d4d4",
value = round(global_sd,2)
value = round(mol_global_sd,2)
)
```

Expand Down
2 changes: 1 addition & 1 deletion harpy/reports/preflight_fastq.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
```

Expand Down
18 changes: 14 additions & 4 deletions resources/dev_install_conda.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 15 additions & 3 deletions resources/dev_install_pixi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 5e850bc

Please sign in to comment.