Skip to content

Add TRANSFAC ↔ JASPAR motif format converters#358

Merged
cokelaer merged 2 commits intomainfrom
copilot/meme-motif-conversion
Mar 7, 2026
Merged

Add TRANSFAC ↔ JASPAR motif format converters#358
cokelaer merged 2 commits intomainfrom
copilot/meme-motif-conversion

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 6, 2026

Implements bidirectional conversion between TRANSFAC and JASPAR transcription factor binding motif formats, addressing the MEME motif conversion use case via biopython's Bio.motifs module.

Changes

  • bioconvert/core/extensions.py: Register jaspar (*.jaspar) and transfac (*.transfac, *.tf) format extensions
  • bioconvert/transfac2jaspar.py: New TRANSFAC2JASPAR converter; preserves AC/ID metadata fields as matrix_id/name in JASPAR output
  • bioconvert/jaspar2transfac.py: New JASPAR2TRANSFAC converter
  • test/data/transfac/, test/data/jaspar/: Sample motif files (2-motif sets: AGL3, RUNX1) used as fixtures

Usage

from bioconvert.transfac2jaspar import TRANSFAC2JASPAR
from bioconvert.jaspar2transfac import JASPAR2TRANSFAC

TRANSFAC2JASPAR("motifs.transfac", "motifs.jaspar")()
JASPAR2TRANSFAC("motifs.jaspar", "motifs.transfac")()

Both converters are auto-discovered by the registry and available via the CLI. Only dependency is biopython.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • meme-suite.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>meme motif conversion</issue_title>
<issue_description>https://meme-suite.org/meme/doc/motif_conversion.html</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: cokelaer <778821+cokelaer@users.noreply.github.com>
Copilot AI changed the title [WIP] Add functionality for meme motif conversion Add TRANSFAC ↔ JASPAR motif format converters Mar 6, 2026
@cokelaer cokelaer marked this pull request as ready for review March 7, 2026 21:03
@cokelaer cokelaer merged commit e0441f7 into main Mar 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

meme motif conversion

2 participants