coord_sort.Rd
Sorts vector of CpG sites based on their location. All CpGs are firstly sorted by the chromosome and then by the position on the chromosome. If working with Illumina Infinium HM450K, `cg_meta` and `cg_meta_cols` parameters should keep their default values.
coord_sort( cg_list, cg_meta = data("CpG_anno450K", package = "meNet"), cg_meta_cols = list(cg_id = "IlmnID", cg_coord = "MAPINFO", cg_chr = "CHR") )
cg_list | Vector of CpG sites. |
---|---|
cg_meta | Data frame with CpGs in the rows and their location in the columns. The columns of `cg_meta` should include CpG IDs, corresponding chromosome and coordinate. By default, function uses `CpG_anno450K` data frame which contains Illumina Infinium HumanMethylation450 manifest file. |
cg_meta_cols | Named list with `cg_meta` column names. The list must include: `cg_id` naming the column with unique CpG names, `cg_chr` naming the column with chromosomes and `cg_coord` naming the column with coordinates. Default value shouldn't be changed if `cg_meta` keeps it default value. |
Sorted vector of CpGs.