Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Update installation guide and compatibility matrix #179

Merged
merged 5 commits into from
Oct 25, 2023
Merged
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
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ repos:
rev: 1.16.0
hooks:
- id: blacken-docs
exclude: docs/tutorial.md

- repo: https://github.com/crate-ci/typos
rev: typos-dict-v0.11.2
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ _An Efficient and Ergonomic Python Binding Library for BLAT_
[![c](https://img.shields.io/badge/C-A8B9CC.svg?style=for-the-badge&logo=C&logoColor=black)](https://www.gnu.org/software/gnu-c-manual/)
[![pypi](https://img.shields.io/pypi/v/pxblat.svg?style=for-the-badge)][pypi]
[![conda](https://img.shields.io/conda/vn/bioconda/pxblat?style=for-the-badge)][conda]
![platform](https://img.shields.io/static/v1?style=for-the-badge&label=platform&message=macos%20%7C%20linux&color=brightgreen)
![Linux](https://img.shields.io/badge/-Linux-grey?logo=linux&style=for-the-badge)
![macOS](https://img.shields.io/badge/-OSX-black?logo=apple&style=for-the-badge)
[![pyversion](https://img.shields.io/pypi/pyversions/pxblat?style=for-the-badge)][pypi]
[![tests](https://img.shields.io/github/actions/workflow/status/cauliyang/pxblat/tests.yml?style=for-the-badge&logo=github&label=Tests)](https://github.com/cauliyang/pxblat/actions/workflows/tests.yml)
[![Codecov](https://img.shields.io/codecov/c/github/cauliyang/pxblat/main?style=for-the-badge)](https://app.codecov.io/gh/cauliyang/pxblat)
Expand Down
1 change: 0 additions & 1 deletion docs/_templates/base.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{% extends "!base.html" %} {% block announce %}
<p>
Now
<a href="https://github.com/ylab-hi/pxblat#-citation">Please Cite Me</a>
v0.3.10
</p>
Expand Down
1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
# so a file named 'default.css' will overwrite the builtin 'default.css'.
html_static_path = ["_static"]


myst_heading_anchors = 3
myst_enable_extensions = [
"dollarmath",
Expand Down
111 changes: 45 additions & 66 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,95 +1,74 @@
# Install
# **Installation Guide**

## **Prerequisites**
Welcome to the installation guide for **PxBLAT**!
Below, you'll find straightforward instructions on how to install **PxBLAT** on your system.
You can choose between `CONDA` and `PyPI` for installation, depending on your preference.

```{tip}
I highly recommend to install `PxBLAT` via `CONDA` such that you do not need to
install dependencies [goto ➡️](#get-started).
```
## Get started

Before you begin with the installation and use of **PxBLAT**, there are certain prerequisites that need to be met.
The following sections detail the necessary software, hardware, and knowledge prerequisites that you should have before you start.
**PxBLAT** has been tested and runs on the following operating systems **Linux** and **MacOS**.
Choosing appropriate dependencies manager according to the operating systems.
You should have an active and stable internet connection for downloading and installing the software:
Installing **PxBLAT** is a breeze, whether you prefer using `CONDA` or `PyPI`.
Simply follow the tabs below to choose your preferred installation method.

`````{md-tab-set}

````{md-tab-item} Brew
````{md-tab-item} Pip

To install using `pip`, run the following command in your terminal:

```{code-block} bash
brew install htslib openssl
pip install pxblat
```

This will fetch the latest version of **PxBLAT** and install it on your system.
````

````{md-tab-item} Conda

To install using `conda`, execute the following command:

```{code-block} bash
conda install htslib openssl
```
````
````{md-tab-item} Apt-get
```{code-block} bash
apt-get update && apt-get install libhts-dev libssl-dev
conda install pxblat
```
This command will install **PxBLAT** from the [conda] repository.
````

`````

## **Get Started**
## Compatibility and Support

Installing **PxBLAT** via `CONDA` **do not requires** the prerequisites.
Installing **PxBLAT** via `PyPI` requires the prerequisites.
Once you have confirmed the prerequisites, you can proceed with the software installation:
Below is a compatibility matrix that shows the support status of **PxBLAT** across different platforms and Python versions.

`````{md-tab-set}
### [Conda Support][conda]

````{md-tab-item} Conda
```{code-block} bash
conda install pxblat
```
````

````{md-tab-item} Pip
```{code-block} bash
pip install pxblat
```
````

`````
| Python Version | Linux x86_64 | macOS Intel |
| :------------: | :----------: | :---------: |
| 3.9 | ✅ | ✅ |
| 3.10 | ✅ | ✅ |
| 3.11 | ✅ | ✅ |
| 3.12 | ⚫ | ⚫ |

``````{warning}
You meet the issue _*.h cannot found_ or _undefined symbol **_ If you install `pxblat` by `pip`.
If you have installed the prerequisites, the problem is caused by incorrect environment variable {envvar}`CFLAGS`, `CXXFLAGS`,
and `LDFLAGS`, which direct compiler and linker find right location of
dependencies so as to compile and link code properly.
**The easy solution** is to install **PxBLAT** via `conda`.
You can also set proper environment variable if `conda` is not accessible.
### [PyPI Support][pypi]

| Python Version | Linux x86_64 | macOS Intel | macOS Apple Silicon |
| :------------: | :----------: | :---------: | :-----------------: |
| 3.9 | ✅ | ✅ | ✅ |
| 3.10 | ✅ | ✅ | ✅ |
| 3.11 | ✅ | ✅ | ✅ |
| 3.12 | ⚫ | ⚫ | ⚫ |

`````{md-tab-set}
## Frequently Asked Questions (FAQ)

````{md-tab-item} Bash/Zsh
```{code-block} bash
export CFLAGS="-Idependencies"
export CXXFLAGS="-Idependencies"
...
```
````
- **Q1**: I'm unable to install `PxBLAT` via `Conda` on my macOS device with an Arm-based processor (M1 or M2). What should I do?

````{md-tab-item} Fish
```{code-block} fish
set -x CFLAGS="-Idependencies"
set -x CXXLAGS="-Idependencies"
...
```
````
`````
> **A**: Currently, `Conda` provides **PxBLAT** built for x86 architectures. For Arm-based macOS devices, we recommend installing **PxBLAT** via `PyPI` instead:

``````
```bash
pip install pxblat
```

## **FAQ (Frequently Asked Questions)**
You've successfully installed **PxBLAT**! Feel free to dive into a real usage case ({doc}`tutorial`) to start exploring its functionalities.

1. I cannot download `PxBLAT` via `Conda` in MacOS with Arm (M1 or M2).
<!-- links -->

A: So far, conda build `PxBLAT` in x86 instead of arrch64.
Hence we can install [prerequisites](#prerequisites) manually via `brew` or `Conda`.
Then, we can use `pip install pxblat` to install `PxBLAT`.
[conda]: https://anaconda.org/bioconda/pxblat
[pypi]: https://pypi.org/project/pxblat/
Loading
Loading