Quiver files are simply one large file with the contents of many smaller files inside of them.
Project description
Quiver
This repository introduces and defines a specialized file format known as a Quiver file. A Quiver file acts as a container that consolidates the contents of many individual files into a single, structured file. Each piece of data within a Quiver file is referred to as an entry, and every entry is uniquely identified by a name. Along with the actual file contents, each entry can also include metadata, such as file size, timestamps, tags, or other descriptive information relevant to the entry. This format enables efficient storage, organization, and retrieval of a large number of related files within a single archive-like structure.
In addition to the file format itself, this repository provides a suite of command-line tools designed to interact with and manipulate Quiver files. These tools are built with a composable design philosophy in mind, meaning they are intended to be pipe-able and easily combined in Unix-style workflows. This allows users to construct complex data manipulation pipelines by chaining together simple commands, making the tools flexible and script-friendly.
The concept and implementation of Quiver files and their associated tools are heavily inspired by Brian Coventry’s silent_tools project, which serves a similar purpose for working with data within the Rosetta molecular modeling suite. However, a key distinction is that Quiver files are intentionally designed to be platform-agnostic and can be used in environments outside of Rosetta. This makes them especially valuable for more general-purpose data handling, sharing, and processing workflows across a broader range of scientific and software contexts.
How to install
uv pip install quiver-pdb
How to use
# make a quiver file
qvfrompdbs *.pdb > my.qv
# ask what's in a quiver file
qvls my.qv
# ask how many things are in a quiver file
qvls my.qv | wc -l
# extract all pdbs from a quiver file
qvextract my.qv
# extract the first 10 pdbs from a quiver file
qvls my.qv | head -n 10 | qvextractspecific my.qv
# extract a random 10 pdbs from a quiver file
qvls my.qv | shuf | head -n 10 | qvextractspecific my.qv
# extract a specific pdb from a quiver file
qvextractspecific my.qv name_of_pdb_0001
# produce a scorefile from a quiver file
qvscorefile my.qv
# combine qv files
cat 1.qv 2.qv 3.qv > my.qv
# ensure all pdbs in quiver file have unique names
qvls my.qv | qvrename my.qv > uniq.qv
# split a quiver file into groups of 100
qvsplit my.qv 100
# slice a quiver file
qvslice big.qv <tag1> <tag2> ... <tagN> > smaller.qv
Test
터미널에서 이 파일이 있는 디렉토리 또는 상위 프로젝트 루트에서 다음 명령어를 실행하세요:
uv run pytest
Benchmark
uv run python test/benchmark.py
Time to create Quiver file: 0.2492 seconds
Time to list tags: 0.0591 seconds
Time to slice Quiver file (5 tags): 0.0610 seconds
Time to extract from sliced Quiver file (5 files): 0.0267 seconds
Time to extract all files (101 files): 0.9863 seconds
Todo
- Finding bottleneck.
- rewrite the code more efficient.
References
Thank you to Nathaniel Bennett for creating this original code(https://github.com/nrbennet/quiver).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quiver_pdb-0.3.0.tar.gz.
File metadata
- Download URL: quiver_pdb-0.3.0.tar.gz
- Upload date:
- Size: 5.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9008c7d5dd52acb6b583388835e4f68cfc8307519e4727c339a3ad61dced93a4
|
|
| MD5 |
209aa409cfae262e68ec274174fd80f9
|
|
| BLAKE2b-256 |
63104367102dbf229361c3c9f704cd2b2519d67e87acfdb05055f157f3f441ab
|
File details
Details for the file quiver_pdb-0.3.0-py3-none-any.whl.
File metadata
- Download URL: quiver_pdb-0.3.0-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bd4987e47203bb61e833f2180edb471990df2be0790670b750c1c8b6547025a
|
|
| MD5 |
ad024b67905c805fa4f50d33075f6ee7
|
|
| BLAKE2b-256 |
6b6cdfb7e6a009bd6c833fa40f264d9f3b89c88505530195d649eafddadaa2ee
|
File details
Details for the file quiver_pdb-0.3.0-cp311-cp311-macosx_11_0_arm64.whl.
File metadata
- Download URL: quiver_pdb-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 338.8 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b194c2b0dfaa65518ddf2414b07b72ce5904b2d7dd04d933bcf21bfbcd29efde
|
|
| MD5 |
21f0b7ee6526e2e9dc75ef50bee6ee3e
|
|
| BLAKE2b-256 |
fea96856622ced2f5c1c86db80e17ab81fc0665f9d42fec684bd5ec41a3fe628
|