if (FALSE) {
# Read a PGS scoring file by PGS ID
# (internally, it translates the PGS ID
# to the corresponding FTP URL)
try(read_scoring_file("PGS000655"))
# Equivalent to `read_scoring_file("PGS000655")`
url <- paste0(
"http://ftp.ebi.ac.uk/",
"pub/databases/spot/pgs/scores/",
"PGS000655/ScoringFiles/",
"PGS000655.txt.gz"
)
read_scoring_file(url)
# Reading from a local file
try(read_scoring_file("~/PGS000655.txt.gz"))
}
Run the code above in your browser using DataLab