track_data_frame: Create a track from an R data frame for a custom JBrowse 2...

View source: R/data_frame.R

track_data_frameR Documentation

Create a track from an R data frame for a custom JBrowse 2 view


Creates the necessary configuration string for an R data frame so that it can be viewed as a track in a JBrowse custom linear genome view.


track_data_frame(track_data, track_name, assembly)



the data frame with track data. Must have cols: chrom, start, end, name. The column additional can optionally be include with more feature information. If a score column is present, it will be used and the track will be rendered to display quantitative features.


the name to use for the track


the config string generated by assembly


a character vector of stringified track JSON configuration


assembly <- assembly("", bgzip = TRUE)

df <- data.frame(
        chrom = c(1, 2),
        start = c(123, 456),
        end = c(789, 101112),
        name = c('feature1', 'feature2')

track_data_frame(df, "my_features", assembly)

JBrowseR documentation built on July 20, 2022, 1:09 a.m.