Skip to main content

pymummer

Python3 wrapper for running MUMmer and parsing the output.

Build Status
License: GPL v3
install with bioconda
Container ready

Contents

Introduction

Runs MUMmer and parses the output.

Installation

pymummer has the following dependencies:

Required dependencies

There are a number of ways to install pymummer and details are provided below. If you encounter an issue when installing pymummer please contact your local system administrator. If you encounter a bug please log it here or email us at path-help@sanger.ac.uk.

Homebrew/LinuxBrew

brew tap homebrew/python
brew install pymummer

Conda

We have provided conda environment recipes in this repo that can be used to create a fresh environment with the required dependencies. After creating a new env you can pip install pymummer from pypi or this repo using the commands in the next section.

# Create pymummer env 
conda env create -f environment.yml
# Activate env
conda activate pymummer
# Install pymummer
pip install pymummer

If you are using an M-Series Mac (ARM64 processor) you will need to create a mock Intel environment to install Mummer4 from Bioconda.

# Apple ARM64 Macs only
# Create mock Intel env
conda env create -f env_osx64.yml
# Activate env
conda activate pymummer-osx64
# Install pymummer
pip install pymummer

Pip install

Install from PyPi

pip3 install pymummer

Or pip install the latest development version directly from this repo.

pip3 install git+https://github.com/sanger-pathogens/pymummer.git

Running the tests

The test can be run from the top level directory:

pytest tests

Usage (for developers)

Example showing how pymummer can be used to run nucmer on a fasta file and parse the output file to produce a set of alignment objects:

from pymummer import coords_file, alignment, nucmer
...
runner = nucmer.Runner(reference_file, query_file, results_file) 
runner.run()
file_reader = coords_file.reader(results_file)
alignments = [coord for coord in file_reader if not coord.is_self_hit()] #Remove self hits
...

pymummer nucmer class

Wraps the nucmer, delta-filter, show-coords and show-snps commands.

Arguments:

__ref__			reference file  
__query__			query file  
__outfile__		output file  
__min\_id__		min\_id for delta-filter command (default None)  
__min\_length__	min\_length for delta-filter command (default None)  
__breaklen__		breaklen for nucmer command (nucmer's default is 200)   
__coords\_header__	print header in show-coords output (default True)  
__maxmatch__		maxmatch for nucmer (default False)  
__show\_snps__		run show-snps (default False)  
__snps\_header__ 	print header in show-snps output (default True)  

pymummer coords_file class

Parses the nucmer output and populate an alignment object for each hit in the output

pymummer alignment class

Check attributes of a hit, swap the reference and query, check if it's a self hit and so on

License

pymummer is free software, licensed under GPLv3.

Feedback/Issues

Please report any issues to the issues page or email path-help@sanger.ac.uk.

Download files

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

Source Distribution

pymummer-0.12.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

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

pymummer-0.12.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file pymummer-0.12.0.tar.gz.

File metadata

  • Download URL: pymummer-0.12.0.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pymummer-0.12.0.tar.gz
Algorithm Hash digest
SHA256 98568b9e616d95241ceda580be4bdca569379d91990d9b4acca0a4b97f17a694
MD5 448cc362e58df927eaa3d5401d9e06bd
BLAKE2b-256 aec11a4b8a1437bdea56f93612aa7860e7e8bbd9b6a7a4d893aa9affcead0b81

See more details on using hashes here.

File details

Details for the file pymummer-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: pymummer-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pymummer-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3eed8d2d53f76a6488903b6d6501aad5b6184d320f770541ee22d4ad0fa1ec87
MD5 f862347dd7c6c88f35cfd34ed6f294fb
BLAKE2b-256 0a41af0e5aacfe9486d38b941dbb3ee9469e41ad95d84b02ef30570d97853977

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 files

0.11.0

1 file

0.10.3

1 file

0.10.2

1 file

0.10.1

1 file

0.10.0

1 file

0.9.0

1 file

0.8.1

1 file

0.8.0

1 file

0.7.1

1 file

0.7.0

1 file

0.6.1

1 file

0.5.0

1 file

0.4.0

1 file

0.3.0

1 file

0.1.0

1 file

0.0.2

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page