Skip to contents

Convert a MotifDB object back to a tidy data frame

Usage

motif_db_to_dataframe(motif_db)

Arguments

motif_db

A MotifDB object

Value

A tidy data frame with columns for motif, position, and nucleotide probabilities

Examples

head(motif_db_to_dataframe(MOTIF_DB))
#> # A tibble: 6 x 6
#>                          motif pos           A           C           G
#> 1 HOCOMOCO.AHR_HUMAN.H11MO.0.B   1 0.266233766 0.116883117 0.363636364
#> 2 HOCOMOCO.AHR_HUMAN.H11MO.0.B   2 0.071428571 0.077922078 0.227272727
#> 3 HOCOMOCO.AHR_HUMAN.H11MO.0.B   3 0.142857143 0.285714286 0.136363636
#> 4 HOCOMOCO.AHR_HUMAN.H11MO.0.B   4 0.019480519 0.006493506 0.948051948
#> 5 HOCOMOCO.AHR_HUMAN.H11MO.0.B   5 0.006493506 0.974025974 0.006493506
#> 6 HOCOMOCO.AHR_HUMAN.H11MO.0.B   6 0.019480519 0.006493506 0.967532468
#>             T
#> 1 0.253246753
#> 2 0.623376623
#> 3 0.435064935
#> 4 0.025974026
#> 5 0.012987013
#> 6 0.006493506