Skip to content

Commit b284960

Browse files
author
vsc20958
committed
.
1 parent 8fdd3b4 commit b284960

7 files changed

Lines changed: 47 additions & 10 deletions

File tree

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Python build artifacts
2+
__pycache__/
3+
*.py[cod]
4+
*.so
5+
6+
## Packaging
7+
build/
8+
dist/
9+
*.egg-info/
10+
11+
## Virtual environments
12+
.venv/
13+
venv/
14+
ENV/
15+
16+
## Tooling caches
17+
.pytest_cache/
18+
.mypy_cache/
19+
.ruff_cache/
20+

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# RecMpox
22

3+
Current release: **v0.0.2**
4+
35
RecMpox is a command-line tool that **flags potential recombination events** in monkeypox viruses. It does not confirm recombination, but highlights genomes that may be recombinant and warrant further investigation. RecMpox works by detecting regions within a genome that appear to originate from two different parental viruses. Such patterns are not conclusive evidence of recombination, as similar signals can also arise from shared ancestral variation, convergent mutations, mixed populations (e.g., co-infections or laboratory contamination), or sequencing and assembly errors.
46

57

@@ -27,9 +29,10 @@ bash Miniconda3-latest-Linux-x86_64.sh
2729

2830
Then, ensure you have the required channels:
2931
```bash
30-
conda config --add channels defaults
31-
conda config --add channels bioconda
3232
conda config --add channels conda-forge
33+
conda config --add channels bioconda
34+
conda config --add channels defaults
35+
conda config --set channel_priority strict
3336
```
3437

3538
### Option 1: Using Conda (Recommended)
@@ -71,15 +74,15 @@ conda activate recmpox
7174
```bash
7275
# Use built-in references: Ia vs Ib or IIa vs IIb (sequences downloaded automatically)
7376
recmpox -i fasta/ -o output -ref Ia,Ib -t 4
74-
recmpox -i fasta/ -o output -ref IIa,IIb -t 4
77+
recmpox -i fasta/ -o output -ref Ib,IIb -t 4
7578

7679
# Input can be: FASTA file, directory of .fa/.fasta/.fna, or NCBI accession(s)
7780
recmpox -i consensus.fa -o output -ref Ia,Ib
78-
recmpox -i OZ375330.1,PX739443.1 -o output -ref IIa,IIb
81+
recmpox -i OZ375330.1 -o output -ref Ib,IIb # UK recombinant case example
7982
recmpox -i accessions.txt -o output -ref Ia,Ib # one accession per line or comma-separated
8083
```
8184

82-
**Note**: Either `-ref` (e.g. `Ia,Ib` or `IIa,IIb`) or both `-ref1` and `-ref2` are required. With `-ref`, default references are used (Ia=OZ254474.1, Ib=PP601219.1, IIa=OZ287284.1, IIb=NC_063383.1).
85+
**Note**: Either `-ref` (e.g. `Ia,Ib`, `IIa,IIb`, or `Ib,IIb`) or both `-ref1` and `-ref2` are required. With `-ref`, default references are used (Ia=OZ254474.1, Ib=PP601219.1, IIa=OZ287284.1, IIb=NC_063383.1).
8386

8487
### Command-line options
8588

conda-recipes/meta.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ build:
1414
noarch: python
1515
entry_points:
1616
- recmpox=recmpox.recmpox:main
17+
- rempox=recmpox.recmpox:main
1718
script:
1819
- "{{ PYTHON }} -m pip install . --no-deps --no-build-isolation -vvv"
1920
- mkdir -p $PREFIX/etc/conda/activate.d

recmpox/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""RecMpox: Classify consensus mpox genomes at diagnostic SNPs (recombinant calling)."""
22

3-
__version__ = "0.0.2"
3+
from ._version import __version__
44

55
from .recmpox import main
66

recmpox/_version.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__version__ = "0.0.2"
2+

recmpox/recmpox.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from pathlib import Path
3232
from typing import Any, Dict, List, Optional, Tuple
3333

34+
from ._version import __version__
3435
from .diagnostic_snp import (
3536
allegiance_summary,
3637
allegiance_summary_snp_only,
@@ -1198,14 +1199,16 @@ def split_fasta_into_seqs(fasta: Path, out_dir: Path) -> List[Path]:
11981199

11991200
def main() -> None:
12001201
parser = argparse.ArgumentParser(
1201-
description="RecMpox: Recombination flagging of mpox sequences (Ia vs Ib).",
1202+
prog="recmpox",
1203+
description=f"RecMpox v{__version__}: Flag potential recombination in mpox consensus genomes using diagnostic sites between two reference lineages.",
12021204
formatter_class=argparse.RawDescriptionHelpFormatter,
12031205
add_help=False,
12041206
epilog="""
12051207
Examples:
1206-
# Use built-in defaults: -ref Ia,Ib (ref1=OZ254474.1, ref2=PP601219.1) or -ref IIa,IIb
1208+
# Use built-in defaults (Ia=OZ254474.1, Ib=PP601219.1, IIa=OZ287284.1, IIb=NC_063383.1)
12071209
recmpox -i fasta/ -o output -ref Ia,Ib
1208-
recmpox -i fasta/ -o output -ref IIa,IIb
1210+
recmpox -i OZ375330.1 -o output -ref Ib,IIb # UK recombinant case example
1211+
recmpox -i accessions.txt -o output -ref Ia,Ib
12091212
12101213
# Override references: -ref1/-ref2 with optional -ref1_g/-ref2_g
12111214
recmpox -i fasta/ -o output -ref1 NC_003310.1 -ref2 PP601219.1 -ref1_g Ia -ref2_g Ib
@@ -1216,8 +1219,9 @@ def main() -> None:
12161219
required = parser.add_argument_group("required arguments (must specify when running)")
12171220
optional = parser.add_argument_group("optional arguments")
12181221
parser.add_argument("-h", "-help", "--help", action="help", help="show this help message and exit")
1222+
optional.add_argument("--version", action="version", version=f"RecMpox v{__version__}")
12191223
required.add_argument("-i", "-input", dest="input", type=Path, default=None, metavar="", help="FASTA file, directory of .fa/.fasta/.fna, .txt file of accessions (one per line or comma-separated), NCBI accession, or comma-separated accessions (e.g. -i ACC1,ACC2 or -i accessions.txt)")
1220-
required.add_argument("-ref", dest="ref", type=str, default=None, metavar="", help="Reference pair: comma-separated subclade labels, e.g. Ia,Ib or IIa,IIb. Uses built-in defaults. Either -ref or both -ref1 and -ref2 are required.")
1224+
required.add_argument("-ref", dest="ref", type=str, default=None, metavar="", help="Reference pair: two comma-separated labels among Ia, Ib, IIa, IIb (e.g. Ia,Ib or Ib,IIb). Uses built-in defaults. Either -ref or both -ref1 and -ref2 are required.")
12211225
required.add_argument("-ref1", type=str, default=None, metavar="", help="First reference: FASTA path or NCBI accession; overrides ref1 when using -ref. Required if -ref is not used.")
12221226
required.add_argument("-ref2", type=str, default=None, metavar="", help="Second reference: FASTA path or NCBI accession; overrides ref2 when using -ref. Required if -ref is not used.")
12231227
optional.add_argument("-o", "-output", dest="output_dir", type=str, default="output", metavar="", help="Output directory (default: output); path is relative to cwd; always removed and recreated at start of each run")
@@ -1227,6 +1231,12 @@ def main() -> None:
12271231
optional.add_argument("-min-indel-size", type=int, default=100, dest="min_indel_size", metavar="", help="Minimum indel length (bp) for diagnostic indels when using -include-indels (default: 100)")
12281232
optional.add_argument("-t", "-threads", dest="threads", type=int, default=1, metavar="", help="Specify number of threads to use (n=1 by default)")
12291233
optional.add_argument("-q", "-quiet", action="store_true", dest="quiet", help="Log to file only")
1234+
1235+
# If called with no arguments, show help (same output as --help) instead of erroring.
1236+
if len(sys.argv) == 1:
1237+
parser.print_help()
1238+
return
1239+
12301240
args = parser.parse_args()
12311241

12321242
if args.input is None:

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
entry_points={
1717
"console_scripts": [
1818
"recmpox=recmpox.recmpox:main",
19+
"rempox=recmpox.recmpox:main",
1920
],
2021
},
2122
classifiers=[

0 commit comments

Comments
 (0)