View source: R/linker_html_summary.R
create_html_summary | R Documentation |
Given results of Linker runs and other annotations, builds an interconnected html website that summarizes graph edges by support and ChIP evidence (if provided).
create_html_summary(
rfiles,
tagstr,
mapfile,
outdir = paste0(tempdir(), "/"),
evidfile
)
rfiles, |
character vector of the string file names where results of linker runs have been saved using saveRDS, e.g., linkerResult <- LINKER_run(...), saveRDS(linkerResult, file = 'StringFileName'). |
tagstr, |
a string name to tag related html summary results |
mapfile, |
a string name of file that contains identifier and regulator status information, must contain the columns
'uniq_isos' - contains name of rows in LINKER_run |
outdir, |
a string name of directory location to save html |
evidfile, |
a string name of file that contain ChIP evidence information, must be a matrix where the column names are the 'iso_ensgs' names of the targets the row names are the 'iso_ensgs' names of the regulators the matrix values are -1: meaning that information is missing, the regulator was not chipped, or the gene names were not mapped 0: meaning that the ChIP'ed regulator did not have a peak in the targets genomic region (gene body +/- 20KB) positive integer: number of peaks of the ChIP'ed regulator in the targets genomic region (gene body +/- 20KB) |
allsummaries, a data frame that contains for each module and graph the number of graph edges at each possible level of support and the percentage of cumulative edges with each type of ChIP evidence
## We are going to use files from the example folder.
## `create_html_summary()` only needs the paths, so thats what
## we are giving it.
evidpath <- paste0(system.file('extdata',package='TraRe'),'/ChIP',
'/Tumor_OV50_intersectBed.weighted_evidence.txt')
rfiles <- c(paste0(system.file('extdata',package='TraRe'),'/ChIP',
'/Tumor_OV50.tar8855_reg638.VBSR.m100_b10.rds'))
tagstr <- 'Tumor_OV50.tar8855_reg638'
mapfile <- paste0(system.file('extdata',package='TraRe'),'/ChIP',
'/Tumor_OV50.gene_info.txt')
## We are going to create a folder for this example
## If u want to keep create_html_summary output,
## do not run the last line.
##By default, the output directory will be paste0(tempdir(),'/')
##For this example, we will generate it in the working directory.
create_html_summary(rfiles,tagstr,mapfile,evidfile=evidpath)
unlink(paste0(getwd(),'/',tagstr),recursive = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.