Description Usage Arguments Value Important Author(s) See Also Examples
read_met
reads a file containing methylation data using
the fread
function. Since there are different technologies, e.g.
array, bulk BS-Seq, scBS-Seq, and still there is no standard file format,
different options are available, check the Important section below on the
file format for each type you choose. If a file format is not availabe, you
need to read the file and create a GRanges
object, where the data
are ordered by chromosome and genomic location.
1 2 3 4 5 6 7 8 9 |
file |
File name. |
type |
Type of technology as character. Either "bulk_seq", "sc_seq" or "array". Check the Important section below for more details. |
strand_info |
Logical, whether or not the file contains strand information. |
chr_discarded |
Optional vector with chromosomes to be discarded. |
min_bulk_cov |
Minimum number of reads mapping to each CpG site. Used only for "bulk_seq" and CpGs with less reads will be discarded as noise. |
max_bulk_cov |
Maximum number of reads mapping to each CpG site. Used only for "bulk_seq" and CpGs with less reads will be discarded as noise. |
delimiter |
Delimiter format the columns are splitted. Default is tab. |
A GRanges
object.
The GRanges object contains one or two additional metadata columns:
met
: Methylation level.
For "array" this is the Beta or M-values
For "sc_seq" this is either 0 or 1 (unmethylated or methylated)
For "bulk_seq" this contains the number of methylated reads for each CpG.
total
: Total number
of reads for each CpG. Present only for "bulk_seq" type.
These columns
can be accessed as follows: granges_obj$met
Depending on technology type
we assume different
file formats.
"array"
File format: "chromosome",
"start", "strand" (optional), "met" .
"sc_seq"
File format:
"chromosome", "start", "strand" (optional), "met" . Where "met" should
contain only 1s or 0s.
"bulk_seq"
File format:
"chromosome", "start", "strand" (optional), "met", "total".
By default columns are considered in tab delimited format.
C.A.Kapourani C.A.Kapourani@ed.ac.uk
read_anno
, read_expr
,
create_region_object
1 2 3 4 5 6 | # Obtain the path to files
file <- system.file("extdata", "dummy_met.bed", package = "BPRMeth")
met_dt <- read_met(file)
# Extract methylation level
met <- met_dt$met
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.