Skip to content

Commit

Permalink
Merge pull request #136 from sjackman/no-fix-local
Browse files Browse the repository at this point in the history
unicycler_polish: Add option --no_fix_local
  • Loading branch information
rrwick authored Sep 5, 2018
2 parents 2621c37 + dc29e67 commit 49ce73e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/unicycler-polish.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Generic long reads:
Polishing settings:
Various settings for polishing behaviour (defaults should work well in most cases)
--no_fix_local do not fix local misassemblies (default: False)
--min_insert MIN_INSERT minimum valid short read insert size (default: auto)
--max_insert MAX_INSERT maximum valid short read insert size (default: auto)
--min_align_length MIN_ALIGN_LENGTH Minimum long read alignment length (default: 1000)
Expand Down
7 changes: 7 additions & 0 deletions unicycler/unicycler_polish.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def get_arguments():
settings_group = parser.add_argument_group('Polishing settings',
'Various settings for polishing behaviour '
'(defaults should work well in most cases)')
settings_group.add_argument('--no_fix_local', action='store_true',
help='do not fix local misassemblies')
settings_group.add_argument('--min_insert', type=int,
help='minimum valid short read insert size (default: auto)')
settings_group.add_argument('--max_insert', type=int,
Expand Down Expand Up @@ -410,6 +412,11 @@ def pilon_small_changes(fasta, round_num, args, all_ale_scores):


def pilon_large_changes(fasta, round_num, args, all_ale_scores):
if args.no_fix_local:
if args.verbosity > 0:
print('Not fixing local misassemblies', flush=True)
return fasta, round_num, []

current, round_num, applied_variant = ale_assessed_changes(fasta, round_num, args, True, False,
all_ale_scores, 'local',
'Pilon polish, large variants, '
Expand Down

0 comments on commit 49ce73e

Please sign in to comment.