define_pathway_loc: define_pathway_loc.R

Description Usage Arguments Value Examples

View source: R/define_pathway_loc.R

Description

Pathways are most often defined by sets of genes, while genotype data is at the SNP-level and is identified by chromosome (CHR) and base pair (BP). To link Pathways – SNPs, we need this function to tell us the genetic positions defined by each gene (and thus each pathway). Incorporates some error checking and checkpointing messages.

Usage

1
define_pathway_loc(gene_tab, pathway_genes, gene_sig_tab = NULL, checkpoint)

Arguments

gene_tab

A data frame that has columns Gene, CHR, BP for the annotation corresponding to the genotype data.

pathway_genes

A vector with the name of all the genes in the pathway of interest.

gene_sig_tab

A table holding the p-value of each gene. Should only have the columns 'Gene' and 'P_value'. If specified, then the returned pathway_info will be sorted in increasing order of p_value. If null, then no sorting.

checkpoint

A boolean variable - TRUE if you want this function to print some diagnostic messages.

Value

A data frame containing columns for Gene, CHR, Start, End for all genes in your pathawy.

Examples

1
2
new_gene_tab <- data.frame(Gene=paste('Gene', 1:5, sep=''), CHR=1, Start=1:5, End=10:15)
define_gene_location(gene_tab=new_gene_tab, pathway_genes=c('Gene1', 'Gene2'), checkpoint=FALSE)

ryanrsun/LungCancerAssoc documentation built on May 24, 2019, 7:26 p.m.