Skip to content

sanger-pathogens/pymummer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pymummer

Python3 wrapper for running MUMmer and parsing the output.

Installation

###Pre-requisites###

The MUMmer package must be installed. Instructions to install MUMmer can be found here

###Installation###

Install with

pip3 install pymummer

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 promer class###

[TODO]

###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

Contact

Authors: Martin Hunt, Nishadi De Silva

Affiliation: Wellcome Trust Sanger Institute, Hinxton, UK

Email: path-help@sanger.ac.uk

About

Python3 module for running MUMmer and reading the output

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 9