Skip to content

Commit

Permalink
mc + vignettes
Browse files Browse the repository at this point in the history
  • Loading branch information
elena-buscaroli committed Aug 23, 2024
1 parent 28f62b3 commit b637109
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 21 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ Imports:
patchwork,
scales,
quadprog,
progress
progress,
ggh4x
RoxygenNote: 7.3.1
URL: https://github.com/caravagnalab/bascule,
https://caravagnalab.github.io/bascule/
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Generated by roxygen2: do not edit by hand

S3method(plot,bascule_obj)
S3method(print,bascule_obj)
export(configure_environment)
export(fit)
Expand All @@ -13,6 +12,7 @@ export(have_loaded_env)
export(have_python_deps)
export(load_conda_env)
export(merge_clusters)
export(plot.bascule_obj)
export(plot_data)
export(plot_exposures)
export(plot_scores)
Expand Down
3 changes: 0 additions & 3 deletions R/plot_mutations.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#'
#' @return ggplot object.
#' @export
#'
#' @examples
#' plot_data(example_fit)
plot_data = function(x, types=get_types(x), samples=get_samples(x),
clusters=get_cluster_labels(x), reconstructed=TRUE,
color_by_sigs=FALSE) {
Expand Down
7 changes: 2 additions & 5 deletions R/print_S3.R
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,8 @@ print.bascule_obj = function(x, ...)
#'
#' @return Nothing.
#'
#' @export
#'
#' @examples
#' \dontrun{
#' }
#' @export plot.bascule_obj

plot.bascule_obj = function(x, ...)
{
stopifnot(inherits(x, "cnaqc"))
Expand Down
Binary file modified data/example_dataset.rda
Binary file not shown.
Binary file modified data/example_fit.rda
Binary file not shown.
4 changes: 0 additions & 4 deletions man/plot.bascule_obj.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions man/plot_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 7 additions & 4 deletions vignettes/articles/Inference.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ knitr::opts_chunk$set(
```{r setup, warning=FALSE, message=FALSE}
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
library(bascule)
configure_environment(use_default=TRUE)
reticulate::use_condaenv(condaenv="bascule-env")
reticulate::py_install(packages="pybascule",
envname="r-reticulate",
pip=TRUE,
python_version="3.9.16")
reticulate::use_condaenv(condaenv="r-reticulate")
py = reticulate::import("pybascule")
```

Expand Down Expand Up @@ -46,13 +49,13 @@ K_list = 0:7
Now, we can fit the model. Let's first fit the NMF to perform signatures deconvolution.
```{r}
x = fit(counts=counts, k_list=K_list, n_steps=3000,
reference_cat=reference_cat,
reference_cat=reference_cat,
keep_sigs=c("SBS1","SBS5"), # force fixed signatures
store_fits=TRUE, py=py)
```

```{r}
print(x)
x
```


Expand Down

0 comments on commit b637109

Please sign in to comment.