Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# pixi environments
.pixi/*
!.pixi/config.toml

target/
117 changes: 14 additions & 103 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ python = ["pyo3"]

[dependencies]
# BAM/SAM reading
rust-htslib = "0.51"
rust-htslib = { version = "0.44", features = ["static"] }

# Parallelism
rayon = "1.10"
Expand Down
48 changes: 46 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,48 @@ Built with **Rust** for fast BAM processing and **Python/Bokeh** for interactive

# Quick Start

You need Rust and Python installed. Install Rust following instructions at: https://rust-lang.org/tools/install/
You need conda installed. If you don't have it yet, you can install Miniconda following instructions at: https://docs.conda.io/en/latest/miniconda.html

Then in command-line:

```bash
conda env create -f thebigbam_env.yaml
conda activate thebigbam
pip install git+https://github.com/bhagavadgitadu22/theBIGbam
```

Be aware that it may take quite some time to compile the Rust code during installation.

To reduce the installation size, you can at the end remove the rust cache:

```bash
cargo clean
```

### Errors

To avoid potential compilation errors:

- On Linux: Install development headers: `sudo apt-get install libbz2-dev liblzma-dev zlib1g-dev clang libclang-dev`
- On macOS: `brew install xz bzip2 zlib`
- On HPC clusters: you may need to load the LLVM module first: `module load llvm`

If you cannot use any of these methods and still get errors related to `libclang` during installation such as :

```bash
thread 'main' (3889591) panicked at /home/gmichoud/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/bindgen-0.69.5/lib.rs:622:31:
Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-*.so', 'libclang.so.*', 'libclang-*.so.*'], set the `LIBCLANG_PATH` environment variable to a path where one of these files can be found (invalid: [])"

```

Please set the `LIBCLANG_PATH` environment variable to the path where your `libclang` library is located. For example:

```bash
export LIBCLANG_PATH=$(python -c "import os; print(os.environ['CONDA_PREFIX'] + '/lib')")
```

Then try installing again.

```bash
pip install git+https://github.com/bhagavadgitadu22/theBIGbam
```
Expand All @@ -46,6 +84,12 @@ thebigbam calculate \
thebigbam serve --db tests/HK97/test.db --port 5006
```

If you're using wsl, you may need to install the package `wslu` to allow opening the browser from the wsl terminal:

```bash
sudo apt install wslu
```

Open browser to http://localhost:5006

See [the installation guide](docs/INSTALL.md) for more detailed instructions.
Expand Down Expand Up @@ -249,4 +293,4 @@ Export any metric as a contig x sample TSV matrix:
thebigbam export -d my_database.db --metric Coverage_mean -o coverage.tsv
```

Run `thebigbam export -h` to see the full list of available metrics.
Run `thebigbam export -h` to see the full list of available metrics.
2 changes: 1 addition & 1 deletion docs/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ This installs in "editable" mode - changes to Python code take effect immediatel
**Using conda/mamba (easiest):**

```bash
mamba env create -f thebigbam_env.yaml
conda env create -f thebigbam_env.yaml
conda activate thebigbam
pip install . # Re-install in conda environment
```
Expand Down
15 changes: 8 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ description = "Compression and interactive exploration of large-scale sequencing
readme = "README.md"
authors = [{ name = "Martin Boutroux", email = "martinboutroux@outlook.fr" }]
license = { text = "MIT" }
requires-python = ">=3.9"
requires-python = ">=3.9,<3.13"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
Expand All @@ -18,12 +18,6 @@ classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Rust",
]

[project.urls]
Homepage = "https://github.com/bhagavadgitadu22/theBIGbam"
Repository = "https://github.com/bhagavadgitadu22/theBIGbam"
Issues = "https://github.com/bhagavadgitadu22/theBIGbam/issues"

dependencies = [
"bokeh>=3.0",
"panel>=1.0",
Expand All @@ -33,6 +27,13 @@ dependencies = [
"duckdb>=1.0",
]

[project.urls]
Homepage = "https://github.com/bhagavadgitadu22/theBIGbam"
Repository = "https://github.com/bhagavadgitadu22/theBIGbam"
Issues = "https://github.com/bhagavadgitadu22/theBIGbam/issues"



[project.optional-dependencies]
dev = [
"pytest>=7.0",
Expand Down
2 changes: 1 addition & 1 deletion thebigbam/plotting/start_bokeh_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -984,7 +984,7 @@ def make_data_download_callback():
toggle_stylesheet = InlineStyleSheet(css=toggle_css_text)

# Load logo as base64 to avoid static file serving issues
logo_path = os.path.join(static_path, "logo.png")
logo_path = os.path.join(static_path, "LOGO.png")
with open(logo_path, "rb") as f:
logo_b64 = base64.b64encode(f.read()).decode("utf-8")

Expand Down
5 changes: 5 additions & 0 deletions thebigbam_env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ dependencies:
- samtools=1.23
- bwa-mem2=2.3
- minimap2=2.30
- rust>=1.72
- libclang
- python=3.12
- blast