Skip to content

Commit

Permalink
round on function examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-calonaci committed May 24, 2024
1 parent 6a9a8f4 commit 069c63b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/classify.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
#' the classification data and parameters.
#' @export
#' @examples
#' # Example classification run on a single sample
#' # First load example data
#' data(MSK_genomic_data)
#' data(MSK_clinical_data)
#' # Initialize the INCOMMON object (note the outputs to screen)
#' x = init(genomic_data = MSK_genomic_data[1:3,], clinical_data = MSK_clinical_data)
#' # Initialize the INCOMMON object for a single sample (note the outputs to screen)
#' sample = 'P-0002081'
#' x = init(genomic_data = MSK_genomic_data %>% filter(sample == !!sample), clinical_data = MSK_clinical_data %>% filter(sample == !!sample))
#' # Run INCOMMON classification
#' x = classify(x = x, priors = pcawg_priors, entropy_cutoff = NULL, rho = 0.01)
#' # An S3 method can be used to report to screen what is in the object
Expand Down
11 changes: 11 additions & 0 deletions R/plot_classification.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@
#' a multi-faceted plot.
#' @return An object or a list of objects of class \code{'ggplot2'}.
#' @export
#' @examples
#' # First load example data
#' data(MSK_genomic_data)
#' data(MSK_clinical_data)
#' # Initialize the INCOMMON object with a specific sample
#' sample = 'P-0002081'
#' x = init(genomic_data = MSK_genomic_data %>% filter(sample == !!sample), clinical_data = MSK_clinical_data %>% filter(sample == !!sample))
#' # Run INCOMMON classification
#' x = classify(x = x, priors = pcawg_priors, entropy_cutoff = NULL, rho = 0.01)
#' # An S3 method can be used to report to screen what is in the object
#' plot_classification(x = x, sample = sample)
#' @importFrom dplyr filter mutate rename select %>%
plot_classification = function(x, sample, assembly = F){

Expand Down

0 comments on commit 069c63b

Please sign in to comment.