Skip to content

Commit

Permalink
minor bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-calonaci committed Mar 15, 2024
1 parent 40e8487 commit 3c6f87d
Show file tree
Hide file tree
Showing 16 changed files with 74 additions and 129 deletions.
8 changes: 0 additions & 8 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
# Generated by roxygen2: do not edit by hand

S3method(plot,INCOMMON)
S3method(print,INCOMMON)
export(classification)
export(classify)
export(compute_posterior)
export(init)
export(parameters)
export(plot_classification)
export(plot_gene)
export(plot_summary)
export(posterior)
import(CNAqc)
import(cli)
import(crayon)
import(ggplot2)
import(ggridges)
import(ggsci)
import(pheatmap)
importFrom(dplyr,"%>%")
importFrom(dplyr,filter)
importFrom(dplyr,mutate)
Expand Down
2 changes: 1 addition & 1 deletion R/classify.R
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ classify = function(x,
purity = purity(x),
entropy_cutoff = entropy_cutoff,
rho = rho,
karyotypes = karyotypes,
karyotypes = karyotypes
)
})

Expand Down
10 changes: 6 additions & 4 deletions R/compute_posterior.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,11 @@ compute_posterior = function(NV,
# Classification label
label = paste0(Major + minor, 'N (Mutated: ', p, "N)")

if(!(label %in% priors$label)) cli::cli_alert_danger("Incomplete prior distribution!")
stopifnot(label %in% priors$label)
prior = prior %>% dplyr::filter(label == !!label) %>% dplyr::pull(p)
if(prior != 1){
if(!(label %in% priors$label)) cli::cli_alert_danger("Incomplete prior distribution!")
stopifnot(label %in% priors$label)
prior = prior %>% dplyr::filter(label == !!label) %>% dplyr::pull(p)
}

# Expected VAF peak of mixture component
expected_peak = expected_peaks[p]
Expand Down Expand Up @@ -136,4 +138,4 @@ compute_posterior = function(NV,

return(posterior)
}


2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pkgdown_sha: ~
articles:
Classify_Mutations: Classify_Mutations.html
INCOMMON: INCOMMON.html
last_built: 2024-03-15T18:52Z
last_built: 2024-03-15T19:08Z
urls:
reference: caravagnalab.github.io/INCOMMON/reference
article: caravagnalab.github.io/INCOMMON/articles
Expand Down
15 changes: 0 additions & 15 deletions docs/reference/index.html

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

20 changes: 16 additions & 4 deletions man/classification.Rd

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

3 changes: 2 additions & 1 deletion man/classify.Rd

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

22 changes: 12 additions & 10 deletions man/compute_posterior.Rd

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

14 changes: 14 additions & 0 deletions man/parameters.Rd

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

28 changes: 0 additions & 28 deletions man/plot.INCOMMON.Rd

This file was deleted.

4 changes: 2 additions & 2 deletions man/plot_classification.Rd

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

21 changes: 0 additions & 21 deletions man/plot_gene.Rd

This file was deleted.

30 changes: 0 additions & 30 deletions man/plot_summary.Rd

This file was deleted.

19 changes: 17 additions & 2 deletions man/posterior.Rd

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

3 changes: 2 additions & 1 deletion man/print.INCOMMON.Rd

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

2 changes: 1 addition & 1 deletion vignettes/Classify_Mutations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ INCOMMON classification of a sample can be performed using function `classify`.
```{r}
out = classify(
x = input,
priors = pcawg_priors,
priors = NULL,
entropy_cutoff = NULL,
rho = 0.01
)
Expand Down

0 comments on commit 3c6f87d

Please sign in to comment.