Skip to content

Commit

Permalink
exposed cdhit length requirement in gene family clustering steps to a…
Browse files Browse the repository at this point in the history
…ddress #299
  • Loading branch information
gtonkinhill committed Sep 24, 2024
1 parent a4046ac commit f3d664a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions panaroo/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ def get_options(args):
dest="len_dif_percent",
help="length difference cutoff (default=0.98)",
type=float)
matching.add_argument("--family_len_dif_percent",
dest="family_len_dif_percent",
help="length difference cutoff at the gene family level (default=0.0)",
type=float)
matching.add_argument("--merge_paralogs",
dest="merge_paralogs",
help="don't split paralogs",
Expand Down Expand Up @@ -386,6 +390,7 @@ def main():
outdir=temp_dir,
dna_error_threshold=0.98,
correct_mistranslations=True,
family_len_dif_percent=args.family_len_dif_percent,
length_outlier_support_proportion=args.
length_outlier_support_proportion,
n_cpu=args.n_cpu,
Expand All @@ -401,6 +406,7 @@ def main():
outdir=temp_dir,
family_threshold=args.family_threshold,
correct_mistranslations=False,
family_len_dif_percent=args.family_len_dif_percent,
length_outlier_support_proportion=args.
length_outlier_support_proportion,
n_cpu=args.n_cpu,
Expand Down Expand Up @@ -454,6 +460,7 @@ def main():
outdir=temp_dir,
family_threshold=args.family_threshold,
correct_mistranslations=False,
family_len_dif_percent=args.family_len_dif_percent,
length_outlier_support_proportion=args.
length_outlier_support_proportion,
n_cpu=args.n_cpu,
Expand Down
3 changes: 3 additions & 0 deletions panaroo/clean_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def collapse_families(G,
outdir,
family_threshold=0.7,
dna_error_threshold=0.99,
family_len_dif_percent=0,
correct_mistranslations=False,
length_outlier_support_proportion=0.01,
n_cpu=1,
Expand All @@ -113,6 +114,7 @@ def collapse_families(G,
cdhit_clusters = iterative_cdhit(G,
outdir,
thresholds=threshold,
s=family_len_dif_percent,
n_cpu=n_cpu,
quiet=True,
dna=True,
Expand All @@ -124,6 +126,7 @@ def collapse_families(G,
cdhit_clusters = iterative_cdhit(G,
outdir,
thresholds=threshold,
s=family_len_dif_percent,
n_cpu=n_cpu,
quiet=True,
dna=False)
Expand Down

0 comments on commit f3d664a

Please sign in to comment.