at master 2.0 kB view raw
1diff --git a/R/AFND_interface.R b/R/AFND_interface.R 2index b62e8e0..0f22d85 100644 3--- a/R/AFND_interface.R 4+++ b/R/AFND_interface.R 5@@ -244,9 +244,9 @@ check_population <- function(hla_population) { 6 #' @return list of valid countries, regions and ethnic origin 7 #' @keywords internal 8 get_valid_geographics <- function() { 9- url <- "http://www.allelefrequencies.net/hla6006a.asp?" 10- html_input <- getURL(url, read_method = "html") 11- 12+ # http://www.allelefrequencies.net/hla6006a.asp? 13+ html_input <- xml2::read_html("nix-valid-geographics") 14+ 15 rvest_tables <- rvest::html_table(html_input, fill = TRUE) 16 17 # country 18diff --git a/R/external_resources_input.R b/R/external_resources_input.R 19index c4b1dc1..8fc5881 100644 20--- a/R/external_resources_input.R 21+++ b/R/external_resources_input.R 22@@ -74,16 +74,17 @@ getURL <- function(URL, N.TRIES=2L, 23 # MHC I 24 # netmhcI_input_template is an internal variable containing list of valid 25 # NetMHCpan input alleles 26-netmhcI_input_template <- getURL( 27- URL="https://services.healthtech.dtu.dk/services/NetMHCpan-4.1/allele.list", 28- read_method = "delim", delim = "\t", 29- col_names = c("netmhc_input", "hla_chain_name", "HLA_gene")) 30+netmhcI_input_template <- readr::read_delim( 31+ # https://services.healthtech.dtu.dk/services/NetMHCpan-4.1/allele.list 32+ "nix-NetMHCpan-4.1-allele-list", 33+ delim = "\t", 34+ skip = 0, 35+ col_names = c("netmhc_input", "hla_chain_name", "HLA_gene") 36+ ) 37 38 # MHC II 39-lines <- getURL( 40- URL = paste0("https://services.healthtech.dtu.dk/services/", 41- "NetMHCIIpan-4.0/alleles_name.list"), 42- read_method = "lines") 43+# https://services.healthtech.dtu.dk/services/NetMHCIIpan-4.0/alleles_name.list 44+lines <- readr::read_lines("nix-NETMHCIIpan-4.0-alleles-name-list") 45 lines_rep <- stringr::str_replace_all(lines, "\t+|\\s\\s+", "\t") 46 netmhcII_input_template <- suppressWarnings( 47 suppressMessages(read.delim(textConnection(lines_rep), sep = "\t")))