Skip to content

Commit dfb0011

Browse files
committed
Code refactoring; adding plot functions
1 parent 4ae5445 commit dfb0011

14 files changed

+1030
-36
lines changed

NAMESPACE

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@ S3method(is,DrugAUCQuantile)
44
export(plotDrugAUCDensityCurve)
55
export(plotDrugAUCViolinPlot)
66
export(selectOrgForOneDrug)
7+
export(selectOrgWithoutReplicateForOneDrug)
78
importFrom(S4Vectors,isSingleNumber)
89
importFrom(ggplot2,.data)
910
importFrom(ggplot2,aes)
11+
importFrom(ggplot2,element_line)
1012
importFrom(ggplot2,element_text)
13+
importFrom(ggplot2,geom_density)
1114
importFrom(ggplot2,geom_hline)
1215
importFrom(ggplot2,geom_point)
16+
importFrom(ggplot2,geom_rug)
1317
importFrom(ggplot2,geom_violin)
1418
importFrom(ggplot2,ggplot)
1519
importFrom(ggplot2,position_jitter)
1620
importFrom(ggplot2,scale_colour_manual)
21+
importFrom(ggplot2,scale_fill_manual)
1722
importFrom(ggplot2,theme)
1823
importFrom(ggplot2,theme_minimal)
1924
importFrom(ggplot2,xlab)

R/OrganoidsToolBox.R

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,3 +208,56 @@ NULL
208208
#'
209209
#'
210210
NULL
211+
212+
213+
#' Simple demo patient information dataset. The information is related to the
214+
#' organoids present in the 'drugScreening' dataset.
215+
#'
216+
#' @name patientInfo
217+
#'
218+
#' @docType data
219+
#'
220+
#' @aliases patientInfo
221+
#'
222+
#' @format a \code{data.frame} with the following columns:
223+
#' \itemize{
224+
#' \item \code{organoid_id} { a \code{character} string representing the
225+
#' organoid identifier. }
226+
#' \item \code{patient_id} { a \code{character} string representing the patient
227+
#' identifier. }
228+
#' }
229+
#'
230+
#' @seealso
231+
#' \itemize{
232+
#' \item \code{\link{selectOrgForOneDrug}} { for selecting the organoids
233+
#' with sensitive and resistant behavior for a
234+
#' specific drug screening.}
235+
#' \item \code{\link{selectOrgWithoutReplicateForOneDrug}} { for selecting
236+
#' the unrelated organoids (only one organoid per patient)
237+
#' with sensitive and resistant behavior for a
238+
#' specific drug screening.}
239+
#' }
240+
#'
241+
#' @usage data(drugScreening)
242+
#'
243+
#' @keywords datasets
244+
#'
245+
#' @examples
246+
#'
247+
#' ## Load drug screen dataset for 1 drug
248+
#' data(drugScreening)
249+
#'
250+
#' ## Load patient information dataset for 1 drug
251+
#' data(patientInfo)
252+
#'
253+
#' ## Calculate the extreme organoids for the methotrexate drug screening
254+
#' ## using a quantile of 1/3
255+
#' results <- selectOrgWithoutReplicateForOneDrug(drugScreening=drugScreening,
256+
#' drugName="Methotrexate", study="MEGA-TEST", screenType="TEST-01",
257+
#' patientInfo=patientInfo, doseType="Averaged", quantile=1/4)
258+
#'
259+
#' ## The information of the extreme organoids is found it the 'extreme' entry
260+
#' results$extreme
261+
#'
262+
#'
263+
NULL

0 commit comments

Comments
 (0)