Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #739

Merged
merged 3 commits into from
Jan 8, 2025
Merged

Dev #739

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading