A toolbox to check whether files follow a predefined schema.
Project description
igs-toolbox
Description
This Python package contains tools to check whether files follow predefined schemas of the IGS project.
Installation
igs-toolbox is installable using pip.
pip install igs-toolbox
Usage
All tools can be used directly through the commandline.
jsonChecker
$ jsonChecker --help
Usage: jsonChecker [OPTIONS]
Validate metadata json.
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * --input -i FILE Path to input json file. [default: None] [required] │
│ --dwh Perform validation for the dwh specification. │
│ --log_file -l FILE Path to log file. [default: jsonChecker_2025-07-02T13-17-52.log] │
│ --version -V │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
convertSeqMetadata
The method to convert the metadata table into JSONs for each sample. This inlcudes a validation to check if the IGS metadata scheme is matched.
$ convertSeqMetadata --help
Usage: convertSeqMetadata [OPTIONS]
Convert table of seq metadata to json files.
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * --input -i FILE Path to input excel, csv/tsv or json file. [default: None] [required] │
│ * --output -o DIRECTORY Path to output folder for json files. It will use the lab_sequence_id as filename, otherwise the input │
│ filename _ row number. │
│ [default: None] │
│ [required] │
│ --dwh Convert input to match the IGSDWH (v3.2.0) specification. │
│ --skip-validation Skip all validations, this can generate invalid JSON metadata files. │
│ --fix Apply data fixes whenever possible. │
│ --remove-extra Remove extra properties not present in the specification, requires --fix option enabled. │
│ --log_file -l FILE Path to log file. [default: convertSeqMetadata_2025-07-02T13-15-22.log] │
│ --version -V │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Example:
convertSeqMetadata -i IGS_Metadata.xlsx -o out/
readQR
The method readQR reads the Meldungsquittung and extracts the MeldungsID.
Poppler is required to read the pdfs
conda install poppler
or
mamba install poppler
or
apt install poppler-utils
$ readQR --help
Usage: readQR [OPTIONS] INPUT_FILES...
Extract QR codes from files.
╭─ Arguments ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * input_files INPUT_FILES... Paths to input files. [default: None] [required] │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --version -V │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Example:
readQR *.pdf
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
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 igs_toolbox-1.7.3-py3-none-any.whl.
File metadata
- Download URL: igs_toolbox-1.7.3-py3-none-any.whl
- Upload date:
- Size: 497.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d88dbef75caf0191585573c941b09bd66e1e841e6b8fb77e567a3ab093ccdd4
|
|
| MD5 |
d2b799438e413df66b1fea7f89f0022d
|
|
| BLAKE2b-256 |
db3ce2dc08f82f505323fab75fbb4d15497caa0180d6180954ac01d6342b2b78
|