... | ... |
@@ -8,7 +8,7 @@ getSRAdbFile <- |
8 | 8 |
localfile <- file.path(destdir, destfile) |
9 | 9 |
options(warn=-1) |
10 | 10 |
|
11 |
- url_sra_1 = 'https://s3.amazonaws.com/starbuck1/sradb/SRAmetadb.sqlite.gz' |
|
11 |
+ url_sra_1 = 'https://gbnci.cancer.gov/backup/SRAmetadb.sqlite.gz' |
|
12 | 12 |
url_sra_2 = 'https://gbnci-abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz' |
13 | 13 |
|
14 | 14 |
if(! inherits(try(url(url_sra_1, open='rb'), silent = TRUE), "try-error") ) { |
... | ... |
@@ -8,17 +8,13 @@ getSRAdbFile <- |
8 | 8 |
localfile <- file.path(destdir, destfile) |
9 | 9 |
options(warn=-1) |
10 | 10 |
|
11 |
- url_sra_1 = 'https://gbnci-abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz' |
|
12 |
- url_sra_2 = 'https://dl.dropboxusercontent.com/u/51653511/SRAmetadb.sqlite.gz' |
|
13 |
- url_sra_3 = 'http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz' |
|
14 |
- |
|
11 |
+ url_sra_1 = 'https://s3.amazonaws.com/starbuck1/sradb/SRAmetadb.sqlite.gz' |
|
12 |
+ url_sra_2 = 'https://gbnci-abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz' |
|
15 | 13 |
|
16 | 14 |
if(! inherits(try(url(url_sra_1, open='rb'), silent = TRUE), "try-error") ) { |
17 | 15 |
url_sra = url_sra_1 |
18 |
- } else if(! inherits(try(url(url_sra_2, open='rb'), silent = TRUE), "try-error") ) { |
|
19 |
- url_sra = url_sra_2 |
|
20 | 16 |
} else { |
21 |
- url_sra = url_sra_3 |
|
17 |
+ url_sra = url_sra_2 |
|
22 | 18 |
} |
23 | 19 |
|
24 | 20 |
download.file(url_sra, destfile = localfile, mode = "wb", method=method) |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SRAdb@117936 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -8,9 +8,10 @@ getSRAdbFile <- |
8 | 8 |
localfile <- file.path(destdir, destfile) |
9 | 9 |
options(warn=-1) |
10 | 10 |
|
11 |
- url_sra_1 = 'http://gbnci.abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz' |
|
12 |
- url_sra_2 = 'http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz' |
|
13 |
- url_sra_3 = 'https://dl.dropboxusercontent.com/u/51653511/SRAmetadb.sqlite.gz' |
|
11 |
+ url_sra_1 = 'https://gbnci-abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz' |
|
12 |
+ url_sra_2 = 'https://dl.dropboxusercontent.com/u/51653511/SRAmetadb.sqlite.gz' |
|
13 |
+ url_sra_3 = 'http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz' |
|
14 |
+ |
|
14 | 15 |
|
15 | 16 |
if(! inherits(try(url(url_sra_1, open='rb'), silent = TRUE), "try-error") ) { |
16 | 17 |
url_sra = url_sra_1 |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SRAdb@116875 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -10,7 +10,7 @@ getSRAdbFile <- |
10 | 10 |
|
11 | 11 |
url_sra_1 = 'http://gbnci.abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz' |
12 | 12 |
url_sra_2 = 'http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz' |
13 |
- url_sra_3 = 'http://dl.dropbox.com/u/51653511/SRAmetadb.sqlite.gz' |
|
13 |
+ url_sra_3 = 'https://dl.dropboxusercontent.com/u/51653511/SRAmetadb.sqlite.gz' |
|
14 | 14 |
|
15 | 15 |
if(! inherits(try(url(url_sra_1, open='rb'), silent = TRUE), "try-error") ) { |
16 | 16 |
url_sra = url_sra_1 |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SRAdb@61005 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -5,15 +5,22 @@ getSRAdbFile <- |
5 | 5 |
if (missing(method)) |
6 | 6 |
method <- ifelse(!is.null(getOption("download.file.method")), |
7 | 7 |
getOption("download.file.method"), "auto") |
8 |
- localfile <- file.path(destdir, destfile) |
|
9 |
- |
|
8 |
+ localfile <- file.path(destdir, destfile) |
|
10 | 9 |
options(warn=-1) |
11 |
- url_sra = "http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz" |
|
12 |
- con.url_sra <- try(url(url_sra, open='rb'), silent = TRUE) |
|
13 |
- if(inherits(con.url_sra, "try-error")) |
|
14 |
- url_sra = "http://gbnci.abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz" |
|
10 |
+ |
|
11 |
+ url_sra_1 = 'http://gbnci.abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz' |
|
12 |
+ url_sra_2 = 'http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz' |
|
13 |
+ url_sra_3 = 'http://dl.dropbox.com/u/51653511/SRAmetadb.sqlite.gz' |
|
14 |
+ |
|
15 |
+ if(! inherits(try(url(url_sra_1, open='rb'), silent = TRUE), "try-error") ) { |
|
16 |
+ url_sra = url_sra_1 |
|
17 |
+ } else if(! inherits(try(url(url_sra_2, open='rb'), silent = TRUE), "try-error") ) { |
|
18 |
+ url_sra = url_sra_2 |
|
19 |
+ } else { |
|
20 |
+ url_sra = url_sra_3 |
|
21 |
+ } |
|
22 |
+ |
|
15 | 23 |
download.file(url_sra, destfile = localfile, mode = "wb", method=method) |
16 |
- |
|
17 | 24 |
message("Unzipping...\n") |
18 | 25 |
gunzip(localfile, overwrite = TRUE) |
19 | 26 |
unzippedlocalfile <- gsub("[.]gz$", "", localfile) |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SRAdb@46096 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -6,10 +6,14 @@ getSRAdbFile <- |
6 | 6 |
method <- ifelse(!is.null(getOption("download.file.method")), |
7 | 7 |
getOption("download.file.method"), "auto") |
8 | 8 |
localfile <- file.path(destdir, destfile) |
9 |
- # download.file("http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz", |
|
10 |
- # destfile = localfile, mode = "wb", method=method) |
|
11 |
- download.file("http://gbnci.abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz", |
|
12 |
- destfile = localfile, mode = "wb", method=method) |
|
9 |
+ |
|
10 |
+ options(warn=-1) |
|
11 |
+ url_sra = "http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz" |
|
12 |
+ con.url_sra <- try(url(url_sra, open='rb'), silent = TRUE) |
|
13 |
+ if(inherits(con.url_sra, "try-error")) |
|
14 |
+ url_sra = "http://gbnci.abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz" |
|
15 |
+ download.file(url_sra, destfile = localfile, mode = "wb", method=method) |
|
16 |
+ |
|
13 | 17 |
message("Unzipping...\n") |
14 | 18 |
gunzip(localfile, overwrite = TRUE) |
15 | 19 |
unzippedlocalfile <- gsub("[.]gz$", "", localfile) |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SRAdb@46085 bc3139a8-67e5-0310-9ffc-ced21a209358
... | ... |
@@ -6,8 +6,10 @@ getSRAdbFile <- |
6 | 6 |
method <- ifelse(!is.null(getOption("download.file.method")), |
7 | 7 |
getOption("download.file.method"), "auto") |
8 | 8 |
localfile <- file.path(destdir, destfile) |
9 |
- download.file("http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz", |
|
10 |
- destfile = localfile, mode = "wb", method=method) |
|
9 |
+ # download.file("http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz", |
|
10 |
+ # destfile = localfile, mode = "wb", method=method) |
|
11 |
+ download.file("http://gbnci.abcc.ncifcrf.gov/backup/SRAmetadb.sqlite.gz", |
|
12 |
+ destfile = localfile, mode = "wb", method=method) |
|
11 | 13 |
message("Unzipping...\n") |
12 | 14 |
gunzip(localfile, overwrite = TRUE) |
13 | 15 |
unzippedlocalfile <- gsub("[.]gz$", "", localfile) |
git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/SRAdb@45876 bc3139a8-67e5-0310-9ffc-ced21a209358
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,20 @@ |
1 |
+getSRAdbFile <- |
|
2 |
+ function (destdir = getwd(), destfile = "SRAmetadb.sqlite.gz", |
|
3 |
+ method) |
|
4 |
+{ |
|
5 |
+ if (missing(method)) |
|
6 |
+ method <- ifelse(!is.null(getOption("download.file.method")), |
|
7 |
+ getOption("download.file.method"), "auto") |
|
8 |
+ localfile <- file.path(destdir, destfile) |
|
9 |
+ download.file("http://watson.nci.nih.gov/~zhujack/SRAmetadb.sqlite.gz", |
|
10 |
+ destfile = localfile, mode = "wb", method=method) |
|
11 |
+ message("Unzipping...\n") |
|
12 |
+ gunzip(localfile, overwrite = TRUE) |
|
13 |
+ unzippedlocalfile <- gsub("[.]gz$", "", localfile) |
|
14 |
+ con <- dbConnect(SQLite(), unzippedlocalfile) |
|
15 |
+ dat <- dbGetQuery(con, "SELECT * FROM metaInfo") |
|
16 |
+ dbDisconnect(con) |
|
17 |
+ message("Metadata associate with downloaded file:\n") |
|
18 |
+ message(dat) |
|
19 |
+ return(unzippedlocalfile) |
|
20 |
+} |