get_tf: Get transcription factor correlations from cRegulome.db

Description Usage Arguments Value Examples

View source: R/get_data.R

Description

This function access the sqlite database file which is obtained by running get_db. Basically, the function provides ways to query the database to the correlation data of the transcription factors of interest. The function returns an error if the database file cRegulome.db is not in the working directory.

Usage

1
2
get_tf(conn, tf, study = NULL, min_abs_cor = NULL, max_num = NULL,
  targets_only = FALSE)

Arguments

conn

A connection to the database file by dbConnect

tf

A required character vector of the transcription factor of interest. These are the HUGO official gene symbols of the genes contains the transcription factor.

study

A character vector of The Cancer Genome Atlas (TCGA) study identifiers. To view the available studies in TCGA project, https://tcga-data.nci.nih.gov/docs/publications/tcga. When left to default NULL all available studies will be included.

min_abs_cor

A numeric, an absolute correlation minimum between 0 and 1 for each tf.

max_num

An integer, maximum number of features to show for each tf in each study.

targets_only

A logical, default FALSE. When TRUE, features will be the targets of the transcription factors as identified in the Cistrome Cancer, http://cistrome.org/CistromeCancer/

Value

A tidy data.frame of four columns. tf is the official gene symbols of the genes contains the transcription factor, feature is the features/genes, cor is the corresponding expression correlations and study is TCGA study ID.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# load required libraries
library(RSQLite)
library(cRegulome)

# locate the testset file and connect
fl <- system.file('extdata', 'cRegulome.db', package = 'cRegulome')
conn <- dbConnect(SQLite(), fl)

# get transcription factors correlations in all studies
get_tf(conn,
        tf = 'LEF1')

# get correlations in a particular study
get_tf(conn,
       tf = 'LEF1',
       study = 'STES*')

# enter a custom query with different arguments
get_tf(conn,
       tf = 'LEF1',
       study = 'STES*',
       min_abs_cor = .3,
       max_num = 5)
       

cRegulome documentation built on March 18, 2018, 1:56 p.m.