track_data_frame {JBrowseR} | R Documentation |
Create a track from an R data frame for a custom JBrowse 2 view
Description
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.
Usage
track_data_frame(track_data, track_name, assembly)
Arguments
track_data |
the data frame with track data. Must have cols:
|
track_name |
the name to use for the track |
assembly |
the config string generated by |
Value
a character vector of stringified track JSON configuration
Examples
assembly <- assembly("https://jbrowse.org/genomes/hg19/fasta/hg19.fa.gz", 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)
[Package JBrowseR version 0.10.2 Index]