semvec/pypi-packages huggingface dataset:
betterbasequals 0.3.0
SNV variant caller that uses discordant overlapping read pairs to calculate sample-specific base error rates.
License: MIT
Requires Python: <3.11,>=3.8

# BBQ (BetterBaseQuals)

A somatic SNV variant caller that uses discordant overlapping read pairs to calculate sample-specific base error rates.

## Requirements

bbq requires Python 3.8 or above.

## Install

bbq can be installed using pip:
```
pip install betterbasequals
```
or using [pipx](https://pipx.pypa.io/stable/):
```
pipx install betterbasequals
```

### Usage

The bbq tool has different commands that can be run. To get at list of the different command you can use `-h` or `--help`:
```
bbq -h
```
To see the options for a specific command you can use `-h` after a command:
```
bbq count -h
```

To call variants in a sample you will need to first gather training data then train the model on the sample and finally call variants using the model. Typically you will want to split this into multiple jobs and we recommend using the snakemake workflow [bbq_pipeline](https://github.com/BesenbacherLab/bbq_pipeline) that does this. That github project also contain training data that can be used to test BBQ.

If you want to run both the error counting, model training and variant calling using a single command that is also possible using the following command (but we strongly recommend using the above mentioned workflow):

```
bbq call --bam_file cfdna.bam --filter_bam_file  pbmc.bam --twobit_file ~/Data/2bit/hg38.2bit
```

For some of the command it is possible to run it on only a part of the genome using the `-r {chrom}:{start}-{end}` option Fx:
```
bbq call_only --bam_file tmp.bam --twobit_file ~/Data/2bit/hg38.2bit --input_file_kmerpapa model.txt -r chr22:30000000-31000000 
```

Several of the commands requires the reference genome in 2bit format. If the bam file is mapped to a known reference genome the 2bit file can be downloaded from:
`https://hgdownload.cse.ucsc.edu/goldenpath/{genome}/bigZips/{genome}.2bit` where `{genome}` is a valid UCSC genome assembly name (fx. "hg38").

Otherwise a 2bit file can be created from a fasta file using the `faToTwoBit` command. A linux binary of the tool can be downloaded from UCSC:
```
wget https://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/faToTwoBit
```
spey-pyhf 0.2.0
pyhf plugin for spey interface
License: MIT
Requires Python: <3.13,>=3.8

# spey-pyhf

[![arxiv](https://img.shields.io/static/v1?style=plastic&label=arXiv&message=2307.06996&color=brightgreen)](https://arxiv.org/abs/2307.06996)
[![DOI](https://img.shields.io/static/v1?style=plastic&label=DOI&message=10.21468/SciPostPhys.16.1.032&color=blue)](https://scipost.org/10.21468/SciPostPhys.16.1.032)
[![DOI](https://zenodo.org/badge/617041391.svg)](https://zenodo.org/badge/latestdoi/617041391)
[![doc](https://img.shields.io/static/v1?style=plastic&label&message=Documentation&logo=gitbook&logoColor=white&color=gray)](http://spey-pyhf.readthedocs.io/)

<img src="https://raw.githubusercontent.com/SpeysideHEP/spey/main/docs/img/spey-plug-in.png" alt="Spey logo" style="float: right; margin-right: 20px" align="right" width=250px/>

[![github](https://img.shields.io/static/v1?style=plastic&label&message=GitHub&logo=github&logoColor=black&color=white)](https://github.com/SpeysideHEP/spey-pyhf)
[![PyPI - Version](https://img.shields.io/pypi/v/spey-pyhf?style=plastic)](https://pypi.org/project/spey-pyhf/)
[![Documentation Status](https://readthedocs.org/projects/spey-pyhf/badge/?version=main&style=plastic)](https://spey-pyhf.readthedocs.io)
[![GitHub License](https://img.shields.io/github/license/SpeysideHEP/spey-pyhf?style=plastic)](https://github.com/SpeysideHEP/spey-pyhf/blob/main/LICENSE)

``pyhf`` plugin for spey interface can be found in [PyPi library](https://pypi.org/project/spey-pyhf/) and can be downloaded using

```bash
python -m pip install spey-pyhf
```

command. Once installed ``spey`` interface will be able to automatically detect it.
For details on usage please see the [online documentation](http://spey-pyhf.readthedocs.io/).

If you like to use a specific branch you can either use `make install` or `pip install -e .` after cloning the repository or use the following command

```bash
python -m pip install --upgrade "git+https://github.com/SpeysideHEP/spey-pyhf"
```

**Note that `main` branch may not be the stable version.**