Format-aware concordance reports for bioinformatics pipeline outputs.
Project description
PipeConcord
pipeconcord is a Python toolkit for comparing bioinformatics pipeline outputs
with semantic, format-aware metrics. Instead of only checking whether files are
byte-for-byte identical, it measures whether two runs agree in biologically or
analytically meaningful ways.
Project website: https://qchiujunhao.github.io/pipeconcord/
Status: alpha. The core comparison model and initial comparators are usable, but APIs and metrics may change as more bioinformatics formats and workflows are validated.
Rename note: the first alpha release used the package name biocompare. Current
and future releases use pipeconcord to avoid confusion with an unrelated
life-science product directory.
This repository currently implements the Phase 1 vertical slice:
- a shared
ConcordanceReportmodel - comparator registry with plugin entry point support
- file type detection for common bioinformatics and tabular formats
- a differential expression result comparator
- a count/expression matrix comparator
- a normalized expression matrix comparator
- a BED interval comparator
- a FASTA/FASTQ sequence comparator
- a lightweight VCF comparator with ALT splitting and minimal allele trimming
- a
samtools flagstat/samtools statscomparator - a generic CSV/TSV table comparator
- JSON/text report writers
- a command-line interface
- automated tests with
unittest
Quickstart
Install from PyPI:
python3 -m pip install pipeconcord
The package is published at https://pypi.org/project/pipeconcord/. PipeConcord requires Python 3.10 or newer.
To test unreleased changes from the default branch, install from GitHub:
python3 -m pip install git+https://github.com/qchiujunhao/pipeconcord.git
Create two small TSV files:
cat > old.tsv <<'EOF'
gene_id value
A 1.0
B 2.0
EOF
cat > new.tsv <<'EOF'
gene_id value
A 1.1
B 2.0
EOF
Compare them by gene_id:
pipeconcord compare old.tsv new.tsv --key gene_id
Write a report to disk:
pipeconcord compare old.tsv new.tsv \
--key gene_id \
--output report.json
Compare differential expression tables:
pipeconcord compare old_de.tsv new_de.tsv \
--type deg \
--alpha 0.05
Compare count matrices:
pipeconcord compare old_counts.tsv new_counts.tsv \
--type counts
Compare normalized expression matrices:
pipeconcord compare old_tpm.tsv new_tpm.tsv \
--type expression
Compare BED intervals:
pipeconcord compare old_peaks.bed new_peaks.bed \
--type bed \
--min-reciprocal-overlap 0.5
Compare FASTA sequences:
pipeconcord compare old_sequences.fa new_sequences.fa \
--type fasta
Compare VCF calls:
pipeconcord compare old_calls.vcf new_calls.vcf \
--type vcf
Optionally provide a reference FASTA for simple repeated-indel left alignment:
pipeconcord compare calls_a.vcf calls_b.vcf \
--type vcf \
--reference-fasta reference.fa
Compare alignment summary statistics:
pipeconcord compare old_flagstat.txt new_flagstat.txt \
--type bam_stats
Run a batch comparison from a manifest:
pipeconcord batch manifest.tsv --format text
The manifest must contain file_a and file_b columns. Optional columns are
label and type.
Use --min-concordance in CI to fail when any comparison falls below a chosen
threshold:
pipeconcord batch manifest.tsv --min-concordance 0.95
Write an HTML report:
pipeconcord compare old_peaks.bed new_peaks.bed \
--type bed \
--format html \
--output report.html
Batch reports also support --format html.
Development
Install the repository in editable mode with development tools:
python3 -m pip install -e ".[dev]"
Run the tests:
python3 -m unittest discover -s tests
Run lint and coverage:
python3 -m ruff check .
python3 -m coverage run -m unittest discover -s tests
python3 -m coverage report
Plugin Model
Comparators subclass pipeconcord.comparators.base.Comparator and return a
pipeconcord.core.report.ConcordanceReport. Third-party packages can register
comparators with the pipeconcord.comparators entry point group.
Documentation
Additional documentation is available on the project website and in docs/,
including API notes, design rationale, and tutorials for regression testing,
RNA-seq outputs, variant calls, and BED peak comparisons.
Citation and Paper Draft
Citation metadata is available in CITATION.cff. A draft JOSS-style paper is
available under paper/.
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 Distribution
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 pipeconcord-0.2.0.tar.gz.
File metadata
- Download URL: pipeconcord-0.2.0.tar.gz
- Upload date:
- Size: 38.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07e39ff8c112da806c33a5e2a7b86a8fce91aa05645c69c00ad118819eca6193
|
|
| MD5 |
00318efde1e12b75e4998b6c1d7b0e12
|
|
| BLAKE2b-256 |
c3793baef4581cfdb0f27cb5ddbbe7272bda834e0b5611796f15cdb5e76a858f
|
Provenance
The following attestation bundles were made for pipeconcord-0.2.0.tar.gz:
Publisher:
publish-pypi.yml on qchiujunhao/pipeconcord
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipeconcord-0.2.0.tar.gz -
Subject digest:
07e39ff8c112da806c33a5e2a7b86a8fce91aa05645c69c00ad118819eca6193 - Sigstore transparency entry: 1810029207
- Sigstore integration time:
-
Permalink:
qchiujunhao/pipeconcord@ef65ac390dabb3bc1c91fc32dc7c30c359984232 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/qchiujunhao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ef65ac390dabb3bc1c91fc32dc7c30c359984232 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pipeconcord-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pipeconcord-0.2.0-py3-none-any.whl
- Upload date:
- Size: 43.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c95d2727cf725d295269abad9b34d508eb56ed9b8962e63e7fc95eb78d67797
|
|
| MD5 |
a4e6566df7f082dd62ef9ae9d31d787a
|
|
| BLAKE2b-256 |
0e0c81bef41b5dc6b0996459f4b5820922a4991e22eedb358e372dbd4b675018
|
Provenance
The following attestation bundles were made for pipeconcord-0.2.0-py3-none-any.whl:
Publisher:
publish-pypi.yml on qchiujunhao/pipeconcord
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pipeconcord-0.2.0-py3-none-any.whl -
Subject digest:
4c95d2727cf725d295269abad9b34d508eb56ed9b8962e63e7fc95eb78d67797 - Sigstore transparency entry: 1810029210
- Sigstore integration time:
-
Permalink:
qchiujunhao/pipeconcord@ef65ac390dabb3bc1c91fc32dc7c30c359984232 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/qchiujunhao
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@ef65ac390dabb3bc1c91fc32dc7c30c359984232 -
Trigger Event:
release
-
Statement type: