Description Usage Arguments Details Value Examples
gets region for a specified gene.
1 2 3 4 5 6 7 8 | get_region_for_gene(
anno,
gene_id = "",
gene_name = "",
anchor = "gene",
left_offset = 0,
right_offset = 0
)
|
anno |
a data.frame holding the annotations |
gene_name |
alternative if id is not provided. Default =”. |
anchor |
region around gene, TSS or TES. Default ='gene'. |
left_offset |
extend by this upstream start or anchor |
right_offset |
extend by this downstream end or anchor |
id |
id of the gene. Default =”. |
Retrieves the information in a named vector.
A named vector.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | anno_gencode <- read.table('/Users/schmidm/Documents/other_people_to_and_from/ClaudiaI/bw/gencode_v23_hg19_genes.bed', col.names = c('chr', 'start', 'end', 'id', 'type', 'strand', 'name'))
region <- get_region_for_gene(anno_gencode, gene_name='GAPDH', anchor='TSS', 2000, 5000)
files <- create_bw_file_set(path, c('[y,I]','rep[3,4]', '.bw$'), c('_N20', '_3D12'), c('siRNA', 'ab', 'rep'), '_')
set <- load_bw_set(files, region)
ggplot(set, aes(x=starts, y=scores, color=rep)) + geom_line() + facet_grid(siRNA~ab)
region <- get_region_for_gene(anno_gencode, gene_name='HIST1H4C', anchor='gene', left_offset=2000, right_offset=5000)
files <- create_bw_file_set(path, c('[y,I]','rep[3,4]', '.bw$'), c('_N20', '_3D12'), c('siRNA', 'ab', 'rep'), '_')
set <- load_bw_set(files, region)
ggplot(set, aes(x=starts, y=scores, color=rep)) + geom_line() + facet_grid(siRNA~ab)
ggplot(set, aes(x=starts, y=scores, color=siRNA)) + geom_line() + facet_grid(.~ab)
scaled_set <- set %>% group_by(siRNA, ab, rep) %>% mutate(scores=scale(scores))
ggplot(scaled_set, aes(x=starts, y=scores, color=siRNA)) + geom_line() + facet_grid(.~ab)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.