Skip to content

Commit

Permalink
DEV: add argument to set number of marker genes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vini2 committed Jun 12, 2023
1 parent ce10511 commit 552ffd6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions metacoag
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ __status__ = "Stable Release"
# ---------------------------------------------------

MAX_WEIGHT = sys.float_info.max
M_MARKER_GENES = 108


# Setup argument parser
Expand Down Expand Up @@ -132,6 +131,14 @@ M_MARKER_GENES = 108
show_default=True,
required=False,
)
@click.option(
"--n_mg",
help="total number of marker genes.",
type=int,
default=108,
show_default=True,
required=False,
)
@click.option(
"--mg_threshold",
help="length threshold to consider marker genes.",
Expand Down Expand Up @@ -187,6 +194,7 @@ def main(
p_inter,
d_limit,
depth,
n_mg,
mg_threshold,
bin_mg_threshold,
min_bin_size,
Expand Down Expand Up @@ -1108,7 +1116,7 @@ def main(
bins_graph.add_edge(b, min_pb)
no_possible_bins = False

if no_possible_bins and len(bin_markers[b]) < M_MARKER_GENES * bin_mg_threshold:
if no_possible_bins and len(bin_markers[b]) < n_mg * bin_mg_threshold:
bins_to_rem.append(b)

bin_cliques = bins_graph.maximal_cliques()
Expand Down

0 comments on commit 552ffd6

Please sign in to comment.