Description Usage Arguments Details Value Examples
View source: R/computeMatrix.R
Computes a metagene object from scratch, similar to metagene_matrix but as more compact form.
1 2 3 4 5 6 7 8 9 10 11 12 13 | metagene_rel_anchor(
bw_plus,
bw_minus,
anno,
anchor = "TSS",
upstream = 1000,
downstream = 1000,
bin_size = 100,
collapse_avg_fun = rowMeans,
negate_neg_strand_values = FALSE,
sample_name = NULL,
group_name = NULL
)
|
bw_plus |
bigwig filename for plus strand signal |
bw_minus |
bigwig filename for minus strand signal |
anno |
Bed filename for annotations to use OR a GRanges object (see Details). |
anchor |
'TSS', 'TES', 'center' or NULL (default='TSS') |
upstream |
bp upstream of anchor (default=1000) |
downstream |
bp downstream of anchor (default=1000) |
bin_size |
size for binning in bp (default=1, ie no binning) |
collapse_avg_fun |
function for averaging values inside windows (Default = rowMeans, see Details). |
negate_neg_strand_values |
negate values from minus strand bigwig (default=FALSE). |
Loads the bed file. Extracts the position of the anchor point and creates ranges from x bp upstream to x bp downstream. Queries from both bigwigs and the correct strand. Summarizes signal of bin_size bins. negate_neg_strand_values can be set to TRUE to deal with minus strand bigwigs which contain all negative values as used by some labs. When using a GRanges object for anno, this assumes the bigwigs will be queries from start to end! All ranges must be exactly same size! anchor, upstream and downstream info is still reguired.
Metagene object
1 2 3 4 5 6 7 | bedfile <- system.file("extdata", "Chen_PROMPT_TSSs_liftedTohg38.bed", package = "RMetaTools")
bw_plus <- system.file("extdata", "GSM1573841_mNET_8WG16_siLuc_plus_hg38.bw", package = "RMetaTools")
bw_minus <- system.file("extdata", "GSM1573841_mNET_8WG16_siLuc_minus_hg38.bw", package = "RMetaTools")
anno=bedfile;anchor='center';upstream=1000;downstream=1000;window_size=10
collapse_fun = rowMeans;negate_neg_strand_values=FALSE
m <- metagene_rel_anchor(bw_plus, bw_minus, bedfile, anchor, upstream, downstream, window_size)
m
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.