Created
November 23, 2024 15:34
-
-
Save vjcitn/652babf3a08056cb2a978f7fb93d8854 to your computer and use it in GitHub Desktop.
bioc anno in OSN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
make_parq_url = function(stub) { | |
stub = sub("parquet$", "", stub) | |
sprintf("https://mghp.osn.xsede.org/bir190004-bucket01/BiocParquetAnno/%s.parquet", stub) | |
} | |
if (!dbIsValid(con)) con = dbConnect(duckdb()) | |
query_osn = function(con, stub="gene_info") { | |
url = make_parq_url(stub) | |
dbExecute(con, "INSTALL httpfs from core_nightly;") | |
dbExecute(con, "LOAD httpfs;") | |
dbExecute(con, sprintf("create view %s as select * from parquet_scan(%s)", stub, sQuote(url))) | |
tbl(con, stub) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment