Function to compare MOVA and PolyPhen-2.
PolyPhen_MOVA.RdThis function plots the ROC curve in PolyPhen-2 for each gene and returns the AUC.
Arguments
- file_name
The "gene name_Target or Pathogenic_predict.csv" file output by the MOVA function
- phenotype
Specify "Target" if you want the positive variant to be the Target variant only, or "Pathogenic" if you want to include the Pathogenic variant as well. The default is "Target".
- col
Specifies the color of the ROC curve. Default is orange.
Examples
Hgmd_divide("./source/TARDBP.csv")
Edit_gnomAD_file("./source/gnomAD_v3.1.2_ENST00000240185_2023_02_14_13_23_48.csv", "./source/TARDBP_gnomAD.csv")
Edit_variant_data("../CADD_REVEL/AlphScore_final.tsv", "./source/TARDBP.csv", "./source/TARDBP_gnomAD.csv", "Q13148", "TARDBP", "./source/TARDBPvariantdata.csv")
Edit_polyphen_data("../dbNSFP/dbNSFP4.3a/dbNSFP4.3a_variant.chr1","./source/TARDBPvariantdata.csv", "TARDBP_alph.csv", "Q13148", 11012654, 11025492 ,"./source/TARDBPvariantdatapol.csv", "./source/TARDBP_alphpol.csv")
Edit_final_variant_file("./source/TARDBP_alphpol.csv","./source/TARDBP_alphpol2.csv")
MOVA("./source/Q13148.fa", "TARDBP", "./source/AF-Q13148-F1-model_v2.pdb","./source/TARDBP_alphpol2.csv", "./source/TARDBPvariantdatapol.csv")
PolyPhen_MOVA("TARDBP_Target_predict.csv")
AlphScore_MOVA("TARDBP_Target_predict.csv")
CADD_MOVA("TARDBP_Target_predict.csv")
REVEL_MOVA("TARDBP_Target_predict.csv")
EVE_MOVA("TARDBP_Target_predict.csv", "../dementia/EVE_all_data/variant_files/TADBP_HUMAN.csv")
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (file_name, phenotype = "Target", col = "orange")
{
df <- fread(file_name)
if (phenotype == "Target") {
df <- df[(df$Type == "Target") | (df$Type == "Ctrl"),
]
}
df$predict <- df$pph_prob
if (phenotype == "Target") {
df$result <- df$Type2
}
else {
df$result <- df$Type3
}
pred <- prediction(df$predict, df$result)
perf <- performance(pred, "tpr", "fpr")
plot(perf, col = col, add = TRUE)
auc.tmp <- performance(pred, "auc")
auc <- as.numeric(auc.tmp@y.values)
return(auc)
}
#> function (file_name, phenotype = "Target", col = "orange")
#> {
#> df <- fread(file_name)
#> if (phenotype == "Target") {
#> df <- df[(df$Type == "Target") | (df$Type == "Ctrl"),
#> ]
#> }
#> df$predict <- df$pph_prob
#> if (phenotype == "Target") {
#> df$result <- df$Type2
#> }
#> else {
#> df$result <- df$Type3
#> }
#> pred <- prediction(df$predict, df$result)
#> perf <- performance(pred, "tpr", "fpr")
#> plot(perf, col = col, add = TRUE)
#> auc.tmp <- performance(pred, "auc")
#> auc <- as.numeric(auc.tmp@y.values)
#> return(auc)
#> }
#> <environment: 0x0000011a8f2dda78>