This function takes the output of get_gene_regulators() with
format multirow,
onerow or table, or a vector with genes and retrieves information about the
TFs and their regulated genes
get_regulatory_summary(regulondb, gene_regulators)A regulondb() object.
Result from get_gene_regulators() or vector of
genes
A data frame with the following columns:
The name or gene of TF
Regulated Genes per TF
Percent of regulated genes per TF
positive, negative or dual regulation
Name(s) of regulated genes
## Connect to the RegulonDB database if necessary
if (!exists("regulondb_conn")) regulondb_conn <- connect_database()
## Build the regulon db object
e_coli_regulondb <-
    regulondb(
        database_conn = regulondb_conn,
        organism = "E.coli",
        database_version = "1",
        genome_version = "1"
    )
## Get the araC regulators
araC_regulation <-
    get_gene_regulators(
        e_coli_regulondb,
        genes = c("araC"),
        format = "multirow",
        output.type = "TF"
    )
## Summarize the araC regulation
get_regulatory_summary(e_coli_regulondb, araC_regulation)
#> regulondb_result with 3 rows and 7 columns
#>            TF Regulated_genes_per_TF          Percent   Activator   Repressor
#>   <character>            <character>      <character> <character> <character>
#> 1        AraC                      1 33.3333333333333           0           0
#> 2         CRP                      1 33.3333333333333           1           0
#> 3        XylR                      1 33.3333333333333           0           1
#>          Dual Regulated_genes
#>   <character>     <character>
#> 1           1            araC
#> 2           0            araC
#> 3           0            araC
## Retrieve summary of genes 'araC' and 'modB'
get_regulatory_summary(e_coli_regulondb,
    gene_regulators = c("araC", "modB")
)
#> regulondb_result with 4 rows and 7 columns
#>            TF Regulated_genes_per_TF     Percent   Activator   Repressor
#>   <character>            <character> <character> <character> <character>
#> 1        AraC                      1          20           0           0
#> 2         CRP                      2          40           2           0
#> 3        ModE                      1          20           0           1
#> 4        XylR                      1          20           0           1
#>          Dual Regulated_genes
#>   <character>     <character>
#> 1           1            araC
#> 2           0      modB, araC
#> 3           0            modB
#> 4           0            araC
## Obtain the summary for 'ECK120000050' and 'modB'
get_regulatory_summary(e_coli_regulondb,
    gene_regulators = c("ECK120000050", "modB")
)
#> regulondb_result with 4 rows and 7 columns
#>            TF Regulated_genes_per_TF     Percent   Activator   Repressor
#>   <character>            <character> <character> <character> <character>
#> 1        AraC                      1          20           0           0
#> 2         CRP                      2          40           2           0
#> 3        ModE                      1          20           0           1
#> 4        XylR                      1          20           0           1
#>          Dual Regulated_genes
#>   <character>     <character>
#> 1           1            araC
#> 2           0      modB, araC
#> 3           0            modB
#> 4           0            araC