Skip to content

Commit

Permalink
fix unbounderror
Browse files Browse the repository at this point in the history
  • Loading branch information
jykr committed Mar 30, 2024
1 parent 076679e commit a51d1ba
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
1. [`count`](https://pinellolab.github.io/crispr-bean/count.html), [`count-samples`](https://pinellolab.github.io/crispr-bean/count_samples.html): Base-editing-aware **mapping** of guide, optionally with reporter from `.fastq` files.
* [`create-screen`](https://pinellolab.github.io/crispr-bean/create_screen.html) creates minimal ReporterScreen object from flat gRNA count file. Note that this way, allele counts are not included and many functionalities involving allele and edit counts are not supported.
2. [`profile`](https://pinellolab.github.io/crispr-bean/profile.html): Profile editing preferences of your editor.
3. [`qc`](#bean-qc-qc-of-reporter-screen-data): Quality control report and filtering out / masking of aberrant sample and guides
4. [`filter`](#bean-filter-filtering-and-optionally-translating-alleles): Filter reporter alleles; essential for `tiling` mode that allows for all alleles generated from gRNA.
5. [`run`](#bean-run-quantify-variant-effects): Quantify targeted variants' effect sizes from screen data.
3. [`qc`](https://pinellolab.github.io/crispr-bean/qc.html): Quality control report and filtering out / masking of aberrant sample and guides
4. [`filter`](https://pinellolab.github.io/crispr-bean/filter.html): Filter reporter alleles; essential for `tiling` mode that allows for all alleles generated from gRNA.
5. [`run`](https://pinellolab.github.io/crispr-bean/run.html): Quantify targeted variants' effect sizes from screen data.
* Screen data is saved as *ReporterScreen* object in the pipeline.
BEAN stores mapped gRNA and allele counts in `ReporterScreen` object which is compatible with [AnnData](https://anndata.readthedocs.io/en/latest/index.html). See [Data Structure](#data-structure) section for more information.
## Installation
Expand Down
2 changes: 2 additions & 0 deletions bean/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ def main(args):
negctrl_model, negctrl_guide, ndata_negctrl, num_steps=args.n_iter
)
)
else:
param_history_dict_negctrl = None

outfile_path = (
f"{prefix}/bean_element[sgRNA]_result.{model_label}{args.result_suffix}.csv"
Expand Down
4 changes: 2 additions & 2 deletions bean/model/readwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ def write_result_table(
fit_df = pd.DataFrame(param_dict)
if negctrl_params is not None:
print("Normalizing with common negative control distribution")
mu0 = negctrl_params["params"]["mu_loc"].detach().cpu().numpy()
mu0 = negctrl_params["mu_loc"].detach().cpu().numpy()
if sd_is_fitted:
sd0 = negctrl_params["params"]["sd_loc"].detach().exp().cpu().numpy()
sd0 = negctrl_params["sd_loc"].detach().exp().cpu().numpy()
else:
sd0 = 1.0
print(f"Fitted mu0={mu0}" + (f", sd0={sd0}." if sd_is_fitted else ""))
Expand Down

0 comments on commit a51d1ba

Please sign in to comment.