Skip to content

Commit

Permalink
allow & test feeding no --allele-df-key for tiling run
Browse files Browse the repository at this point in the history
  • Loading branch information
jykr committed Mar 25, 2024
1 parent c858819 commit bfdf121
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bean/model/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def parse_args():
parser.add_argument(
"--allele-df-key",
type=str,
default="allele_counts",
default=None,
help="screen.uns[allele_df_key] will be used as the allele count.",
)
parser.add_argument(
Expand Down
1 change: 0 additions & 1 deletion bean/preprocessing/data_class.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,6 @@ def _post_init(
else:
allele_counts_selected = self.screen.uns[allele_df_key]
if control_guide_tag is not None:

def _set_uid_to_row(row):
if control_guide_tag in row.guide:
row[allele_col].set_uid(row.guide)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ def test_run_tiling_with_wo_negctrl_uniform():


@pytest.mark.order(24)
def test_run_tiling_negctrl():
cmd = "bean-run sorting tiling tests/data/tiling_mini_screen_annotated.h5ad --scale-by-acc --acc-bw-path tests/data/accessibility_signal.bw -o tests/test_res/tiling/ --allele-df-key allele_counts_spacer_0_19_A.G_translated_prop0.1_0.3 --fit-negctrl --negctrl-col strand --negctrl-col-value neg --control-guide-tag neg --repguide-mask None --n-iter 10"
def test_run_tiling_negctrl_allelekey():
cmd = "bean-run sorting tiling tests/data/tiling_mini_screen_annotated.h5ad --scale-by-acc --acc-bw-path tests/data/accessibility_signal.bw -o tests/test_res/tiling/ --fit-negctrl --negctrl-col strand --negctrl-col-value neg --control-guide-tag neg --repguide-mask None --n-iter 10"
try:
subprocess.check_output(
cmd,
Expand Down

0 comments on commit bfdf121

Please sign in to comment.