Skip to content

Commit

Permalink
Dev (#739)
Browse files Browse the repository at this point in the history
* update help string

* Add --tandem_Nmax

* only keep lower and upper version
  • Loading branch information
tanghaibao authored Jan 8, 2025
1 parent 517f937 commit 114f8af
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
max-parallel: 4
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.8", "3.10", "3.12"]
python-version: ["3.8", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion src/jcvi/compara/blastfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def main(args):
type=float,
default=0.7,
help="retain hits that have good bitscore. a value of 0.5 means "
"keep all values that are 50% or greater of the best hit. "
"keep all values that are 50%% or greater of the best hit. "
"higher is more stringent",
)
p.add_argument("--exclude", help="Remove anchors from a previous run")
Expand Down
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 114f8af

Please sign in to comment.