Skip to content
Snippets Groups Projects
Commit cec66878 authored by Vincent  LAVILLE's avatar Vincent LAVILLE
Browse files

Update url and fix bugs

parent 6e10f23c
No related branches found
No related tags found
No related merge requests found
......@@ -111,8 +111,8 @@ get_vcf <- function(chrom, start, end, pop = NA, path = "", web = TRUE) {
# These are variants filtered by Brian Browning, the developer of BEAGLE.
data_url = paste(sep = "",
"http://tabix.iobio.io/?cmd=-h%20%27",
"http://bochet.gcc.biostat.washington.edu/beagle/1000_Genomes_phase3_v5a/",
"individual_chromosomes/chr", chrom, ".1kg.phase3.v5a.vcf.gz",
"http://bochet.gcc.biostat.washington.edu/beagle/1000_Genomes_phase3_v5a/b37.vcf/",
"chr", chrom, ".1kg.phase3.v5a.vcf.gz",
"%27%20", chrom, ":", start, "-", end
)
# Download the data from the server.
......@@ -161,7 +161,7 @@ get_vcf <- function(chrom, start, end, pop = NA, path = "", web = TRUE) {
# Convert the genotypes to a numeric matrix.
retval$geno <- t(apply(retval$geno, 1, function(row) {
as.numeric(do.call(cbind, strsplit(row, "|", fixed = TRUE)))
as.numeric(do.call(cbind, strsplit(unlist(row), "[/|]")))
}))
rownames(retval$geno) <- retval$meta$ID
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment