subgroup_specific_genomic_regions: Find subgroup specific regions

Description Usage Arguments Value Author(s) See Also Examples

View source: R/genomic_region_subgroup_specificity.R

Description

Find subgroup specific regions

Usage

1
subgroup_specific_genomic_regions(gr, subgroup, present = 0.7, absent = 0.3, type = NULL)

Arguments

gr

a GRanges object generated by common_regions

subgroup

subgroup information which corresponds to samples in gr

present

how to define a common region that is specifically present in one subgroup. The subgroup specificity is calculated based on the precent matrix stored in gr. For each subgroup which is defined in subgroup, if present is a single numeric value, it means the mean value should be larger than it. It can also be a function for which the input is the vector of percent in corresponding subgroup and the output should be a single logical value.

absent

how to define a common region is specifically absent in one subgroup. Format is same as present

type

It uses a string containing 1 and 0 to represent types of specificity. E.g. '1100' means present in subgroup 1 and 2 while absent in subgroup 3 and 4. By default, it will output all combination of subgroup specificities.

Value

This function splits the original gr into a list in which each element contains regions corresponding to different subgroup specificity.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

See Also

The returned value can be sent to heatmap_subgroup_specificity to visualize the specificity.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
# following two calls are basically the same
subgroup_specific_genomic_regions(gr, subgroup, 
    present = 0.7, absent = 0.3)
subgroup_specific_genomic_regions(gr, subgroup, 
    present = function(x) mean(x) >= 0.7, 
    absent = function(x) mean(x) <= 0.3)

## End(Not run)
NULL

jokergoo/epik documentation built on Sept. 28, 2019, 9:20 a.m.