#This program calculates the AUC (R version 3.5.0)
#package needed is AUC

require (AUC)

setwd("C:/your/directory/here") #Change directory here
data <- read.csv("AUC_Data_PhoglyStruct.txt", header=T, sep=",") #Please change the file name when wanting to plot for other methods accordingly

data$actual <- as.character(data$actual)
data$actual[which(data$actual=="1:0")] <- "0"
data$actual[which(data$actual=="2:1")] <- "1"
data$actual <- as.numeric(data$actual)

data$predicted <- as.character(data$predicted)
data$predicted[which(data$predicted=="1:0")] <- "0"
data$predicted[which(data$predicted=="2:1")] <- "1"
data$predicted <- as.numeric(data$predicted)

TrueLabel <- factor(data$actual)
PredictedLabel <- factor(data$predicted)

auc(roc(PredictedLabel,TrueLabel))
plot(roc(PredictedLabel,TrueLabel))