Skip to content

Commit

Permalink
Improves mutually_exclusive() example
Browse files Browse the repository at this point in the history
Adds demonstration of CSV support for the quality_opposites
paramter to mutually_exclusive().

Fixes #271
  • Loading branch information
johnbradley committed Nov 9, 2022
1 parent cd0bb14 commit 2c1d347
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/mutual_exclusivity.R
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ find_quality_opposites <- function(phenotype_quality, quality_opposites) {
#' # compare the phenotypes using opposite quality data
#' exclusivity <- mutually_exclusive(phenotypes_to_compare, quality_opposites=quality_opposites)
#' exclusivity$dataframe$mutual_exclusivity
#'
#' # compare the phenotypes using opposites from a csv file with "quality.a" and "quality.b" columns
#' opposites_csv_path <- system.file("examples", "opposites.csv", package = "rphenoscape")
#' quality_opposites <- read.csv(opposites_csv_path)
#' exclusivity <- mutually_exclusive(phenotypes_to_compare, quality_opposites=quality_opposites)
#' exclusivity$dataframe$mutual_exclusivity
#' @export
mutually_exclusive <- function(phenotypes, studies=NULL, progress_bar=FALSE, quality_opposites=NULL){

Expand Down
2 changes: 2 additions & 0 deletions inst/examples/opposites.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
quality.a,quality.b
http://purl.obolibrary.org/obo/PATO_0001154,http://purl.obolibrary.org/obo/PATO_0000574
6 changes: 6 additions & 0 deletions man/mutually_exclusive.Rd

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

0 comments on commit 2c1d347

Please sign in to comment.