xsamtools
xsamtools makes the samtools tooling from htslib and bcftools available through pypi packaging. These tools have been lightly modified to allow merges on VCF streams without an index.
Installation
pip install xsamtools
Installation requires a C toolchain. Typically Ubuntu/Debian systems should have the following packages installed:
libbz2-devliblzma-devlibcurl4-openssl-devlibncurses5-dev
libcurl4-openssl-dev may be omitted at the cost of some cloud support features in htslib.
Usage
After successful installation, the following executables are available:
samtools:
- htsfile
- bgzip
- tabix
- bcftools
xsamtools:
- merge_vcfs.py
xsamtools also provides Python tooling to create named (FIFO) pipes to Google Storage objects:
from xsamtools import pipes
reader = pipes.BlobReaderProcess("bucket-name", "read-key")
print("reader path", reader.filepath) # local FIFO filepath
writer_key = pipes.BlobWriterProcess("bucket-name", "writ-key")
print("writer path", writer.filepath) # local FIFO filepath
These streams appear as either readable or writable files on the filesystem. Such objects are not seekable.
A utility method is also provided to merge VCFs from GS objects:
from xsamtools import vcf
vcf.combine("src-bucket-name", ["first-src-vcf-key", "second-src-vcf-key"], "dst-bucket-name", "dst-vcf-key")
There is no formal limit on the number of VCF keys. Care should be taken that the VCF objects provided are aligned by chromosome or the merge will fail.
Docker
A Docker image with xsamtools installed is published at https://hub.docker.com/r/xbrianh/xsamtools
Metadata
Release files for xsamtools 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xsamtools-0.6.0.tar.gz | 7.6 MB | Without provenance | Details for xsamtools-0.6.0.tar.gz |
Release files / xsamtools-0.6.0.tar.gz
| Download URL | xsamtools-0.6.0.tar.gz |
|---|---|
| Size | 7.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80cf8ae5ab60c150a86db1334f61df06228c8b5eee1b6428fd00d540a95fd5dd
|
|
BLAKE2b-256 checksum How to use checksums |
1eb81e9983be807ed478c131705acd2e945c93a3b025aff4fa23d4390409733f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.3
|
Security for xsamtools 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.