The partitioned package is a simple Python script to check if a sequence of lines is partitioned (all duplicate lines are sequential).
Example of partitioned lines (where partitioned exits 0):
WORLD
WORLD
HELLO
HELLO
Note the above are not sorted, only partitioned! The partitioned tool does not detect if its input is sorted.
Example of unpartitioned lines (where partitioned exits 1):
HELLO
WORLD
HELLO
WORLD
The original motive for partitioned was for bioinformatics, specifically to determine if a .sam/.bam file was partitioned by readID, permitting a time-consuming sort by name that is usually unnecessary. An example of how it can be used for this is:
samtools view demo.bam | awk -F'\\t' '{ print \$1 }' | partitioned && echo "demo.bam is partitioned by readID" || echo "demo.bam is not partitioned by readID"
Details:
partitionedexits 0 (success) if the file is partitioned, 1 otherwise.- It uses a temporary SQLite3 database cache previously seen lines. This starts primarily in memory and spills to disk if necessary and is cleaned up automatically when the command terminates.
- It can also read from a file with
-i(streams from stdin if unspecified). - Pragmas can be set with
--pragmasas a space-separated list. - The number of lines read in at once is configurable with
--chunk-size(default is 1 million lines).
Metadata
Release files for partitioned 0.1.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 |
|---|---|---|---|---|
| partitioned-0.1.4.tar.gz | 2.9 kB | Without provenance | Details for partitioned-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| partitioned-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for partitioned-0.1.4-py3-none-any.whl |
Total release size: 6.2 kB
Release files / partitioned-0.1.4.tar.gz
| Download URL | partitioned-0.1.4.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ca7d1afcff9168b0fdc9a77d8cbd5c6ecce997c6d722771fe5debf61e73fec97
|
|
BLAKE2b-256 checksum How to use checksums |
dc0c7e2b383cc4d0e0aa731bc86272e4b2ace7c3d61c0b87bf4874baed70e92c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / partitioned-0.1.4-py3-none-any.whl
| Download URL | partitioned-0.1.4-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
77dccaf3f06c9b17d378408aea17d523dd2dd1a5a0417155a5377c918a54cb9a
|
|
BLAKE2b-256 checksum How to use checksums |
b7bf6dd8f4a4b609b469da9f6fe7b7ea915b8d99ba5ab2ed3fbee2e765b95b78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Security for partitioned 0.1.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.