spacer_count is a versatile counter for spacers or barcodes from whole-plasimid (or similar type) sequencing outputs. It uses regex and pairwise alignment for sapcer detection, therefore it reliably count spacers appearing in any position and orientation in the read, and tolerate error (substitution and in-del). Thus, it can be used directly on vairous outputs from whole-plasmid sequencing (long-reads), staggered amplicon, or simply reads without trimming.
The core alignment and parallelization code is now written in Rust for optimal performance.
Quick start
To install, simply run:
pip install spacer_count
Input format
The csv file needed for defining known spacer in spacer_count, is the same as the sgRNA file used by MAGeCK. Briefly, a no header, three-column csv file is used as input.
s_10007,TGTTCACAGTATAGTTTGCC,CCNA1
s_10008,TTCTCCCTAATTGCTTGCTG,CCNA1
s_10027,ACATGTTGCTTCCCCTTGCA,CCNC
If no input files are provided, all the spacers will be counted in the unknown output file.
Command line interface
spacer_count's primary interface is commend line. After installation, the package is accessible via spacer-count.
Example:
spacer-count --o data/test --spacer-info-csv data/spacer_info.csv --flanking NGATG-ATGTGGTC -t 4 data/*.fastq
More argument help is accissbile via spacer-count --help
usage: spacer_count [-h] --flanking FLANKING [-t THREADS] [--first-n FIRST_N] [-o OUTPUT] [--spacer-flex SPACER_FLEX]
[--spacer-info-csv SPACER_INFO_CSV] [--spacer-length SPACER_LENGTH]
path [path ...]
Count spacers in fastq files
positional arguments:
path File path(s) to analyze. Can be a single file, or a glob pattern (e.g., 'data/*.fastq'). For
multiple files, separate them with space (e.g.,'data/file1.fastq data/file2.fastq').
options:
-h, --help show this help message and exit
--flanking FLANKING Flanking (left and right) sequence to consider for spacer counting, e.g., 'NGATG-ATGTGGTC'
-t THREADS, --threads THREADS
Number of threads to use for alignment (default: 1)
--first-n FIRST_N Only process the first N sequences in each file (default: all, if not specified)
-o OUTPUT, --output OUTPUT
Base name for output files (default: 'count_table')
--spacer-flex SPACER_FLEX
Allowable flexibility in spacer length in the extracting step (default: 1).
--spacer-info-csv SPACER_INFO_CSV
Path to CSV file containing spacer information (default: None)
--spacer-length SPACER_LENGTH
Expected spacer length. Will be ignored if spacer-info-csv is provided (default: None)
Python interface
Access directely from python is also provide for easier post-processing. The output are pandas.DataFrame.
Example:
from spacer_count.SpacerCounter import SpacerCounter
if __name__ == "__main__":
counter = SpacerCounter(['NGATG', 'ATGTGGTC'], spacer_size_flex=1, spacer_info_csv='data/spacer_info.csv')
known_df, unknown_df = counter.count_spacers('data/lr_test.fastq', basename=None, threads=8)
# provide basename to enable file output.
print(known_df.head())
Metadata
Release files for spacer-count 0.2.4
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 |
|---|---|---|---|---|
| spacer_count-0.2.4.tar.gz | 27.1 kB | Without provenance | Details for spacer_count-0.2.4.tar.gz |
Built distributions (wheels)
Total release size: 2.7 MB
Release files / spacer_count-0.2.4.tar.gz
| Download URL | spacer_count-0.2.4.tar.gz |
|---|---|
| Size | 27.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc282b29686ea7d3c096114a5b0bbad85908a41c4af472cff20fbab7d1d2f59b
|
|
BLAKE2b-256 checksum How to use checksums |
e6d1f161305d2bfe91b02665e22a165c9007cbb0eb4685c82de530a8e8c01895
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-win_arm64.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-win_arm64.whl |
|---|---|
| Size | 126.6 kB |
| Tags | CPython 3.13 Windows ARM64 |
|
SHA-256 checksum How to use checksums |
dc43c26bb1b596e11f47a4b4813dadb76e3872504e33ce6945adab94baeb31e9
|
|
BLAKE2b-256 checksum How to use checksums |
0c5d8d8e3c69f988c27d60410072dbdd2b4ab4b34e63a796ffeb24e8ad4a4e62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-win_amd64.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 126.8 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fadeb5b4dd071eeae84a8f014f7537b4d543fcd8768837d2084dd1704cf6dadb
|
|
BLAKE2b-256 checksum How to use checksums |
8c2c1442f257238258f7a5420220fdd09cd61212029c1582b4510481b5ee4cea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-win32.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-win32.whl |
|---|---|
| Size | 121.9 kB |
| Tags | CPython 3.13 Windows x86-32 |
|
SHA-256 checksum How to use checksums |
9610d93998f93bd474df8f1e90e7fd3917915d0f58736914aaf32f9d44260db2
|
|
BLAKE2b-256 checksum How to use checksums |
68e847b0917e2a6ccd667adcb0da3f6b8b7bbebc9fe3ea6e668951f6465a315c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 272.9 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
c5668b12c3758ac0e519dcf70c58ba88582f4cf5e908c286a8d110b946058a0d
|
|
BLAKE2b-256 checksum How to use checksums |
3ab67234c257f6d129d8ceb18615cd248c71ad2a056cf19f10056ef0dc5a39ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.whl |
|---|---|
| Size | 294.2 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ IBM System/390x |
|
SHA-256 checksum How to use checksums |
0ba1672583e861a83b0729eb680e20054629701becb96c41fc5c9ab278e1c0a9
|
|
BLAKE2b-256 checksum How to use checksums |
fc0d2d37e87a76bd15083cfec395baa9911bbf04eba2011e66594137437166c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.whl |
|---|---|
| Size | 377.7 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ PowerPC 64-le |
|
SHA-256 checksum How to use checksums |
17a9d51a298e435f53dca3335ee922a319bb527e4503df34fcf2e2512e2ae870
|
|
BLAKE2b-256 checksum How to use checksums |
7e9dbaa623d224b5bec5d513bd9eba42e4cc465ae82d057b97a909ea891066f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl |
|---|---|
| Size | 286.5 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-32 |
|
SHA-256 checksum How to use checksums |
8d9185eff80c23c8763f5b5a794fd8cf6e9a8669401e2cb546fbf7136e2f8d96
|
|
BLAKE2b-256 checksum How to use checksums |
a30726f985df721583933f2f742659476cb8100e8fa6f3e00902f7b8b61fd4a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-manylinux2014_armv7l.manylinux_2_17_armv7l.whl |
|---|---|
| Size | 273.3 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARMv7l |
|
SHA-256 checksum How to use checksums |
c3c4fc6a9ca4a7e24ecd2c2c76f535e4960167642970369b62bcb86823291797
|
|
BLAKE2b-256 checksum How to use checksums |
ff7bce99a9125f9419141071d53b9037ca6bfda1f7dc9062aae68de43b9ff1d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 268.7 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ ARM64 |
|
SHA-256 checksum How to use checksums |
38c9340a62ced03fc96da56c01df7896a48f1cf8064dace48354e878b2990c72
|
|
BLAKE2b-256 checksum How to use checksums |
87fa05993feb940690b5a8b8cb3a59252e20ad501286bb28f2256785a4468e80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 238.2 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
c161d4afb6d6351634035ee5912dc737882f320b2b24c00b0df844d3861a7ca4
|
|
BLAKE2b-256 checksum How to use checksums |
11f947e63518216e92e1d0658c903d58021d57dbd16cd4ff9dbb9ea0f8a7b957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / spacer_count-0.2.4-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | spacer_count-0.2.4-cp313-cp313-macosx_10_12_x86_64.whl |
|---|---|
| Size | 239.3 kB |
| Tags | CPython 3.13 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
a4de5f58123981da64c74697a85a7f1a3ae7ce9f4a745366dfdb2c54e3b7fae9
|
|
BLAKE2b-256 checksum How to use checksums |
100d77d3ce5066e9622f85c1f2554c76823bde45d0f55de8ebd598d19a2b8b47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for spacer-count 0.2.4
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.