Skip to content

Commit

Permalink
Add --tandem_Nmax
Browse files Browse the repository at this point in the history
  • Loading branch information
tanghaibao committed Jan 8, 2025
1 parent 9e82117 commit 7f976df
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/jcvi/compara/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,6 @@ def enrich(args):
(k, [x for x in leftover if info[x] == k]) for k in missing_taxa
)

# print genes, leftover
# print leftover_sorted_by_taxa
solutions = []
for solution in product(*leftover_sorted_by_taxa.values()):
score = sum(weights.get((a, b), 0) for a in solution for b in genes)
Expand Down Expand Up @@ -619,6 +617,12 @@ def ortholog(args):
action="store_true",
help="Run in full 1x1 mode, including blocks and RBH",
)
p.add_argument(
"--tandem_Nmax",
type=int,
default=10,
help="merge tandem genes within distance",
)
p.add_argument("--cscore", default=0.7, type=float, help="C-score cutoff")
p.add_argument(
"--dist", default=20, type=int, help="Extent of flanking regions to search"
Expand Down Expand Up @@ -714,8 +718,11 @@ def ortholog(args):

filtered_last = last + ".filtered"
if need_update(last, filtered_last, warn=True):
# If we are doing filtering based on another file then we don't run cscore anymore
dargs = [last, "--cscore={}".format(ccscore)]
dargs = [
last,
f"--cscore={ccscore}",
f"--tandem_Nmax={opts.tandem_Nmax}",
]
if exclude:
dargs += ["--exclude={}".format(exclude)]
if opts.no_strip_names:
Expand Down

0 comments on commit 7f976df

Please sign in to comment.