Gene List Prioritization using Transciption Factor Target Enrichment - Anderson-Lab/ComplementaryDomainPrioritization GitHub Wiki
Required File
From the previous step, you should have a tsv from the pathway enrichment analysis against the Transcription Factor Target Database. This database is the C3: motif gene set database database which is part of the BROAD Institute's GSEA MSigDB collection. This package uses a local version of the database to retrieve gene lists based on gene set IDs. The current version in this package is based on TRANSFAC (v7.4) which is 615 gene sets. For simplicity here we will refer to this as the TF database.
For this example, we will call this file
tf_protein_enrichment.tsv
Extract pathway IDs from tsv and generate gene list
Place the tsv into your working directory (otherwise specify the path) and extract the gene set labels into a data frame (second column will contain the pathway IDs)
file = "tf_protein_enrichment.tsv"
tf.pathways = load.WebGestalt(file,'TF')
Now we can use the list of gene sets to generate a gene list.
TFgene.ids = get.genes.tf(tf.pathways)
Create prioritized gene list from transcriptomic data
First load the gene data, which in this example will be
Cattaneo_array.csv
This data (and other example files) can be downloaded from here in addition to using our R function:
download.example.data()
The load.gene.data function requires a string pointing to the location of the data file and an integer ≥2 that indicates which column the actual data starts. In this example, it is the fifth column. This will generate two data frames, the second is formatted and transposed version of the original data with a $label column added.
file = "Cattaneo_array.csv"
Cattaneo.rna = load.gene.data(file,5)
TFprioritized.data = list.filter(Cattaneo.rna$transposed.data,TFgene.ids)
This data frame will have the transposed data prioritized data from the original transcriptomic data frame. In this example if we wanted to perform statistics on this data we could use the TFprioritized.data$label to assign class labels.
In the next step we will apply an independent filter to this data.