create_hub | R Documentation |
This function creates a directory with the configuration files required for creating a UCSC track hub for the BigWig files from a given project. These files can then be hosted on GitHub or elsewhere. For more details about UCSC track hubs, check https://genome.ucsc.edu/goldenpath/help/hgTrackHubHelp.html.
create_hub(
x,
output_dir = file.path(tempdir(), x$project[1]),
hub_name = "recount3",
email = "someone@somewhere",
show_max = 5,
hub_short_label = "recount3 coverage",
hub_long_label =
"recount3 summaries and queries for large-scaleRNA-seq expression and splicing",
hub_description_url = "https://rna.recount.bio/index.html",
recount3_url = getOption("recount3_url", "http://duffel.rail.bio/recount3")
)
x |
A |
output_dir |
A |
hub_name |
A |
email |
A |
show_max |
An |
hub_short_label |
A |
hub_long_label |
A |
hub_description_url |
A |
recount3_url |
A |
See https://github.com/LieberInstitute/recount3-docs/blob/master/UCSC_hubs/create_hubs.R for an example of how this function was used.
A directory at output_dir
with the files needed for a UCSC
track hub.
## Find all the mouse samples available from recount3
mouse_samples <- available_samples("mouse")
## Subset to project DRP001299
info_DRP001299 <- subset(mouse_samples, project == "DRP001299")
hub_dir <- create_hub(info_DRP001299)
## List the files created by create_hub()
hub_files <- list.files(hub_dir, full.names = TRUE, recursive = TRUE)
hub_files
## Check the files contents
sapply(hub_files, function(x) {
cat(paste(readLines(x), collapse = "\n"))
})
## You can also check the file contents for this example project at
## https://github.com/LieberInstitute/recount3-docs/tree/master/UCSC_hubs/mouse/sra_DRP001299
## or test it out on UCSC directly through the following URL:
## https://genome.ucsc.edu/cgi-bin/hgTracks?db=mm10&lastVirtModeType=default&lastVirtModeExtraState=&virtModeType=default&virtMode=0&nonVirtPosition=&position=chr1&hubUrl=https://raw.githubusercontent.com/LieberInstitute/recount3-docs/master/UCSC_hubs/mouse/sra_DRP001299/hub.txt
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.