ADWGS_test {ActiveDriverWGS}R Documentation

ADWGS_test executes the statistical test for ActiveDriverWGS

Description

ADWGS_test executes the statistical test for ActiveDriverWGS

Usage

ADWGS_test(
  id,
  gr_element_coords,
  gr_site_coords,
  gr_maf,
  win_size,
  this_genome
)

Arguments

id

A string used to identify the element of interest. id corresponds to an element in the id column of the elements file

gr_element_coords

A GenomicRanges object that describes the elements of interest containing the chromosome, start and end coordinates, and an mcols column corresponding to id

gr_site_coords

A GenomicRanges object that describes the sites of interest which reside in the elements of interest containing the chromosome, start and end coordinates, and an mcols column corresponding to id. Examples of sites include transcription factor binding sites in promoter regions or phosphosites in exons of protein coding genes. An empty GenomicRanges object nullifies the requirement for sites to exist.

gr_maf

A GenomicRanges object that describes the mutations in the dataset containing the chromosome, start and end coordinates, patient id, and trinucleotide context

win_size

An integer indicating the size of the background window in base pairs that is used to establish the expected mutation rate and respective null model. The default is 50000bps

this_genome

The reference genome object of BSgenome, for example BSgenome.Hsapiens.UCSC.hg19::Hsapiens

Value

A data frame containing the following columns

id

A string identifying the element of interest

pp_element

The p-value of the element

element_muts_obs

The number of patients with a mutation in the element

element_muts_exp

The expected number of patients with a mutation in the element with respect to background

element_enriched

A boolean indicating whether the element is enriched in mutations

pp_site

The p-value of the site

site_muts_obs

The number of patients with a mutation in the site

site_muts_exp

The expected number of patients with a mutation in the site with respect to element

site_enriched

A boolean indicating whether the site is enriched in mutations

result_number

A numeric indicator denoting the order in which the results were calculated

fdr_element

The FDR corrected p-value of the element

fdr_site

The FDR corrected p-value of the site

has_site_mutations

A V indicates the presence of site mutations

Examples


library(GenomicRanges)

# Regions
data(cancer_genes)
gr_element_coords = GRanges(seqnames = cancer_genes$chr,
IRanges(start = cancer_genes$start, end = cancer_genes$end),
mcols = cancer_genes$id)

# Sites (NULL)
gr_site_coords = GRanges(c(seqnames=NULL,ranges=NULL,strand=NULL))

# Reference genome
this_genome = BSgenome.Hsapiens.UCSC.hg19::Hsapiens

# Mutations
data(cll_mutations)
cll_mutations = format_muts(cll_mutations, this_genome = this_genome)

gr_maf = GRanges(cll_mutations$chr,
IRanges(cll_mutations$pos1, cll_mutations$pos2),
mcols=cll_mutations[,c("patient", "tag")])

# ADWGS_test
id = "ATM"
result = ADWGS_test(id, gr_element_coords, gr_site_coords, gr_maf, 
	win_size = 50000, this_genome = this_genome)


[Package ActiveDriverWGS version 1.1.2 Index]