Skip to main content

mtase-motif

mtase-motif finds bacterial DNA methyltransferase (MTase) candidates in a genome and assigns recognition motifs from annotated homologs.

The default sequence-first workflow combines:

  1. Prodigal gene prediction, unless a protein FASTA is supplied.
  2. HMMER searches against a curated Pfam subset and optional TIGRFAMs models.
  3. MMseqs2 or BLAST+ searches against motif-labeled REBASE proteins.
  4. Conservative motif transfer with explicit provenance and confidence.

The important scientific boundary is that motif assignment is homology-based. A genome alone usually does not contain enough information to determine an MTase recognition motif de novo. Candidates without adequate reference or methylation evidence are reported as unresolved; they are not given a fabricated motif.

Installation

The Python package supports Python 3.10 or newer:

python -m pip install mtasemotif
mtase-motif --version

Native tools are installed separately. A source checkout includes a conda environment with the tools needed for the core workflow:

git clone https://github.com/lrslab/mtasemotif.git
cd mtasemotif
conda env create -f environment.yml
conda activate mtase
python -m pip install .

Core runs require Prodigal when proteins are not supplied, HMMER, and either MMseqs2 or BLAST+. FIMO and TIGRFAMs are optional.

Database setup

Downloaded databases are not bundled in the wheel or source distribution. The default database directory is ~/.cache/mtase-motif/db.

mtase-motif db init
mtase-motif db fetch pfam
mtase-motif db fetch rebase
mtase-motif db index
mtase-motif db status

The default REBASE fetch uses a compact motif-labeled protein set plus REBASE withref records for exact methylation types (for example, Dam/GATC as m6A). Local Pfam or REBASE mirrors can be imported with --source:

mtase-motif db fetch pfam --source /path/to/Pfam-A.hmm.gz
mtase-motif db fetch rebase --source /path/to/rebase_directory
mtase-motif db index

TIGRFAMs is optional and local-source-only:

mtase-motif db fetch tigrfams --source /path/to/TIGRFAMs.hmm.gz
mtase-motif db index

See the database setup guide for offline REBASE protein requirements and the local database layout.

Pfam, TIGRFAMs, and REBASE remain third-party resources. No downloaded records are redistributed by this package; users are responsible for their respective access, license, and citation requirements.

Quick start

Check the genome, database, and native tools before starting:

mtase-motif doctor --genome genome.fna

Add --json for a machine-readable report and inspect its top-level ok and issues fields before launching a long run.

Run the complete sequence-first workflow:

mtase-motif run \
  --genome genome.fna \
  --out results/genome \
  -j 4

Use --db-dir with every database and run command when using a non-default database location. If proteins are already available, skip Prodigal:

mtase-motif run \
  --genome genome.fna \
  --proteins proteins.faa \
  --db-dir databases/mtase-motif \
  --out results/genome \
  -j 4

Supplying a protein FASTA skips gene prediction, but the current interface does not accept matching genomic coordinates. Neighborhood evidence is therefore unavailable for that mode; prefer the genome-only route when Type I system context is important.

The default balanced motif profile is appropriate for routine use. The sensitive profile admits more remote REBASE family evidence:

mtase-motif run \
  --genome genome.fna \
  --out results/genome-sensitive \
  --motif-sensitivity sensitive

Outputs

The output layout separates the routine result from audit-level detail:

File Contents
results.tsv Compact main result; exactly one row and 25 analysis-ready columns per MTase candidate
details/mtase_candidates.tsv Candidate-discovery audit table; exactly one row per candidate
details/motif_assignments.tsv Assignment evidence; one or more rows per candidate for primary, alternate, hint, or unresolved routes
details/methylation_support.tsv Experimental counts and confidence effects; generated only with --methylation-support
details/motif_loci.tsv Motif counts and density; generated only with --list-loci
run_manifest.json Schema/software versions, privacy-safe input hashes, database version, parameters, tool versions, relative outputs, and summary counts
artifacts/<candidate_id>/motif/pwm.meme MEME-format PWM for each candidate

candidate_id links results.tsv to every generated detail table. results.tsv is the table to use for routine analysis; the candidate and assignment detail tables explain discovery evidence and every assignment route. Internal files under work/ are deleted after a successful validation; use --keep-work only when debugging. The CLI validates candidate IDs and summary counts across the public outputs before reporting success.

For methylation fields, methylation is the normalized class (m6A, m5C, or m4C), and mod_position is 1-based within the displayed motif. methylation_source and mod_position_source explain how the main call was obtained. Raw REBASE notation such as 2(6) and conflict details remain in the assignment audit table. Named Dam/Dcm fallback is used only when both the enzyme name and its canonical motif agree. With no experimental support input, the main support state is not_provided; count and fraction columns are not added to the main table.

See the output schema for the table relationships, field definitions, controlled values, and null semantics.

Optional evidence

Methylation support

Provide a normalized support table to validate sequence-derived calls:

mtase-motif run \
  --genome genome.fna \
  --out results/genome \
  --methylation-support methylation_support.tsv

The table requires motif_iupac plus methylated and unmethylated instance counts. Candidate-specific evidence may rescue unresolved calls only when --methylation-rescue-unresolved is explicitly enabled.

Hammerhead motif output can be converted to this schema:

mtase-motif convert-hammerhead-support \
  --motifs-tsv motifs.tsv \
  --out-tsv methylation_support.tsv

Motif loci

Add --list-loci to scan the genome for resolved motifs and write FIMO and QC outputs plus details/motif_loci.tsv. The detail table still contains one row per candidate; unresolved candidates receive a blank motif, zero counts, and a no_motif warning. This requires FIMO from the MEME suite.

Retaining intermediates

Successful runs remove the large internal work/ directory by default. Keep it for troubleshooting with:

mtase-motif run \
  --genome genome.fna \
  --out results/genome \
  --keep-work

Development and release checks

python -m pip install -e '.[dev]'
make lint
make test
make package-check

Releases are built by GitHub Actions from tags matching the package version. After updating mtase_motif.__version__ and CHANGELOG.md, create a tag such as vX.Y.Z. The workflow verifies the tag, builds the wheel and source distribution, publishes through PyPI Trusted Publishing, and then creates the GitHub release using the matching CHANGELOG.md section as its release notes.

License

The package source is released under the MIT License. Downloaded third-party database content is not covered by this license and is not bundled.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mtasemotif-0.2.0.tar.gz (122.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mtasemotif-0.2.0-py3-none-any.whl (94.0 kB view details)

Uploaded Python 3

File details

Details for the file mtasemotif-0.2.0.tar.gz.

File metadata

  • Download URL: mtasemotif-0.2.0.tar.gz
  • Upload date:
  • Size: 122.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mtasemotif-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f58cfe8ddbf88bc4c8d79ac52a3668b15a1bf567d9ea78457cee9b80059c9e75
MD5 16b7c1413fe9f74eb228be972c85d785
BLAKE2b-256 f629b849d8bd62e3b621853c9965066ebdd0d995ccdbb3605d0f03c32e97a669

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtasemotif-0.2.0.tar.gz:

Publisher: release.yml on lrslab/mtasemotif

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtasemotif-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: mtasemotif-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 94.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mtasemotif-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57c63d56100561fb3e6f2c26020055d681c76e17b8f3b388337cbe97ff7bb950
MD5 362512b233d83bccaec54790c4a522dd
BLAKE2b-256 2d68a2041d08aff0942add9478baa6a88f1774846096eed8363598a703ca727a

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtasemotif-0.2.0-py3-none-any.whl:

Publisher: release.yml on lrslab/mtasemotif

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 files

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