This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Retrieve transcription factors from gene set using biomaRt

I have a dataframe meth which has genes (HGNC symbol) as rownames and samples as column names. I want to find which gene in the rownames are transcription factors using biomaRt in R. This list should be returned as a vector.

Example:

> rownames(meth)
   [1] "A1BG"            "A1CF"            "A2BP1"           "A2LD1"          
   [5] "A2M"             "A2ML1"           "A4GALT"          "AAAS"   

If AIBG, A2BP1, and A2LD1 are transcription factors, return as vector:

[1] "A1BG"  "A2BP1" "A2LD1"

On the biomart website, I can choose for example: Database: Ensembl Regulation 107 Dataset: Human Regulatory Features

But I want to find the TFs using R code.

My preliminary attempt did not filter for transcription factors.

# Biomart query
if(interactive()){
  mart <- useEnsembl(biomart = "ensembl",
                     dataset = "hsapiens_gene_ensembl")
  getBM(attributes = c("ensembl_gene_id", "p_value", "hgnc_symbol", "entrezgene_id"),
        values = as.vector(rownames(meth)),
        mart = mart)
}
factors r transcription biomart

1 answer

Use a dedicated database rather than reinventing the wheel. We usually use http://bioinfo.life.hust.edu.cn/AnimalTFDB/#!/download

Log in to answer this question.