Description Usage Arguments Value Important Author(s) See Also Examples
read_anno
reads a file containing annotation data, which
will be used to select genomic regions of interest for downstream analysis.
The annotation file format is the following: "chromosome", "start", "end",
"strand", "id", "name" (optional). Read the Important section below for
more details.
1 2 3 4 5 6 7 8 9 10 11 |
file |
File name. |
chrom_size_file |
Optional file name to read genome chromosome sizes. |
chr_discarded |
Optional vector with chromosomes to be discarded. |
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. |
is_anno_region |
Logical, whether or not to create genomic region. It
should be set to TRUE, if you want to use the object as input to
|
delimiter |
Delimiter format the columns are splitted. Default is tab. |
A GRanges
object.
The GRanges object contains two or three additional metadata columns:
id
: Feature ID, e.g. Ensembl IDs for each gene.
centre
: The central (middle) location of the genomic region.
This is required when transforming 'methylation regions' in the (-1, 1)
interval, the 'centre' would be at 0.
name
(Optional) the
feature name.
These columns can be accessed as follows:
granges_obj$id
When having strand information, and we are in the antisense strand ("-"), the 'start' is automatically switched with the 'end' location.
By default columns are considered in tab delimited format.
The "name" feature is optional.
When there is no "strand" info, this can be set to "*".
C.A.Kapourani C.A.Kapourani@ed.ac.uk
read_met
, create_anno_region
,
create_region_object
1 2 3 4 5 6 | # Obtain the path to files
file <- system.file("extdata", "dummy_anno.bed", package = "BPRMeth")
anno_dt <- read_anno(file, chr_discarded = c("X"))
# Extract feature id
anno_ids <- anno_dt$id
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.