PhaMer
A Transformer that labels metagenomic contigs as phage or not from their protein-cluster tokens.
Molecules, proteins and genomics · 38 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 35.7M
- Operations
- 38
- Framework
- PyTorch
- Recurrent
- No
- Published
- Briefings in Bioinformatics (arXiv 2022)
- Cited by
- 61 (as of 27 October 2026)
- Authors
- Jiayu Shang, Xubo Tang, Ruocheng Guo, Yanni Sun
- Source
- GitHub: KennthShang/PhaMer
- License
- GPL-3.0
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m19303
- Graph hash
- 1ce0ef3beba5c5c0fb5efa12ea4dc699f1eed1ca16cd6171e2c4cbad742c4645
- Skeleton hash
- 63eec344d17c32478e25ef3d6ee1e67a938f9d33dee6ab4360eb6443898663f7
- Architecture hash
- 7b11053105358715085d4329659188aee92888e6dba0296cadc1720736aa2e12
- Diagram SHA-256
- 56562f6a1db3871f69653799a7243adce942161c1bbecf3e89effcec549a26b6
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
PhaMer is a tool for identifying bacteriophages, viruses that infect bacteria, in metagenomic data. The paper's motivation is that existing alignment-based or learning-based models had either low recall or low precision on metagenomic data.
PhaMer builds a protein-cluster vocabulary so that both the protein composition and the proteins' positions on each contig can be fed into a Transformer. In the words of the repository, the protein-based vocabulary converts DNA sequences into sentences. The Transformer learns the protein organization and associations using the self-attention mechanism and predicts the label for test contigs.
The authors tested PhaMer on RefSeq genomes, short contigs, simulated metagenomic data, mock metagenomic data and the public IMG/VR dataset. In the real metagenomic data experiment, they report that PhaMer improves the F1-score of phage detection by 27%. The repository notes that the program has since been moved to PhaBOX 2, where PhaMer is generalized to all kinds of viruses.
Key idea. PhaMer feeds the protein composition and protein positions of each contig into a Transformer through a protein-cluster vocabulary to identify phage contigs in metagenomic data.
- PhaMer
- phage identification
- bacteriophage identification
- phage detection
- metagenomics
- metagenomic data
- phage contigs
- protein-cluster vocabulary
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{shang2022accurateidentificationbacteriophagesmetagenomic,
title={Accurate identification of bacteriophages from metagenomic data using Transformer},
author={Jiayu Shang and Xubo Tang and Ruocheng Guo and Yanni Sun},
year={2022},
eprint={2201.04778},
archivePrefix={arXiv},
primaryClass={q-bio.GN},
doi={https://doi.org/10.1093/bib/bbac258},
url={https://arxiv.org/abs/2201.04778},
}