diff --git a/circlator/start_fixer.py b/circlator/start_fixer.py index 18db867..9191b4a 100644 --- a/circlator/start_fixer.py +++ b/circlator/start_fixer.py @@ -14,6 +14,7 @@ def __init__(self, input_assembly_fa, outprefix, min_percent_identity=70, + promer_mincluster=None, genes_fa=None, ignore=None, verbose=False, @@ -33,6 +34,7 @@ def __init__(self, pyfastaq.tasks.file_to_dict(input_assembly_fa, self.input_assembly) self.min_percent_identity = min_percent_identity + self.promer_mincluster = promer_mincluster self.outprefix = os.path.abspath(outprefix) self.verbose = verbose @@ -108,7 +110,7 @@ def _write_fasta_plus_circularized_ends(cls, contigs, outfile, end_length, ignor @classmethod - def _find_circular_using_promer(cls, outprefix, ref_genes_fa, contigs_dict, min_percent_id, end_length, log_fh, ignore=None): + def _find_circular_using_promer(cls, outprefix, ref_genes_fa, contigs_dict, min_percent_id, end_length, log_fh, ignore=None, promer_mincluster=None): if ignore is None: ignore = set() promer_out = outprefix + '.promer' @@ -126,6 +128,7 @@ def _find_circular_using_promer(cls, outprefix, ref_genes_fa, contigs_dict, min_ promer=True, verbose=False, maxmatch=True, + mincluster=promer_mincluster, ) prunner.run() @@ -303,7 +306,8 @@ def run(self): self.min_percent_identity, end_extend, log_fh, - ignore=self.ignore + ignore=self.ignore, + promer_mincluster=self.promer_mincluster, ) if self.verbose: diff --git a/circlator/tasks/all.py b/circlator/tasks/all.py index 8ab2fb3..2009bf7 100644 --- a/circlator/tasks/all.py +++ b/circlator/tasks/all.py @@ -59,6 +59,7 @@ def run(): fixstart_group = parser.add_argument_group('fixstart options') fixstart_group.add_argument('--genes_fa', help='FASTA file of genes to search for to use as start point. If this option is not used, a built-in set of dnaA genes is used', metavar='FILENAME') + fixstart_group.add_argument('--fixstart_mincluster', type=int, help='The -c|mincluster option of promer. If this option is used, it overrides promer\'s default value', metavar='INT') fixstart_group.add_argument('--fixstart_min_id', type=float, help='Minimum percent identity of promer match between contigs and gene(s) to use as start point [%(default)s]', default=70, metavar='FLOAT') options = parser.parse_args() @@ -249,6 +250,7 @@ def run(): clean_fasta, fixstart_prefix, min_percent_identity=options.fixstart_min_id, + promer_mincluster=options.fixstart_mincluster, genes_fa=options.genes_fa, ignore=not_fix_start_file, verbose=options.verbose diff --git a/circlator/tasks/fixstart.py b/circlator/tasks/fixstart.py index abd1884..3c45ae5 100644 --- a/circlator/tasks/fixstart.py +++ b/circlator/tasks/fixstart.py @@ -7,6 +7,7 @@ def run(): usage = 'circlator fixstart [options] ') parser.add_argument('--genes_fa', help='FASTA file of genes to search for to use as start point. If this option is not used, a built-in set of dnaA genes is used', metavar='FILENAME') parser.add_argument('--ignore', help='Absolute path to file of IDs of contigs to not change', metavar='FILENAME') + parser.add_argument('--mincluster', type=int, help='The -c|mincluster option of promer. If this option is used, it overrides promer\'s default value', metavar='INT') parser.add_argument('--min_id', type=float, help='Minimum percent identity of promer match between contigs and gene(s) to use as start point [%(default)s]', default=70, metavar='FLOAT') parser.add_argument('--verbose', action='store_true', help='Be verbose') parser.add_argument('assembly_fa', help='Name of input FASTA file', metavar='assembly.fasta') @@ -17,6 +18,7 @@ def run(): options.assembly_fa, options.outprefix, min_percent_identity=options.min_id, + promer_mincluster=options.mincluster, genes_fa=options.genes_fa, ignore=options.ignore, verbose=options.verbose, diff --git a/setup.py b/setup.py index 83688e9..be4bb45 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( name='circlator', - version='1.3.1', + version='1.4.0', description='circlator: a tool to circularise genome assemblies', packages = find_packages(), package_data={'circlator': ['data/*']}, @@ -21,7 +21,7 @@ 'openpyxl', 'pyfastaq >= 3.12.1', 'pysam >= 0.8.1', - 'pymummer>=0.7.1', + 'pymummer>=0.9.0', ], license='GPLv3', classifiers=[