Skip to content

Python3 module for running MUMmer and reading the output

License

Notifications You must be signed in to change notification settings

eternal-bug/pymummer

 
 

Repository files navigation

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 [email protected].

Homebrew/LinuxBrew

brew tap homebrew/python
brew install pymummer

Using pip

pip3 install pymummer

Running the tests

The test can be run from the top level directory:

python setup.py test

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 [email protected].

About

Python3 module for running MUMmer and reading the output

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.4%
  • Shell 2.6%