Create TrackHub for visualization of genomic files in the UCSC Genome Browser.

create_trackhub(
  hub = "my_hub_name",
  genome,
  path = getwd(),
  save_dir = file.path(path, "trackhub"),
  folders = c(""),
  domain = paste0("https://neurogenomics-ukdri.dsi.ic.ac.uk/", hub),
  shortLabel = "",
  longLabel = "",
  email = "",
  descriptionUrl = paste(save_dir, "description.html", sep = "/"),
  filetypes = c(bed = ".bed$", bigWig = ".bigwig$|.bw$"),
  settings = list(visibility = 2, fontSize = "10", height = "100", autoScale = "on",
    color = "255,102,102", renderer = "BAR_CHART", smoothingWindow = "off",
    windowFunction = "mean", logo = "on"),
  as_list = TRUE,
  sep = "\t",
  verbose = TRUE
)

Arguments

hub

Name of the hub.

genome

Genome build that files were aligned to.

path

Path to search for files within recursively.

save_dir

Directory to save trackhub files to.

folders

Subfolders within path to search.

domain

URL prefix where the files will be hosted.

shortLabel

Short label for the hub.

longLabel

Long label for the hub.

email

Contact email for the hub.

descriptionUrl

URL to the description page.

filetypes

File types to search for.

settings

Trackhub settings. See UCSC trackhub documentation for details.

as_list

Return each file as a nested list.

sep

Field separator for trackDb file.

verbose

Print messages.

Value

Character or nested list.

Examples

if (FALSE) { # \dontrun{
path <-"/Volumes/bms20/projects/neurogenomics-lab/live/Projects/CUT_n_TAG/CUTnTag_analysis"
res <- create_trackhub(path=path, folders = c("bigwig","bedgraph","peaks"))

path <-"/Volumes/bms20/projects/neurogenomics-lab/live/Data/tip_seq/processed_data/without_duplicates/tipseq_9_17_jun_2022/"
res <- create_trackhub(hub="tipseq_9_17_jun_2022",
                       path=path, 
                       folders = "03_peak_calling",
                       genome="hg38")
} # }