The function selects the organoids within the low and upper quantile, as specified by user, for a specific drug screening.

getClassOneDrug(
  drugScreening,
  drugName,
  study,
  screenType,
  doseType = "Averaged",
  quantile = 1/3
)

Arguments

drugScreening

a data.frame that contains the drug screening results. The mandatory columns: 'organoid_id', 'timestamp', 'study', 'screen_type', 'dosage_type', 'drug_a', 'drug_b', 'drug_c', 'drug_background' and 'relative_auc'.

drugName

a single character string representing the name of the drug selected for the analyses. The drug must be present in the drug screening dataset. The drug name can be found in the 'drug_a' column of the drug screening dataset.

study

a vector of character string representing the name(s) of the study selected for the analyses. The study must be present in the drug screening dataset. The study can be found in the 'study' column of the drug screening dataset.

screenType

a vector of character string representing the type of screening selected for the analyses. The type must be present in the drug screening dataset. The screen type can be found in the 'screen_type' column of the drug screening dataset.

doseType

a single character string representing the type of dosage selected for the analyses. The type must be present in the drug screening dataset.

quantile

a single positive numeric between 0 and 0.5 indicating the quantile used to select the organoids. Default: 1/3.

Value

an object of class "DrugAUCQuantile" which contains the sensitive and resistant organoids for a specific drug. This object is a list with the following 3 components:

  • quantilethe upper and lower quantiles for the specified drug.

  • dataseta data.frame containing the data used to calculate the quantiles.

  • extremea data.frame containing the sensitive and resistant organoids according to the specified quantiles. The data.frame also contains the relative AUC.

Author

Astrid Deschênes, Pascal Belleau

Examples


## Load drug screen dataset for 1 drug
data(drugScreening)

## Calculate the extreme organoids for the methotrexate drug screening
## using a quantile of 1/3
results <- getClassOneDrug(drugScreening=drugScreening,
    drugName="Methotrexate", study="MEGA-TEST", screenType="TEST-01",
    doseType="Averaged", quantile=1/3)

## The classification of the organoids is in the 'extreme' entry
results$extreme
#>    organoid_id relative_auc     group
#> 1        hT192     33.11044 SENSITIVE
#> 2        hT102     46.11044 SENSITIVE
#> 3       hT3312     46.61114 SENSITIVE
#> 4       hT1001     52.61044 SENSITIVE
#> 5       hT2211     53.57622   AVERAGE
#> 6        hT322     55.22300   AVERAGE
#> 7       hT1919     56.53002   AVERAGE
#> 8       hT1051     60.28033 RESISTANT
#> 9       hT1082     68.93726 RESISTANT
#> 10      hT2212     75.67628 RESISTANT
#> 11       hT999     97.31222 RESISTANT