Description Usage Arguments Value Examples
View source: R/benchmarkDrugResults.R
This function will benchmark various drug repurposing methods according to the drug rank lists sent to the function and the drugs one has selected to use for benchmarking. Step 1 would be to use compDrugMethods to obtain a data frame with multiple drug rankings, one for each drug repurposing method, for a given signature. Step 2 would be to use the searchwords input of getBenchmarkDrugs to find appropriate drugs to use for benchmarking the signature used in step 1. The results of step 1 (frame returned from compDrugMethods) should be passed to compResList and the results of step 2 (frame returned from getBenchmarkDrugs) should be passed to drugTrialsList. Step 1 and 2 can be repeated in order to increase the number of valid drugs used to benchmark. The below example uses a breast cancer, lung cancer, and aml signature to get drug rankings for multiple drug repurposing techniques using compDrugMethods, then uses getBenchmarkDrugs to find breast cancer, lung cancer, and aml drugs for benchmarking, and then runs this funciton to determine which drug repurposing technique performs best. Note that since few drugs were used, the results are invalid. Please obtain the entire CMap drug perturbation signature to run valid benchmarking with the breast cancer, lungh cancer, and aml signatures provided with this package.
1 | benchmarkDrugResults(compResList, drugTrialsList, nperm = 1000)
|
compResList |
a list containing data frames formatted the same as the data frames returned from the compDrugMethods function. Essentially, the column names are the drug repurposing techniques, rownames are the drug names, and the values are the final scores for the drugs. |
drugTrialsList |
a list containing data frames that are each a subset of the rows from the cmapTrialInfo frame which can be loaded in with data("cmapTrialInfo"). The rows that are kept should correspond to the drugs that one would like to use to benchmark the drug rank frames in compResList. Use getBenchmarkDrugs to search the cmapTrialInfo frame for drugs and obtain frames to be stored in this variable. |
nperm |
number of permutations used to determine the p values. For each permutation, a randomly ordered drug ranking list is generated. The p values reported are based on how often the drug rank list from the analysis outperforms these randomly created lists. |
a list of 3 elements. The first element contains the final scores and p values for the methods being benchmarked. The second element is a list of data frames. There is 1 data frame for each pair of compResList and drugTrialList elements and the frame shows the position of the drugs in compResList for each drug repurposing technique. The third element is also a list of data frames. It is the same as the second elements data frames except the values describe the number of unapproved drugs that were reanked better than approved drugs for each technique. The final scores are generated by using the data in the 2nd and 3rd list elements and the final score frame (list element 1) details how final scores are calculated.
1 2 3 4 5 6 7 | drugNames = c("doxorubicin", "cetuximab")
clinicalInfo = getDrugClinicalInfo(drugNames)
breastDrugsCmap = getBenchmarkDrugs("breast ")
lungDrugsCmap = getBenchmarkDrugs("lung")
amlDrugsCmap = getBenchmarkDrugs("myeloid")
drugTrialsList = list(breastDrugsCmap, lungDrugsCmap, amlDrugsCmap)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.