diff --git a/README.md b/README.md index d3cc224..e9e6f4f 100755 --- a/README.md +++ b/README.md @@ -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 diff --git a/bean/cli/run.py b/bean/cli/run.py index 55d8a59..b91457a 100755 --- a/bean/cli/run.py +++ b/bean/cli/run.py @@ -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" diff --git a/bean/model/readwrite.py b/bean/model/readwrite.py index b566790..c7cf181 100755 --- a/bean/model/readwrite.py +++ b/bean/model/readwrite.py @@ -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 ""))