Skip to main content

MetaPont v0.1.4

MetaPont integrates existing metagenomic workflow outputs into per-sample and cross-sample tables for contigs, taxonomy, readmapping support, and eggNOG-mapper functional annotations. It is designed for outputs from the HuwsLab Metagenomic Workflow, but does not run assembly, readmapping, Kraken2, or eggNOG-mapper itself.

Installation

MetaPont requires Python 3.10 or later and has no required third-party runtime dependencies.

pip install MetaPont

Check the installed version and available commands with:

metapont --version
metapont --help

Input layout

Pass MetaPont the directory containing sample directories. Sample directories are selected when their names start with one of the comma-separated prefixes provided with --prefix.

workflow-output/
├── E1.0/
│   ├── E1.0_metaspades/contigs.fasta
│   ├── E1.0_pyrodigal/
│   ├── E1.0_eggnog_mapper/
│   │   └── E1.0_pyrodigal_eggnog_mapped.emapper.annotations
│   ├── E1.0_kraken2/
│   │   ├── E1.0_kraken2.txt
│   │   └── E1.0_kraken2_report.txt
│   └── E1.0_readmapped/
│       ├── E1.0_readmapped_contig_summary.txt
│       └── E1.0_readmapped_cds_summary.txt
└── E2.0/
    └── ...

MetaPont discovers common workflow naming variants and searches within each sample directory for the relevant files. The main inputs are:

Input Used for
eggNOG-mapper .emapper.annotations Gene annotations and functional features
Kraken2 contig classifications and report Contig taxonomic assignments and lineages
Readmapping contig summary Contig lengths, mapped-read counts, and mapping proportions
Readmapping CDS summary Read support attributed to annotated genes
Contig FASTA Contig inventory and lengths when a readmapping contig summary is absent

Inputs are discovered independently, so incomplete samples can still be included. Missing or empty core inputs are reported as warnings; MetaPont does not rerun missing upstream analyses. The inventory checks the files MetaPont actually consumes: contigs, Pyrodigal GFF/protein FASTA, eggNOG annotation TSV, Kraken2 per-contig output/report, and readmapping contig/CDS summaries. Optional sidecars (for example BAM/index, eggNOG XLSX, MPA report, Pyrodigal NT/QC files) do not make an otherwise usable MetaPont input set incomplete.

MetaPont deliberately does not use modification-time comparisons to decide whether outputs are stale. Scratch-retention commands such as touch can update timestamps without changing file contents, so timestamp ordering is not a reliable freshness test. The inventory reports presence/completeness, not whether an upstream tool was rerun against the latest source assembly. Kraken2 assignments shorter than the selected minimum contig length are omitted from taxonomy attribution by default. This filter does not rerun Kraken2.

Commands

Build integrated results

metapont run \
  --root-dir /path/to/workflow-output \
  --prefix E

--prefix accepts comma-separated values, for example E,L,P. By default, results are written under ROOT/MetaPont_Results. Override that location with --output-dir.

Useful options:

Option Default Description
--force Off Regenerate outputs even when the input signature matches a cached run.
--no-heal-flags Off Do not recreate missing upstream success flags when the required non-empty core outputs are present.
--min-contig-length N 2500 Minimum Kraken2-assigned contig length retained for taxonomy attribution; use 0 to disable the filter.
--taxon-function-abundance Off Build the expanded taxon-by-function table using a disk-backed SQLite aggregation. This adds disk I/O and temporary disk usage.
--signature-mode sampled Cache input detection. sampled hashes seven evenly spaced 128 KiB blocks from each input and is insensitive to touch; full hashes every byte and is slower but provides whole-file SHA256 verification.
--plots Off Write optional quick-look PNG plots. Requires the plots installation extra.

metapont combine is an alias for metapont run. The metapont-combine command is also available for compatibility with the earlier combine command.

Audit sample inputs

metapont inventory --root-dir /path/to/workflow-output --prefix E

The inventory reports discovered inputs, core output availability, success flags, and warnings for each sample. Add --heal-flags to recreate a missing stage flag only when the full expected product set for that upstream stage is present (including its QC/sidecar outputs where applicable). This is stricter than MetaPont's integration-input check, so it does not mark an upstream stage complete merely because MetaPont can consume a subset of its outputs. Timestamp freshness is intentionally not inferred.

Summarise readmapping coverage

metapont coverage \
  --root-dir /path/to/workflow-output \
  --prefix E \
  --read-length 150

The optional read length adds an approximate mapped-read coverage estimate. Without --output, the TSV is written to MetaPont_Results/summary/contig_coverage_summary.tsv.

Query functions and taxa

Find taxa supporting a functional ID:

metapont query-function \
  --root-dir /path/to/MetaPont_Results \
  --function-id GO:0016597 \
  --category GO \
  --rank Genus \
  --top 10 \
  --output go_taxa.tsv

Omit --category to search all supported annotation categories. --top limits the results to the highest-support taxa per sample. Alternatively, provide --gene-table to query a particular integrated gene table, or --output-dir to select a non-default results directory.

Find the most supported features associated with a taxon:

metapont query-taxon \
  --root-dir /path/to/MetaPont_Results \
  --taxon Bacillus \
  --category GO \
  --rank Genus \
  --top 20 \
  --output bacillus_go.tsv

Taxon matching is case-insensitive and searches the chosen rank as well as the full lineage. --category is required for this query. Both query commands accept an explicit --gene-table path; plain TSV and gzip-compressed TSV files are supported.

Build the expanded taxon-by-function table after a normal MetaPont run, without re-parsing the original eggNOG files or rerunning the integrated analysis:

metapont taxon-function-abundance \
  --root-dir /path/to/workflow-output

Alternatively, provide --gene-table to use an existing gene_annotations.tsv.gz. This post-processing command uses a temporary SQLite database to keep aggregation memory bounded. The output is written to MetaPont_Results/functional/taxon_function_abundance.tsv by default.

Results

The default output tree is:

MetaPont_Results/
├── combined/
│   ├── all_contigs.tsv.gz
│   └── gene_annotations.tsv.gz
├── functional/
│   ├── functional_abundance.tsv
│   ├── matrices/
│   └── taxon_function_abundance.tsv  # optional; only when requested
├── inventory/
│   └── sample_inventory.tsv
├── metadata/
│   ├── input_signature.json
│   └── run_manifest.json
├── per_sample_contigs/
│   └── SAMPLE_Contigs.tsv.gz
├── summary/
│   ├── pipeline_warnings.tsv
│   ├── sample_inventory.tsv
│   └── sample_summary.tsv
└── taxonomy/
    └── taxonomy_abundance.tsv

The main tables are tab-delimited; .tsv.gz files are gzip-compressed TSVs. Functional matrices are written separately for every supported annotation category, with both gene counts and gene read-support values. The optional taxon-function abundance table contains taxon/category/feature combinations across taxonomic ranks.

Supported functional categories include COG, eggNOG_OG, GO, EC, KEGG_KO, KEGG_Pathway, KEGG_Module, KEGG_Reaction, KEGG_rclass, BRITE, KEGG_TC, CAZy, BiGG_Reaction, and PFAM.

Gene_Read_Support is derived from read-to-CDS overlaps in the CDS summary; it is not a count of unique reads across genes. A read can support multiple genes or annotations, so functional support values are not mutually exclusive. Taxonomic relative abundance uses total mapped-read support as its denominator. The new Percent_Mapped_Reads_on_Classified_Contigs field in the sample summary shows how much of that denominator lies on Kraken-classified contigs.

Samples with missing or empty core workflow inputs are retained where possible and listed in summary/pipeline_warnings.tsv. The sample summary also reports genes processed versus genes with at least one functional feature, and readmapping support on Kraken-classified, unclassified, length-filtered and Kraken-unassigned contigs. Genes_Annotated remains for compatibility and is equivalent to Genes_Processed; use Genes_With_Function when you specifically mean genes with a parsed functional feature. A clean run writes MetaPont_analysis.success; a run with warnings writes completed_with_warnings.flag.

License

MetaPont is distributed under the GNU General Public License v3.0 or later.

Metadata

Release files for MetaPont 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MetaPont 0.1.4
File Size Uploaded Provenance Actions
metapont-0.1.4.tar.gz 62.8 kB Without provenance Details for metapont-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for MetaPont 0.1.4
File Interpreter ABI Platform Actions
metapont-0.1.4-py3-none-any.whl Python 3 none any Details for metapont-0.1.4-py3-none-any.whl

Total release size: 130.5 kB

Release files / metapont-0.1.4.tar.gz

Download URL metapont-0.1.4.tar.gz
Size 62.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d936fbe2b22470b46333d317ff7a70a9d04d9c99e357a0a990c2a6e964e46232
BLAKE2b-256 checksum
How to use checksums
5b0c248f75eb030e9e234a9c4e2663c5de3644f7ebcbfd37ca0df0ae1f9ecd2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Release files / metapont-0.1.4-py3-none-any.whl

Download URL metapont-0.1.4-py3-none-any.whl
Size 67.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aefa918c4eeaa9fc992a01cdad91deba2f58b6014acee8aa099b3afb64ddb6f3
BLAKE2b-256 checksum
How to use checksums
ce3090de98ea550fdfbd47fd25de44585e173b3e0a54f180dc2c62013bef580c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.9

Security for MetaPont 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page