Skip to content

Commit

Permalink
allow no negative controls for variant screen
Browse files Browse the repository at this point in the history
  • Loading branch information
jykr committed May 3, 2024
1 parent 50d1aaf commit 0eeac65
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 453 deletions.
4 changes: 2 additions & 2 deletions bean/model/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ def parse_args(parser=None):
action="store_true",
)
parser.add_argument(
"--dont-adjust-confidence-by-negative-control",
"--no-negative-control",
action="store_true",
help="Adjust confidence by negative controls. For variant library_design, this uses negative control variants. For tiling library_design, adjusts confidence by synonymous edits.",
help="Do not adjust confidence by negative controls. Without this flag, variant mode will use negative control variants, and tiling mode will use the synonymous variants to adjust confidence of the result.",
)
parser.add_argument(
"--n-iter", # TODO: add check args
Expand Down
5 changes: 3 additions & 2 deletions bean/model/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

def check_args(args, bdata):
args.adjust_confidence_by_negative_control = (
not args.dont_adjust_confidence_by_negative_control
not args.no_negative_control
)
if args.scale_by_acc:
if args.acc_col is None and args.acc_bw_path is None:
Expand All @@ -43,7 +43,8 @@ def check_args(args, bdata):
if args.outdir is None:
args.outdir = os.path.dirname(args.bdata_path)
if args.library_design == "variant":
pass
if args.adjust_confidence_by_negative_control and (args.negctrl_col not in bdata.guides.columns):
raise ValueError(f"--negctrl-col argument '{args.negctrl_col}' not in ReporterScreen.guides.columns {bdata.guides.columns}. Please check the input or provide --no-negative-control flag if you don't have the negative controls.")
elif args.library_design == "tiling":
if args.allele_df_key is None:
key_to_use = "allele_counts"
Expand Down
161 changes: 0 additions & 161 deletions docs/_ldl_cds.md

This file was deleted.

125 changes: 0 additions & 125 deletions docs/_ldl_var.md

This file was deleted.

Loading

0 comments on commit 0eeac65

Please sign in to comment.