diff --git a/README.md b/README.md index 7c6a33b..dc19c15 100755 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ 2. [`profile`](https://pinellolab.github.io/crispr-bean/profile.html): Profile editing preferences of your editor. 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. **See more about the [model](https://pinellolab.github.io/crispr-bean/model.html) & [output](https://github.com/pinellolab/crispr-bean/tree/main/docs/example_run_output)** +5. [`run`](https://pinellolab.github.io/crispr-bean/run.html): Quantify targeted variants' effect sizes from screen data. **See more about the [model](https://pinellolab.github.io/crispr-bean/model.html) & [output](https://pinellolab.github.io/crispr-bean/run.html#output)** * Screen data is saved as [`ReporterScreen` object](https://pinellolab.github.io/crispr-bean/reporterscreen.html) 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). diff --git a/bean/notebooks/sample_quality_report.ipynb b/bean/notebooks/sample_quality_report.ipynb index dc0cef6..00a7fd1 100755 --- a/bean/notebooks/sample_quality_report.ipynb +++ b/bean/notebooks/sample_quality_report.ipynb @@ -262,17 +262,24 @@ "metadata": {}, "outputs": [], "source": [ - "ax = pt.qc.plot_lfc_correlation(\n", - " bdata,\n", - " selected_guides,\n", - " method=\"Spearman\",\n", - " cond1=comp_cond1,\n", - " cond2=comp_cond2,\n", - " rep_col=replicate_label,\n", - " compare_col=condition_label,\n", - " figsize=(10, 10),\n", - ")\n", - "\n", + "try:\n", + " ax = pt.qc.plot_lfc_correlation(\n", + " bdata,\n", + " selected_guides,\n", + " method=\"Spearman\",\n", + " cond1=comp_cond1,\n", + " cond2=comp_cond2,\n", + " rep_col=replicate_label,\n", + " compare_col=condition_label,\n", + " figsize=(10, 10),\n", + " )\n", + "except ValueError as e:\n", + " if \"rep_col\" in str(e):\n", + " raise ValueError(f\"Column `{replicate_label}` fed in with `--replicate-col {replicate_label}` does not exist in the input .h5ad file. Please check your input.\") from e\n", + " elif \"compare_col\" in str(e):\n", + " raise ValueError(f\"Column `{condition_label}` fed in with `--condition-col {condition_label}` does not exist in the input .h5ad file. Please check your input.\") from e\n", + " elif \"cond1\" in str(e):\n", + " raise ValueError(f\"Samples with `{condition_label}` value of `{comp_cond1}` or `{comp_cond2}` does not exist. Check your input argument fed in with `--lfc-conds `{comp_cond1},{comp_cond2}`.\")\n", "ax.set_title(\"top/bot LFC correlation, Spearman\")\n", "plt.yticks(rotation=0)\n", "plt.xticks(rotation=90)\n",