Skip to content

Commit 43410b9

Browse files
authored
Merge pull request KrasnitzLab#27 from adeschen/main
Correct indents in drugScreening.R file
2 parents 6d54ee4 + 9491860 commit 43410b9

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

R/drugScreening.R

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ selectOrgForOneDrug <- function(drugScreening, drugName, study,
7575
## The drug must be present in the drug dataset
7676
if (!(tolower(drugName) %in% tolower(unique(drugScreening$drug_a)))) {
7777
stop("The drug \'", drugName, "\' is not present in the drug ",
78-
"screening dataset.")
78+
"screening dataset.")
7979
}
8080

8181
## The study must be present in the drug dataset
@@ -86,14 +86,14 @@ selectOrgForOneDrug <- function(drugScreening, drugName, study,
8686

8787
## The study must be present in the drug dataset
8888
if (!any(tolower(screenType) %in%
89-
tolower(unique(drugScreening$screen_type)))) {
89+
tolower(unique(drugScreening$screen_type)))) {
9090
stop("The screen type \'", screenType, "\' is not present in the ",
9191
"drug screening dataset.")
9292
}
9393

9494
## The doseType must be present in the drug dataset
9595
if (!(tolower(doseType) %in%
96-
tolower(unique(drugScreening$dosage_type)))) {
96+
tolower(unique(drugScreening$dosage_type)))) {
9797
stop("The dossage type \'", doseType, "\' is not present in the ",
9898
"drug screening dataset.")
9999
}
@@ -210,14 +210,14 @@ selectOrgWithoutReplicateForOneDrug <- function(drugScreening, drugName, study,
210210

211211
## The study must be present in the drug dataset
212212
if (!any(tolower(screenType) %in%
213-
tolower(unique(drugScreening$screen_type)))) {
213+
tolower(unique(drugScreening$screen_type)))) {
214214
stop("The screen type \'", screenType, "\' is not present in the ",
215215
"drug screening dataset.")
216216
}
217217

218218
## The doseType must be present in the drug dataset
219219
if (!(tolower(doseType) %in%
220-
tolower(unique(drugScreening$dosage_type)))) {
220+
tolower(unique(drugScreening$dosage_type)))) {
221221
stop("The dosage type \'", doseType, "\' is not present in the ",
222222
"drug screening dataset.")
223223
}
@@ -236,7 +236,7 @@ selectOrgWithoutReplicateForOneDrug <- function(drugScreening, drugName, study,
236236
all=FALSE)
237237

238238
shuffled_data <- merged_data[sample(1:nrow(merged_data),
239-
replace=FALSE), ]
239+
replace=FALSE), ]
240240

241241
newData <- shuffled_data[!duplicated(shuffled_data$patient_id), ]
242242

@@ -331,11 +331,11 @@ plotDrugAUCDensityCurve <- function(drugQuantile, byGroup=FALSE) {
331331
xlab("Relative AUC") + ylab("Density") +
332332
theme_minimal() +
333333
theme(axis.title=element_text(size=13, face="bold"),
334-
axis.text=element_text(size=12, face="bold"),
335-
legend.text=element_text(size=12),
336-
axis.line=element_line(color="black"),
337-
axis.ticks=element_line(color="black"),
338-
legend.title=element_text(size=13, face="bold"))
334+
axis.text=element_text(size=12, face="bold"),
335+
legend.text=element_text(size=12),
336+
axis.line=element_line(color="black"),
337+
axis.ticks=element_line(color="black"),
338+
legend.title=element_text(size=13, face="bold"))
339339

340340
} else {
341341
p <- ggplot(aucResults, aes(x=.data$relative_auc)) +
@@ -347,11 +347,11 @@ plotDrugAUCDensityCurve <- function(drugQuantile, byGroup=FALSE) {
347347
xlab("Relative AUC") + ylab("Density") +
348348
theme_minimal() +
349349
theme(axis.title=element_text(size=13, face="bold"),
350-
axis.text=element_text(size=12, face="bold"),
351-
legend.text=element_text(size=12),
352-
axis.line=element_line(color="black"),
353-
axis.ticks=element_line(color="black"),
354-
legend.title=element_text(size=13, face="bold"))
350+
axis.text=element_text(size=12, face="bold"),
351+
legend.text=element_text(size=12),
352+
axis.line=element_line(color="black"),
353+
axis.ticks=element_line(color="black"),
354+
legend.title=element_text(size=13, face="bold"))
355355
}
356356

357357
return(p)

0 commit comments

Comments
 (0)