Skip to content

Commit 4d356bf

Browse files
committed
correct source code
1 parent 1c417a7 commit 4d356bf

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

breastCancerClassifier.R

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
library("tidyverse")
2+
# in case you cannot install tidyverse package, please uncomment the packages below
3+
# library("readr")
4+
# library("tibble")
5+
# library("dplyr")
6+
# library("tidyr")
7+
# library("ggplot2")
28
library("magrittr")
39
library("DESeq")
410
library("e1071")
@@ -14,7 +20,7 @@ readcounts <- read_tsv("data/readcounts_96_nodup.tsv", col_names = T)
1420
# the column "recurStatus" shows the recurrence status of the patient, R = recurrence, N = non-recurrence
1521
patient_info <- read_csv("data/patient_info.csv", col_names = T) # recurrence status file
1622

17-
# generate sample_recurStatus dataframe with the same sampel order in tpm and reacounts
23+
# generate sample_recurStatus dataframe with the same sample order in tpm and reacounts
1824
sampel_recurStatus <- patient_info %>% arrange(match(sampleID, colnames(readcounts)[-1])) %>%
1925
select(sampleID, recurStatus)
2026

@@ -38,7 +44,8 @@ rank_marker_gene <- res %>% filter(id %in% preselectedList) %>%
3844
# top 30, 60, 90, ... 720, 750
3945
geneNum <- seq(30, 750, 30)
4046

41-
# calculate average AUC of SVM based on each subset of biomarker genes
47+
# calculate average AUC of SVM based on each subset of biomarker genes
48+
# need several minutes to complete the loop
4249

4350
averageAUC <- rep(0, length(geneNum))
4451
for(i in 1:length(geneNum)){
@@ -153,4 +160,4 @@ ggplot(roc_data, aes(x = x, y = y, group = runtime, col = runtime)) + geom_line(
153160
x = 0.65, y=0.2, size = 3)
154161

155162
ggsave('ROCplot.pdf', width = 4, height = 4)
156-
163+
column_to_rownames()

0 commit comments

Comments
 (0)