BioProfileKit 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bioprofilekit-1.0.0/LICENSE +21 -0
- bioprofilekit-1.0.0/MANIFEST.in +18 -0
- bioprofilekit-1.0.0/PKG-INFO +223 -0
- bioprofilekit-1.0.0/README.md +181 -0
- bioprofilekit-1.0.0/pyproject.toml +115 -0
- bioprofilekit-1.0.0/setup.cfg +4 -0
- bioprofilekit-1.0.0/setup.py +28 -0
- bioprofilekit-1.0.0/src/BioProfileKit.egg-info/PKG-INFO +223 -0
- bioprofilekit-1.0.0/src/BioProfileKit.egg-info/SOURCES.txt +104 -0
- bioprofilekit-1.0.0/src/BioProfileKit.egg-info/dependency_links.txt +1 -0
- bioprofilekit-1.0.0/src/BioProfileKit.egg-info/entry_points.txt +3 -0
- bioprofilekit-1.0.0/src/BioProfileKit.egg-info/requires.txt +18 -0
- bioprofilekit-1.0.0/src/BioProfileKit.egg-info/top_level.txt +10 -0
- bioprofilekit-1.0.0/src/analysis/__init__.py +6 -0
- bioprofilekit-1.0.0/src/analysis/categorical_analysis.py +47 -0
- bioprofilekit-1.0.0/src/analysis/data_quality.py +62 -0
- bioprofilekit-1.0.0/src/analysis/multivariate_analysis.py +612 -0
- bioprofilekit-1.0.0/src/analysis/numeric_analysis.py +77 -0
- bioprofilekit-1.0.0/src/analysis/outlier_detection.py +68 -0
- bioprofilekit-1.0.0/src/analysis/overview.py +153 -0
- bioprofilekit-1.0.0/src/analysis/plot_utils.py +119 -0
- bioprofilekit-1.0.0/src/biological/__init__.py +6 -0
- bioprofilekit-1.0.0/src/biological/functional_annotation.py +271 -0
- bioprofilekit-1.0.0/src/biological/measurement_data.py +50 -0
- bioprofilekit-1.0.0/src/biological/plot_utils.py +189 -0
- bioprofilekit-1.0.0/src/biological/sequence_data.py +466 -0
- bioprofilekit-1.0.0/src/biological/sequence_detection.py +61 -0
- bioprofilekit-1.0.0/src/biological/taxonomy.py +286 -0
- bioprofilekit-1.0.0/src/biological/taxonomy_utils.py +47 -0
- bioprofilekit-1.0.0/src/biological/uniprot_swissprot.py +172 -0
- bioprofilekit-1.0.0/src/cli/__init__.py +1 -0
- bioprofilekit-1.0.0/src/cli/app.py +202 -0
- bioprofilekit-1.0.0/src/cli/report_flags.py +199 -0
- bioprofilekit-1.0.0/src/cli/report_json.py +356 -0
- bioprofilekit-1.0.0/src/cli/report_writer.py +57 -0
- bioprofilekit-1.0.0/src/cli/update_remote_data.py +64 -0
- bioprofilekit-1.0.0/src/cli/utils.py +27 -0
- bioprofilekit-1.0.0/src/cython_wrapper/__init__.py +0 -0
- bioprofilekit-1.0.0/src/cython_wrapper/medcouple_fast.c +17110 -0
- bioprofilekit-1.0.0/src/cython_wrapper/medcouple_fast.pyx +176 -0
- bioprofilekit-1.0.0/src/cython_wrapper/taxonomy_validator.c +10121 -0
- bioprofilekit-1.0.0/src/cython_wrapper/taxonomy_validator.pyx +68 -0
- bioprofilekit-1.0.0/src/cython_wrapper/wrapper_utils.c +10079 -0
- bioprofilekit-1.0.0/src/cython_wrapper/wrapper_utils.pyx +62 -0
- bioprofilekit-1.0.0/src/data_utils/__init__.py +2 -0
- bioprofilekit-1.0.0/src/data_utils/file_reader.py +91 -0
- bioprofilekit-1.0.0/src/data_utils/remote_data.py +249 -0
- bioprofilekit-1.0.0/src/enums/__init__.py +3 -0
- bioprofilekit-1.0.0/src/enums/cog_enum.py +54 -0
- bioprofilekit-1.0.0/src/enums/measurement_enum.py +8 -0
- bioprofilekit-1.0.0/src/enums/sequence_enum.py +7 -0
- bioprofilekit-1.0.0/src/models/__init__.py +8 -0
- bioprofilekit-1.0.0/src/models/categorical.py +22 -0
- bioprofilekit-1.0.0/src/models/measurement.py +9 -0
- bioprofilekit-1.0.0/src/models/multivariate.py +30 -0
- bioprofilekit-1.0.0/src/models/numeric.py +30 -0
- bioprofilekit-1.0.0/src/models/outliers.py +20 -0
- bioprofilekit-1.0.0/src/models/overview.py +50 -0
- bioprofilekit-1.0.0/src/models/quality.py +26 -0
- bioprofilekit-1.0.0/src/models/sequence.py +77 -0
- bioprofilekit-1.0.0/src/quality_assessment/__init__.py +1 -0
- bioprofilekit-1.0.0/src/quality_assessment/biological_quality.py +163 -0
- bioprofilekit-1.0.0/src/quality_assessment/column_quality.py +150 -0
- bioprofilekit-1.0.0/src/quality_assessment/dataset_quality.py +70 -0
- bioprofilekit-1.0.0/src/quality_assessment/quality_assessment.py +83 -0
- bioprofilekit-1.0.0/src/quality_assessment/relationships.py +42 -0
- bioprofilekit-1.0.0/src/quality_assessment/utils.py +10 -0
- bioprofilekit-1.0.0/src/static/__init__.py +0 -0
- bioprofilekit-1.0.0/src/static/assets/__init__.py +0 -0
- bioprofilekit-1.0.0/src/static/assets/favicon/__init__.py +0 -0
- bioprofilekit-1.0.0/src/static/assets/favicon/android-chrome-192x192.png +0 -0
- bioprofilekit-1.0.0/src/static/assets/favicon/android-chrome-512x512.png +0 -0
- bioprofilekit-1.0.0/src/static/assets/favicon/favicon-16x16.png +0 -0
- bioprofilekit-1.0.0/src/static/assets/favicon/favicon-32x32.png +0 -0
- bioprofilekit-1.0.0/src/static/assets/favicon.ico +0 -0
- bioprofilekit-1.0.0/src/static/assets/github.svg +3 -0
- bioprofilekit-1.0.0/src/static/assets/logo.png +0 -0
- bioprofilekit-1.0.0/src/static/css/__init__.py +0 -0
- bioprofilekit-1.0.0/src/static/css/bootstrap-grid.css +4085 -0
- bioprofilekit-1.0.0/src/static/css/bootstrap-grid.rtl.css +4084 -0
- bioprofilekit-1.0.0/src/static/css/bootstrap-reboot.css +597 -0
- bioprofilekit-1.0.0/src/static/css/bootstrap-reboot.rtl.css +594 -0
- bioprofilekit-1.0.0/src/static/css/bootstrap-utilities.css +5402 -0
- bioprofilekit-1.0.0/src/static/css/bootstrap-utilities.rtl.css +5393 -0
- bioprofilekit-1.0.0/src/static/css/bootstrap.css +12063 -0
- bioprofilekit-1.0.0/src/static/css/bootstrap.rtl.css +12030 -0
- bioprofilekit-1.0.0/src/static/css/cb.css +410 -0
- bioprofilekit-1.0.0/src/static/js/__init__.py +0 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.bundle.js +6314 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.bundle.js.map +1 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.bundle.min.js +7 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.bundle.min.js.map +1 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.esm.js +4447 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.esm.js.map +1 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.esm.min.js +7 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.esm.min.js.map +1 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.js +4494 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.js.map +1 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.min.js +7 -0
- bioprofilekit-1.0.0/src/static/js/bootstrap.min.js.map +1 -0
- bioprofilekit-1.0.0/src/static/js/bpk_plot.js +30 -0
- bioprofilekit-1.0.0/src/templates/LandingPage.jinja +136 -0
- bioprofilekit-1.0.0/src/templates/__init__.py +0 -0
- bioprofilekit-1.0.0/src/templates/columns.jinja +3208 -0
- bioprofilekit-1.0.0/src/templates/general_statistics.jinja +735 -0
- bioprofilekit-1.0.0/src/templates/numeric_overview.jinja +611 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Sonja Diedrich & Maria Hansen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
include LICENSE README.md pyproject.toml setup.py
|
|
3
|
+
|
|
4
|
+
recursive-include src *.pyx
|
|
5
|
+
recursive-include src *.c
|
|
6
|
+
|
|
7
|
+
#prune **
|
|
8
|
+
|
|
9
|
+
#recursive-include src/static/**/*
|
|
10
|
+
#recursive-include src/templates/*.jinja
|
|
11
|
+
graft src
|
|
12
|
+
#graft src/static
|
|
13
|
+
#graft src/templates
|
|
14
|
+
|
|
15
|
+
global-exclude __pycache__ *.py[cod] .* dist *.so .DS_Store
|
|
16
|
+
|
|
17
|
+
prune dist
|
|
18
|
+
prune build
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: BioProfileKit
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Automated exploratory data analysis and data quality profiling for biological tabular data
|
|
5
|
+
Author-email: Sonja Diedrich <sonja.diedrich@computational.bio.uni-giessen.de>, Maria Hansen <maria.hansen@computational.bio.uni-giessen.de>, "Julian M. Hahnfeld" <julian.hahnfeld@computational.bio.uni-giessen.de>, Felix Knopp <felix.knopp@stud.uni-giessen.de>
|
|
6
|
+
Maintainer-email: Sonja Diedrich <sonja.diedrich@computational.bio.uni-giessen.de>, Maria Hansen <maria.hansen@computational.bio.uni-giessen.de>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Project-URL: Homepage, https://bioprofilekit.computational.bio
|
|
9
|
+
Project-URL: Repository, https://github.com/BioWarlock/BioProfileKit
|
|
10
|
+
Project-URL: Issues, https://github.com/BioWarlock/BioProfileKit/issues
|
|
11
|
+
Project-URL: Changelog, https://github.com/BioWarlock/BioProfileKit/releases
|
|
12
|
+
Keywords: bioinformatics,data-analysis,proteomics,EDA,data-quality,profiling,data profiling
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Cython
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
21
|
+
Requires-Python: >=3.13
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
Requires-Dist: click>=8.5.1
|
|
25
|
+
Requires-Dist: Jinja2>=3.1.6
|
|
26
|
+
Requires-Dist: numpy>=2.5.5
|
|
27
|
+
Requires-Dist: pandas>=3.1.2
|
|
28
|
+
Requires-Dist: plotly>=7.2
|
|
29
|
+
Requires-Dist: scipy>=1.18.1
|
|
30
|
+
Requires-Dist: termcolor>=3.3
|
|
31
|
+
Requires-Dist: pyarrow>=26.0.1
|
|
32
|
+
Requires-Dist: peptides>=0.5
|
|
33
|
+
Requires-Dist: requests>=2.34.2
|
|
34
|
+
Requires-Dist: goatools>=1.6.9
|
|
35
|
+
Requires-Dist: biopython>=1.88
|
|
36
|
+
Requires-Dist: weblogo>=3.9
|
|
37
|
+
Requires-Dist: scikit-learn>=1.9.1
|
|
38
|
+
Provides-Extra: dev
|
|
39
|
+
Requires-Dist: pytest>=9.2.0; extra == "dev"
|
|
40
|
+
Requires-Dist: pytest-cov>=7.1.0; extra == "dev"
|
|
41
|
+
Dynamic: license-file
|
|
42
|
+
|
|
43
|
+
# BioProfileKit
|
|
44
|
+
[](https://www.python.org/downloads/release/python-3130/) [](https://opensource.org/licenses/MIT)
|
|
45
|
+
[](https://github.com/BioWarlock/BioProfileKit/actions/workflows/pages/pages-build-deployment)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
## Overview
|
|
49
|
+
|
|
50
|
+
BioProfileKit is a domain-specific bioinformatics profiling tool for tabular biological data. It generates self-contained, interactive HTML reports covering exploratory data analysis, biological sequence profiling, and metadata validation — designed to be accessible to scientists without extensive data science skills.
|
|
51
|
+
|
|
52
|
+
Example report: [BioProfileKit Example](https://biowarlock.github.io/BioProfileKit/)
|
|
53
|
+
|
|
54
|
+
### Features
|
|
55
|
+
|
|
56
|
+
**Column-level EDA**
|
|
57
|
+
- Automated column type inference (numeric, categorical, sequence, metadata)
|
|
58
|
+
- Distributional metrics and quality flags per column type
|
|
59
|
+
- Numeric quality metrics: IQR, outlier detection (adjusted IQR, modified Z-score, standard Z-score), zero/negative/infinity counts
|
|
60
|
+
- Categorical imbalance metrics: class imbalance ratio, rare category detection, near-zero variance, top-1/top-5 coverage
|
|
61
|
+
- Collapsible filter bar with text search and quality flag toggles (AND/OR logic)
|
|
62
|
+
|
|
63
|
+
**Dataset-level EDA**
|
|
64
|
+
- Correlation and pairwise structure analysis: Pearson (numeric), Cramér's V (categorical), Eta² (mixed), combined association heatmap
|
|
65
|
+
- Duplicate detection with grouped duplicate-row reporting
|
|
66
|
+
- Missing value analysis: missingness matrix and per-column missing-value counts (missingness-mechanism tests such as Little's MCAR test are in progress)
|
|
67
|
+
- Target/feature analysis: feature–target association ranking, mutual information (with top-relationship plots), class balance
|
|
68
|
+
- Distribution overview: box plots and scatter matrix of numeric columns
|
|
69
|
+
- Interactive Plotly visualizations
|
|
70
|
+
|
|
71
|
+
**Biological Sequence Profiling**
|
|
72
|
+
- DNA/RNA: GC content, nucleotide distribution, k-mer frequencies, AT/GC skew, ambiguous base ratio, dinucleotide O/E ratios, codon completeness, low-complexity entropy, reverse complement duplicate detection
|
|
73
|
+
- Protein: amino acid composition and distribution, physicochemical properties (GRAVY, aliphatic index, charge, isoelectric point, instability index, and more)
|
|
74
|
+
- Sequence logos (WebLogo) for DNA/RNA and protein columns
|
|
75
|
+
- Configurable k-mer size and top-N reporting
|
|
76
|
+
|
|
77
|
+
**Biological Metadata Validation**
|
|
78
|
+
- Organism name and taxonomic identifier verification against NCBI Taxonomy (Cython-accelerated), with taxonomic composition sunburst plots
|
|
79
|
+
- UniProt validation against Swiss-Prot or TrEMBL, with per-column match badges
|
|
80
|
+
- Functional annotation validation against GO terms or COG categories, with summary plots
|
|
81
|
+
- Measurement column detection: units in column headers (e.g. `weight [kg]`) or in values (e.g. `5 mg/L`)
|
|
82
|
+
- Controlled vocabulary checks against official databases; reference data is cached locally and refreshed on a configurable schedule (see [Reference Data](#reference-data))
|
|
83
|
+
|
|
84
|
+
**Data Quality Assessment**
|
|
85
|
+
- Automated pass/warning/fail checks grouped by category (e.g. missingness, duplicates, sequence validity, taxonomy, functional annotation)
|
|
86
|
+
- Overall quality banner plus per-category and per-check summaries, with deep links into the relevant report section
|
|
87
|
+
|
|
88
|
+
**Interactive HTML Reports**
|
|
89
|
+
- Self-contained report folder (multi-page HTML with bundled assets) that opens in any browser, no server required
|
|
90
|
+
- Dynamic column filtering with quality flag toggles
|
|
91
|
+
- Colorblind-safe theme (Okabe-Ito palette) with persistent toggle
|
|
92
|
+
- WCAG AA accessible
|
|
93
|
+
|
|
94
|
+
## Project Structure
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
BioProfileKit/
|
|
98
|
+
├── src/
|
|
99
|
+
│ ├── analysis/ # Column-level and dataset-level EDA
|
|
100
|
+
│ ├── biological/ # Sequence profiling and metadata validation (taxonomy, UniProt, GO/COG)
|
|
101
|
+
│ ├── cli/ # CLI entry points (bioprofilekit, bioprofiledata) and report writer
|
|
102
|
+
│ ├── cython_wrapper/ # Cython-accelerated components
|
|
103
|
+
│ ├── data_utils/ # File I/O and remote reference-data access/caching
|
|
104
|
+
│ ├── enums/ # Shared enums and controlled vocabularies
|
|
105
|
+
│ ├── models/ # Data models per column type
|
|
106
|
+
│ ├── quality_assessment/ # Automated data-quality checks and report aggregation
|
|
107
|
+
│ ├── static/ # Static assets (CSS, JS, images) bundled into generated reports
|
|
108
|
+
│ └── templates/ # Jinja templates for reports
|
|
109
|
+
├── tests/
|
|
110
|
+
│ ├── unit/ # Unit tests per module
|
|
111
|
+
│ └── integration/ # End-to-end report-generation tests
|
|
112
|
+
├── benchmark/ # Benchmark data preparation (controlled anomaly injection)
|
|
113
|
+
└── docs/ # Example report served via GitHub Pages
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Web Application
|
|
117
|
+
|
|
118
|
+
BioProfileKit is also available as a hosted web service at [bioprofilekit.computational.bio](https://bioprofilekit.computational.bio/), for users who prefer not to install the CLI locally or who need to profile larger datasets without waiting on local report rendering. It wraps the same CLI core behind a Vue 3/TypeScript frontend and a FastAPI backend, runs analyses as jobs on de.NBI cloud infrastructure (Kubernetes), and authenticates via Keycloak/de.NBI AAI.
|
|
119
|
+
|
|
120
|
+
### Feedback / de.NBI User Survey
|
|
121
|
+
|
|
122
|
+
BioProfileKit is a service of [de.NBI](https://www.denbi.de), the German Network for Bioinformatics Infrastructure. Your feedback helps us improve BioProfileKit and secures continued funding for the de.NBI service portfolio. Please take a few minutes to fill in the **[de.NBI user survey](https://www.surveymonkey.de/r/denbi-service?sc=bigi&tool=bioprofilekit)**.
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
## Installation
|
|
126
|
+
|
|
127
|
+
Requires Python 3.13 or newer and a C compiler (for the Cython extensions).
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
make install
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
**Manual installation**
|
|
134
|
+
```bash
|
|
135
|
+
pip install -e .
|
|
136
|
+
python setup.py build_ext --inplace
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
## Usage
|
|
141
|
+
|
|
142
|
+
Supports `.csv`, `.tsv`, `.json`, and `.parquet` as input formats.
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
bioprofilekit -i input.csv
|
|
146
|
+
|
|
147
|
+
Options:
|
|
148
|
+
-i, --input PATH Input file (.tsv, .csv, .json, or .parquet) [required]
|
|
149
|
+
-t, --tax Enable taxonomy analysis
|
|
150
|
+
-u, --uniprot [swissprot|trembl] Enable UniProt validation against Swiss-Prot or TrEMBL
|
|
151
|
+
-f, --func [cog|go] Functional annotation validation (COG or GO)
|
|
152
|
+
-tc, --target_column TEXT Target column for further analysis
|
|
153
|
+
-k, --kmer INTEGER K-mer size for sequence analysis [default: 3]
|
|
154
|
+
-n, --top_n INTEGER Top N entries for reporting [default: 20; max: 20]
|
|
155
|
+
-h, --help Show this message and exit.
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Output
|
|
159
|
+
|
|
160
|
+
Results are written to `<input_name>_renders/` in the current working directory:
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
<input_name>_renders/
|
|
164
|
+
├── index.html # Landing page with the data-quality summary
|
|
165
|
+
├── numeric_data.html # Dataset overview
|
|
166
|
+
├── columns.html # Per-column profiles
|
|
167
|
+
├── general_statistics.html # Correlations, missing values, target analysis
|
|
168
|
+
├── results.json # Machine-readable results and run parameters
|
|
169
|
+
└── static/ # Bundled CSS, JS (incl. Plotly) and assets
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Open `index.html` in a browser to view the report.
|
|
173
|
+
|
|
174
|
+
> [!WARNING]
|
|
175
|
+
> For high-dimensional datasets with many columns, report rendering times may increase significantly. In such cases, the hosted web application at https://bioprofilekit.computational.bio/ is recommended.
|
|
176
|
+
|
|
177
|
+
## Reference Data
|
|
178
|
+
|
|
179
|
+
Taxonomy, GO, COG, and UniProt Swiss-Prot/TrEMBL reference data (used by `-t`/`-f`/`-u`) are downloaded on first use and cached locally — by default under `~/.local/share/bioprofilekit` (Linux/macOS), configurable via the `BPK_CACHE_DIR` environment variable. Each cache is considered fresh for 30 days and re-downloaded automatically once it expires.
|
|
180
|
+
|
|
181
|
+
To refresh the cache explicitly, ahead of time or outside of a report run:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
bioprofiledata --all # Taxonomy, GO, COG, and UniProt Swiss-Prot
|
|
185
|
+
bioprofiledata --tax --go # only selected datasets
|
|
186
|
+
bioprofiledata --all --force-refresh # ignore cache freshness
|
|
187
|
+
|
|
188
|
+
Options:
|
|
189
|
+
--tax Update NCBI Taxonomy
|
|
190
|
+
--go Update Gene Ontology
|
|
191
|
+
--cog Update COG groups
|
|
192
|
+
--uniprot Update UniProt Swiss-Prot
|
|
193
|
+
--all Update Taxonomy, GO, COG and Swiss-Prot ("not TrEMBL")
|
|
194
|
+
--force-refresh Update even if cache is still fresh
|
|
195
|
+
-h, --help Show this message and exit.
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Testing
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
pip install -e ".[dev]"
|
|
202
|
+
python setup.py build_ext --inplace
|
|
203
|
+
pytest --cov=src
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
CI (GitHub Actions) runs the test suite on pushes and pull requests to `main` and requires at least 70% coverage.
|
|
207
|
+
|
|
208
|
+
## Contributing
|
|
209
|
+
|
|
210
|
+
Contributions are welcome. For bug reports, feature requests, or enhancements, please open an issue or submit a pull request. For major changes, open an issue first to discuss alignment with project goals.
|
|
211
|
+
|
|
212
|
+
Please read the [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md) for contribution guidelines.
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
## License
|
|
216
|
+
|
|
217
|
+
Licensed under the MIT license ([LICENSE](LICENSE) or https://opensource.org/licenses/MIT).
|
|
218
|
+
Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion in BioProfileKit shall be licensed under the same terms.
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
## Contact
|
|
222
|
+
|
|
223
|
+
For inquiries or support, reach out via GitHub Issues or Discussions.
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
# BioProfileKit
|
|
2
|
+
[](https://www.python.org/downloads/release/python-3130/) [](https://opensource.org/licenses/MIT)
|
|
3
|
+
[](https://github.com/BioWarlock/BioProfileKit/actions/workflows/pages/pages-build-deployment)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Overview
|
|
7
|
+
|
|
8
|
+
BioProfileKit is a domain-specific bioinformatics profiling tool for tabular biological data. It generates self-contained, interactive HTML reports covering exploratory data analysis, biological sequence profiling, and metadata validation — designed to be accessible to scientists without extensive data science skills.
|
|
9
|
+
|
|
10
|
+
Example report: [BioProfileKit Example](https://biowarlock.github.io/BioProfileKit/)
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
|
|
14
|
+
**Column-level EDA**
|
|
15
|
+
- Automated column type inference (numeric, categorical, sequence, metadata)
|
|
16
|
+
- Distributional metrics and quality flags per column type
|
|
17
|
+
- Numeric quality metrics: IQR, outlier detection (adjusted IQR, modified Z-score, standard Z-score), zero/negative/infinity counts
|
|
18
|
+
- Categorical imbalance metrics: class imbalance ratio, rare category detection, near-zero variance, top-1/top-5 coverage
|
|
19
|
+
- Collapsible filter bar with text search and quality flag toggles (AND/OR logic)
|
|
20
|
+
|
|
21
|
+
**Dataset-level EDA**
|
|
22
|
+
- Correlation and pairwise structure analysis: Pearson (numeric), Cramér's V (categorical), Eta² (mixed), combined association heatmap
|
|
23
|
+
- Duplicate detection with grouped duplicate-row reporting
|
|
24
|
+
- Missing value analysis: missingness matrix and per-column missing-value counts (missingness-mechanism tests such as Little's MCAR test are in progress)
|
|
25
|
+
- Target/feature analysis: feature–target association ranking, mutual information (with top-relationship plots), class balance
|
|
26
|
+
- Distribution overview: box plots and scatter matrix of numeric columns
|
|
27
|
+
- Interactive Plotly visualizations
|
|
28
|
+
|
|
29
|
+
**Biological Sequence Profiling**
|
|
30
|
+
- DNA/RNA: GC content, nucleotide distribution, k-mer frequencies, AT/GC skew, ambiguous base ratio, dinucleotide O/E ratios, codon completeness, low-complexity entropy, reverse complement duplicate detection
|
|
31
|
+
- Protein: amino acid composition and distribution, physicochemical properties (GRAVY, aliphatic index, charge, isoelectric point, instability index, and more)
|
|
32
|
+
- Sequence logos (WebLogo) for DNA/RNA and protein columns
|
|
33
|
+
- Configurable k-mer size and top-N reporting
|
|
34
|
+
|
|
35
|
+
**Biological Metadata Validation**
|
|
36
|
+
- Organism name and taxonomic identifier verification against NCBI Taxonomy (Cython-accelerated), with taxonomic composition sunburst plots
|
|
37
|
+
- UniProt validation against Swiss-Prot or TrEMBL, with per-column match badges
|
|
38
|
+
- Functional annotation validation against GO terms or COG categories, with summary plots
|
|
39
|
+
- Measurement column detection: units in column headers (e.g. `weight [kg]`) or in values (e.g. `5 mg/L`)
|
|
40
|
+
- Controlled vocabulary checks against official databases; reference data is cached locally and refreshed on a configurable schedule (see [Reference Data](#reference-data))
|
|
41
|
+
|
|
42
|
+
**Data Quality Assessment**
|
|
43
|
+
- Automated pass/warning/fail checks grouped by category (e.g. missingness, duplicates, sequence validity, taxonomy, functional annotation)
|
|
44
|
+
- Overall quality banner plus per-category and per-check summaries, with deep links into the relevant report section
|
|
45
|
+
|
|
46
|
+
**Interactive HTML Reports**
|
|
47
|
+
- Self-contained report folder (multi-page HTML with bundled assets) that opens in any browser, no server required
|
|
48
|
+
- Dynamic column filtering with quality flag toggles
|
|
49
|
+
- Colorblind-safe theme (Okabe-Ito palette) with persistent toggle
|
|
50
|
+
- WCAG AA accessible
|
|
51
|
+
|
|
52
|
+
## Project Structure
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
BioProfileKit/
|
|
56
|
+
├── src/
|
|
57
|
+
│ ├── analysis/ # Column-level and dataset-level EDA
|
|
58
|
+
│ ├── biological/ # Sequence profiling and metadata validation (taxonomy, UniProt, GO/COG)
|
|
59
|
+
│ ├── cli/ # CLI entry points (bioprofilekit, bioprofiledata) and report writer
|
|
60
|
+
│ ├── cython_wrapper/ # Cython-accelerated components
|
|
61
|
+
│ ├── data_utils/ # File I/O and remote reference-data access/caching
|
|
62
|
+
│ ├── enums/ # Shared enums and controlled vocabularies
|
|
63
|
+
│ ├── models/ # Data models per column type
|
|
64
|
+
│ ├── quality_assessment/ # Automated data-quality checks and report aggregation
|
|
65
|
+
│ ├── static/ # Static assets (CSS, JS, images) bundled into generated reports
|
|
66
|
+
│ └── templates/ # Jinja templates for reports
|
|
67
|
+
├── tests/
|
|
68
|
+
│ ├── unit/ # Unit tests per module
|
|
69
|
+
│ └── integration/ # End-to-end report-generation tests
|
|
70
|
+
├── benchmark/ # Benchmark data preparation (controlled anomaly injection)
|
|
71
|
+
└── docs/ # Example report served via GitHub Pages
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Web Application
|
|
75
|
+
|
|
76
|
+
BioProfileKit is also available as a hosted web service at [bioprofilekit.computational.bio](https://bioprofilekit.computational.bio/), for users who prefer not to install the CLI locally or who need to profile larger datasets without waiting on local report rendering. It wraps the same CLI core behind a Vue 3/TypeScript frontend and a FastAPI backend, runs analyses as jobs on de.NBI cloud infrastructure (Kubernetes), and authenticates via Keycloak/de.NBI AAI.
|
|
77
|
+
|
|
78
|
+
### Feedback / de.NBI User Survey
|
|
79
|
+
|
|
80
|
+
BioProfileKit is a service of [de.NBI](https://www.denbi.de), the German Network for Bioinformatics Infrastructure. Your feedback helps us improve BioProfileKit and secures continued funding for the de.NBI service portfolio. Please take a few minutes to fill in the **[de.NBI user survey](https://www.surveymonkey.de/r/denbi-service?sc=bigi&tool=bioprofilekit)**.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
## Installation
|
|
84
|
+
|
|
85
|
+
Requires Python 3.13 or newer and a C compiler (for the Cython extensions).
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
make install
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Manual installation**
|
|
92
|
+
```bash
|
|
93
|
+
pip install -e .
|
|
94
|
+
python setup.py build_ext --inplace
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## Usage
|
|
99
|
+
|
|
100
|
+
Supports `.csv`, `.tsv`, `.json`, and `.parquet` as input formats.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
bioprofilekit -i input.csv
|
|
104
|
+
|
|
105
|
+
Options:
|
|
106
|
+
-i, --input PATH Input file (.tsv, .csv, .json, or .parquet) [required]
|
|
107
|
+
-t, --tax Enable taxonomy analysis
|
|
108
|
+
-u, --uniprot [swissprot|trembl] Enable UniProt validation against Swiss-Prot or TrEMBL
|
|
109
|
+
-f, --func [cog|go] Functional annotation validation (COG or GO)
|
|
110
|
+
-tc, --target_column TEXT Target column for further analysis
|
|
111
|
+
-k, --kmer INTEGER K-mer size for sequence analysis [default: 3]
|
|
112
|
+
-n, --top_n INTEGER Top N entries for reporting [default: 20; max: 20]
|
|
113
|
+
-h, --help Show this message and exit.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Output
|
|
117
|
+
|
|
118
|
+
Results are written to `<input_name>_renders/` in the current working directory:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
<input_name>_renders/
|
|
122
|
+
├── index.html # Landing page with the data-quality summary
|
|
123
|
+
├── numeric_data.html # Dataset overview
|
|
124
|
+
├── columns.html # Per-column profiles
|
|
125
|
+
├── general_statistics.html # Correlations, missing values, target analysis
|
|
126
|
+
├── results.json # Machine-readable results and run parameters
|
|
127
|
+
└── static/ # Bundled CSS, JS (incl. Plotly) and assets
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Open `index.html` in a browser to view the report.
|
|
131
|
+
|
|
132
|
+
> [!WARNING]
|
|
133
|
+
> For high-dimensional datasets with many columns, report rendering times may increase significantly. In such cases, the hosted web application at https://bioprofilekit.computational.bio/ is recommended.
|
|
134
|
+
|
|
135
|
+
## Reference Data
|
|
136
|
+
|
|
137
|
+
Taxonomy, GO, COG, and UniProt Swiss-Prot/TrEMBL reference data (used by `-t`/`-f`/`-u`) are downloaded on first use and cached locally — by default under `~/.local/share/bioprofilekit` (Linux/macOS), configurable via the `BPK_CACHE_DIR` environment variable. Each cache is considered fresh for 30 days and re-downloaded automatically once it expires.
|
|
138
|
+
|
|
139
|
+
To refresh the cache explicitly, ahead of time or outside of a report run:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
bioprofiledata --all # Taxonomy, GO, COG, and UniProt Swiss-Prot
|
|
143
|
+
bioprofiledata --tax --go # only selected datasets
|
|
144
|
+
bioprofiledata --all --force-refresh # ignore cache freshness
|
|
145
|
+
|
|
146
|
+
Options:
|
|
147
|
+
--tax Update NCBI Taxonomy
|
|
148
|
+
--go Update Gene Ontology
|
|
149
|
+
--cog Update COG groups
|
|
150
|
+
--uniprot Update UniProt Swiss-Prot
|
|
151
|
+
--all Update Taxonomy, GO, COG and Swiss-Prot ("not TrEMBL")
|
|
152
|
+
--force-refresh Update even if cache is still fresh
|
|
153
|
+
-h, --help Show this message and exit.
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Testing
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
pip install -e ".[dev]"
|
|
160
|
+
python setup.py build_ext --inplace
|
|
161
|
+
pytest --cov=src
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
CI (GitHub Actions) runs the test suite on pushes and pull requests to `main` and requires at least 70% coverage.
|
|
165
|
+
|
|
166
|
+
## Contributing
|
|
167
|
+
|
|
168
|
+
Contributions are welcome. For bug reports, feature requests, or enhancements, please open an issue or submit a pull request. For major changes, open an issue first to discuss alignment with project goals.
|
|
169
|
+
|
|
170
|
+
Please read the [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md) for contribution guidelines.
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
## License
|
|
174
|
+
|
|
175
|
+
Licensed under the MIT license ([LICENSE](LICENSE) or https://opensource.org/licenses/MIT).
|
|
176
|
+
Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion in BioProfileKit shall be licensed under the same terms.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
## Contact
|
|
180
|
+
|
|
181
|
+
For inquiries or support, reach out via GitHub Issues or Discussions.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools>=84.0.0",
|
|
4
|
+
"wheel>=0.44.0",
|
|
5
|
+
"cython>=3.3.0",
|
|
6
|
+
"numpy>=2.5.3"
|
|
7
|
+
]
|
|
8
|
+
build-backend = "setuptools.build_meta"
|
|
9
|
+
|
|
10
|
+
[project]
|
|
11
|
+
name = "BioProfileKit"
|
|
12
|
+
version = "1.0.0"
|
|
13
|
+
description = "Automated exploratory data analysis and data quality profiling for biological tabular data"
|
|
14
|
+
readme = "README.md"
|
|
15
|
+
authors = [
|
|
16
|
+
{name = "Sonja Diedrich", email = "sonja.diedrich@computational.bio.uni-giessen.de"},
|
|
17
|
+
{name = "Maria Hansen", email = "maria.hansen@computational.bio.uni-giessen.de"},
|
|
18
|
+
{name = "Julian M. Hahnfeld", email="julian.hahnfeld@computational.bio.uni-giessen.de"},
|
|
19
|
+
{name = "Felix Knopp", email="felix.knopp@stud.uni-giessen.de"},
|
|
20
|
+
|
|
21
|
+
]
|
|
22
|
+
maintainers = [
|
|
23
|
+
{name = "Sonja Diedrich", email = "sonja.diedrich@computational.bio.uni-giessen.de"},
|
|
24
|
+
{name = "Maria Hansen", email = "maria.hansen@computational.bio.uni-giessen.de"}
|
|
25
|
+
]
|
|
26
|
+
license = "MIT"
|
|
27
|
+
license-files = ["LICENSE"]
|
|
28
|
+
requires-python = ">=3.13"
|
|
29
|
+
keywords = ["bioinformatics", "data-analysis", "proteomics", "EDA", "data-quality", "profiling", "data profiling"]
|
|
30
|
+
classifiers = [
|
|
31
|
+
"Development Status :: 3 - Alpha", #ToDo Change before 1.0
|
|
32
|
+
"Intended Audience :: Science/Research",
|
|
33
|
+
"Operating System :: OS Independent",
|
|
34
|
+
"Programming Language :: Python :: 3",
|
|
35
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
36
|
+
"Programming Language :: Python :: 3.13",
|
|
37
|
+
"Programming Language :: Cython",
|
|
38
|
+
"Topic :: Scientific/Engineering :: Bio-Informatics",
|
|
39
|
+
]
|
|
40
|
+
dependencies = [
|
|
41
|
+
"click>=8.5.1",
|
|
42
|
+
"Jinja2>=3.1.6",
|
|
43
|
+
"numpy>=2.5.5",
|
|
44
|
+
"pandas>=3.1.2",
|
|
45
|
+
"plotly>=7.2",
|
|
46
|
+
"scipy>=1.18.1",
|
|
47
|
+
"termcolor>=3.3",
|
|
48
|
+
"pyarrow>=26.0.1",
|
|
49
|
+
"peptides>=0.5",
|
|
50
|
+
"requests>=2.34.2",
|
|
51
|
+
"goatools>=1.6.9",
|
|
52
|
+
"biopython>=1.88",
|
|
53
|
+
"weblogo>=3.9",
|
|
54
|
+
"scikit-learn>=1.9.1",
|
|
55
|
+
]
|
|
56
|
+
|
|
57
|
+
[project.urls]
|
|
58
|
+
Homepage = "https://bioprofilekit.computational.bio"
|
|
59
|
+
Repository = "https://github.com/BioWarlock/BioProfileKit"
|
|
60
|
+
Issues = "https://github.com/BioWarlock/BioProfileKit/issues"
|
|
61
|
+
Changelog = "https://github.com/BioWarlock/BioProfileKit/releases"
|
|
62
|
+
|
|
63
|
+
[project.optional-dependencies]
|
|
64
|
+
dev = [
|
|
65
|
+
"pytest>=9.2.0",
|
|
66
|
+
"pytest-cov>=7.1.0",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[tool.setuptools]
|
|
70
|
+
package-dir = {"" = "src"}
|
|
71
|
+
packages = {find = {where = ["src"]}}
|
|
72
|
+
include-package-data = true
|
|
73
|
+
|
|
74
|
+
[tool.setuptools.package-data]
|
|
75
|
+
"static" = ["static/**/*"]
|
|
76
|
+
"templates" = ["*.jinja"]
|
|
77
|
+
#"cython" = ["*.pyx"]
|
|
78
|
+
|
|
79
|
+
[tool.setuptools.exclude-package-data]
|
|
80
|
+
"*" = [
|
|
81
|
+
"*.pyc",
|
|
82
|
+
"*/__pycache__/*",
|
|
83
|
+
"*.egg-info"
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
[tool.pytest.ini_options]
|
|
87
|
+
testpaths = ["tests"]
|
|
88
|
+
pythonpath = ["src"]
|
|
89
|
+
addopts = "--tb=short -q"
|
|
90
|
+
strict = true
|
|
91
|
+
|
|
92
|
+
[tool.coverage.run]
|
|
93
|
+
source = ["src"]
|
|
94
|
+
omit = ["src/cython_wrapper/*"]
|
|
95
|
+
|
|
96
|
+
[tool.coverage.report]
|
|
97
|
+
exclude_lines = [
|
|
98
|
+
"pragma: no cover",
|
|
99
|
+
"if __name__ == .__main__.:",
|
|
100
|
+
"raise NotImplementedError",
|
|
101
|
+
]
|
|
102
|
+
show_missing = true
|
|
103
|
+
skip_empty = true
|
|
104
|
+
|
|
105
|
+
[project.scripts]
|
|
106
|
+
bioprofilekit = "cli.app:cli"
|
|
107
|
+
bioprofiledata = "cli.update_remote_data:update"
|
|
108
|
+
|
|
109
|
+
[tool.cibuildwheel]
|
|
110
|
+
build = "cp313-* cp314-*"
|
|
111
|
+
skip = "*-musllinux_* *-win32 *_i686"
|
|
112
|
+
test-command = "bioprofilekit --help"
|
|
113
|
+
|
|
114
|
+
[tool.cibuildwheel.macos]
|
|
115
|
+
archs = ["arm64", "x86_64"]
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import sysconfig
|
|
2
|
+
import numpy as np
|
|
3
|
+
from Cython.Build import cythonize
|
|
4
|
+
from setuptools import setup, Extension
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def get_python_include_dir():
|
|
8
|
+
return sysconfig.get_path('include')
|
|
9
|
+
|
|
10
|
+
extensions = [
|
|
11
|
+
Extension(
|
|
12
|
+
"cython_wrapper.wrapper_utils",
|
|
13
|
+
["src/cython_wrapper/wrapper_utils.pyx"],
|
|
14
|
+
),
|
|
15
|
+
Extension(
|
|
16
|
+
"cython_wrapper.taxonomy_validator",
|
|
17
|
+
["src/cython_wrapper/taxonomy_validator.pyx"],
|
|
18
|
+
),
|
|
19
|
+
Extension("cython_wrapper.medcouple_fast",
|
|
20
|
+
["src/cython_wrapper/medcouple_fast.pyx"],
|
|
21
|
+
include_dirs=[np.get_include()])
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
# Metadata (name, version, packages) comes from pyproject.toml;
|
|
25
|
+
# setup.py only defines the Cython extensions.
|
|
26
|
+
setup(
|
|
27
|
+
ext_modules=cythonize(extensions, compiler_directives={'language_level': "3"}, force=True),
|
|
28
|
+
)
|