Description Usage Arguments Value Author(s) See Also Examples
create_anno_region
creates annotation regions from
annotation data, using the central point of the annotation features as
ground truth labels we create genomic regions N
bp upstream and
M
bp downstream of central location.
1 2 3 4 5 6 7 8 | create_anno_region(
anno,
chrom_size = NULL,
is_centre = FALSE,
is_window = TRUE,
upstream = -5000,
downstream = 5000
)
|
anno |
A |
chrom_size |
Object containing genome chromosome sizes, normally would
be the output of |
is_centre |
Logical, whether 'start' and 'end' locations are pre-centred. If TRUE, the mean of the locations will be chosen as centre. If FALSE, the 'start' will be chosen as the center; e.g. for genes the 'start' denotes the TSS and we use this as centre to obtain K-bp upstream and downstream of TSS. |
is_window |
Whether to consider a predefined window region around centre. If TRUE, then 'upstream' and 'downstream' parameters are used, otherwise we consider the whole region from start to end location. |
upstream |
Integer defining the length of bp upstream of 'centre' for creating the genomic region. If is_window = FALSE, this parameter is ignored. |
downstream |
Integer defining the length of bp downstream of 'centre' for creating the genomic region. If is_window = FALSE, this parameter is ignored. |
A GRanges
object containing the genomic regions.
The GRanges object contains two or three additional metadata column:
id
: Genomic region id.
centre
: Central
location of each genomic region.
name
: (Optional) Genomic
region name.
This column can be accessed as follows:
granges_object$tss
C.A.Kapourani C.A.Kapourani@ed.ac.uk
create_region_object
, read_anno
1 2 3 4 5 6 7 | # Obtain the path to files
file <- system.file("extdata", "dummy_anno.bed", package = "BPRMeth")
anno_dt <- read_anno(file, is_anno_region = FALSE)
# Create genomic region
gen_region <- create_anno_region(anno_dt)
# Extract ID
id <- gen_region$id
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.