├── .Rbuildignore
├── LICENSE
├── .gitignore
├── NAMESPACE
├── data
├── encode_pwms.rda
├── homer_pwms.rda
├── human_pwms_v1.rda
├── human_pwms_v2.rda
├── mouse_pwms_v1.rda
└── mouse_pwms_v2.rda
├── man
├── chromVARmotifs.Rd
├── homer_pwms.Rd
├── encode_pwms.Rd
├── human_pwms_v1.Rd
├── mouse_pwms_v1.Rd
├── human_pwms_v2.Rd
└── mouse_pwms_v2.Rd
├── DESCRIPTION
├── README.md
└── R
└── motifs.R
/.Rbuildignore:
--------------------------------------------------------------------------------
1 | ^.*\.Rproj$
2 | ^\.Rproj\.user$
3 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | YEAR: 2017
2 | COPYRIGHT HOLDER: Stanford University
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .Rproj.user
2 | .Rhistory
3 | .RData
4 | .Ruserdata
5 | *.Rproj
--------------------------------------------------------------------------------
/NAMESPACE:
--------------------------------------------------------------------------------
1 | # Generated by roxygen2: do not edit by hand
2 |
3 | import(TFBSTools)
4 |
--------------------------------------------------------------------------------
/data/encode_pwms.rda:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GreenleafLab/chromVARmotifs/HEAD/data/encode_pwms.rda
--------------------------------------------------------------------------------
/data/homer_pwms.rda:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GreenleafLab/chromVARmotifs/HEAD/data/homer_pwms.rda
--------------------------------------------------------------------------------
/data/human_pwms_v1.rda:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GreenleafLab/chromVARmotifs/HEAD/data/human_pwms_v1.rda
--------------------------------------------------------------------------------
/data/human_pwms_v2.rda:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GreenleafLab/chromVARmotifs/HEAD/data/human_pwms_v2.rda
--------------------------------------------------------------------------------
/data/mouse_pwms_v1.rda:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GreenleafLab/chromVARmotifs/HEAD/data/mouse_pwms_v1.rda
--------------------------------------------------------------------------------
/data/mouse_pwms_v2.rda:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GreenleafLab/chromVARmotifs/HEAD/data/mouse_pwms_v2.rda
--------------------------------------------------------------------------------
/man/chromVARmotifs.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/motifs.R
3 | \docType{package}
4 | \name{chromVARmotifs}
5 | \alias{chromVARmotifs}
6 | \alias{chromVARmotifs-package}
7 | \title{chromVARmotifs: Collections of motifs for use with chromVAR}
8 | \description{
9 | Collections of motifs in a format for easy use with motifmatchr and chromVAR
10 | packages.
11 | }
12 |
--------------------------------------------------------------------------------
/man/homer_pwms.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/motifs.R
3 | \docType{data}
4 | \name{homer_pwms}
5 | \alias{homer_pwms}
6 | \title{homer_pwms}
7 | \usage{
8 | data(homer_pwms)
9 | }
10 | \value{
11 | \code{\link[TFBSTools]{XMatrixList}} of length 332
12 | }
13 | \description{
14 | Collection of motifs from HOMER (http://homer.ucsd.edu/homer/custom.motifs)
15 | }
16 | \details{
17 | Position frequency matrices were converted to PWMs by taking the log
18 | of the frequencies divided by 0.25.
19 | }
20 | \examples{
21 | data(homer_pwms)
22 | }
23 | \keyword{datasets}
24 |
--------------------------------------------------------------------------------
/man/encode_pwms.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/motifs.R
3 | \docType{data}
4 | \name{encode_pwms}
5 | \alias{encode_pwms}
6 | \title{encode_pwms}
7 | \usage{
8 | data(encode_pwms)
9 | }
10 | \value{
11 | \code{\link[TFBSTools]{XMatrixList}} of length 1346
12 | }
13 | \description{
14 | Collection of motifs from ENCODE project
15 | }
16 | \details{
17 | Position frequency matrices were converted to PWMs by taking the log
18 | of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
19 | }
20 | \examples{
21 | data(encode_pwms)
22 | }
23 | \keyword{datasets}
24 |
--------------------------------------------------------------------------------
/man/human_pwms_v1.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/motifs.R
3 | \docType{data}
4 | \name{human_pwms_v1}
5 | \alias{human_pwms_v1}
6 | \title{human_pwms_v1}
7 | \usage{
8 | data(human_pwms_v1)
9 | }
10 | \value{
11 | \code{\link[TFBSTools]{XMatrixList}} of length 1764
12 | }
13 | \description{
14 | Collection of human pwms
15 | }
16 | \details{
17 | These motifs were curated from the cisBP database. Position
18 | frequency matrices were converted to PWMs by taking the log
19 | of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
20 | }
21 | \examples{
22 | data(human_pwms_v1)
23 | }
24 | \keyword{datasets}
25 |
--------------------------------------------------------------------------------
/man/mouse_pwms_v1.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/motifs.R
3 | \docType{data}
4 | \name{mouse_pwms_v1}
5 | \alias{mouse_pwms_v1}
6 | \title{mouse_pwms_v1}
7 | \usage{
8 | data(mouse_pwms_v1)
9 | }
10 | \value{
11 | \code{\link[TFBSTools]{XMatrixList}} of length 1346
12 | }
13 | \description{
14 | Collection of mouse pwms
15 | }
16 | \details{
17 | These motifs were curated from the cisBP database. Position
18 | frequency matrices were converted to PWMs by taking the log
19 | of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
20 | }
21 | \examples{
22 | data(mouse_pwms_v1)
23 | }
24 | \keyword{datasets}
25 |
--------------------------------------------------------------------------------
/man/human_pwms_v2.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/motifs.R
3 | \docType{data}
4 | \name{human_pwms_v2}
5 | \alias{human_pwms_v2}
6 | \title{human_pwms_v2}
7 | \usage{
8 | data(human_pwms_v1)
9 | }
10 | \value{
11 | \code{\link[TFBSTools]{XMatrixList}} of length 870
12 | }
13 | \description{
14 | Collection of human pwms filtered from version 1
15 | }
16 | \details{
17 | These motifs were curated from the cisBP database. Position
18 | frequency matrices were converted to PWMs by taking the log
19 | of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
20 | }
21 | \examples{
22 | data(human_pwms_v2)
23 | }
24 | \keyword{datasets}
25 |
--------------------------------------------------------------------------------
/man/mouse_pwms_v2.Rd:
--------------------------------------------------------------------------------
1 | % Generated by roxygen2: do not edit by hand
2 | % Please edit documentation in R/motifs.R
3 | \docType{data}
4 | \name{mouse_pwms_v2}
5 | \alias{mouse_pwms_v2}
6 | \title{mouse_pwms_v2}
7 | \usage{
8 | data(mouse_pwms_v2)
9 | }
10 | \value{
11 | \code{\link[TFBSTools]{XMatrixList}} of length 884
12 | }
13 | \description{
14 | Collection of mouse pwms filtered from version 1
15 | }
16 | \details{
17 | These motifs were curated from the cisBP database. Position
18 | frequency matrices were converted to PWMs by taking the log
19 | of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
20 | }
21 | \examples{
22 | data(mouse_pwms_v2)
23 | }
24 | \keyword{datasets}
25 |
--------------------------------------------------------------------------------
/DESCRIPTION:
--------------------------------------------------------------------------------
1 | Package: chromVARmotifs
2 | Type: Package
3 | Title: Stores motifs as PWMatrixList objects
4 | Version: 0.2.0
5 | Authors@R: c(
6 | person("Alicia", "Schep", email = "aschep@gmail.com", role = c("aut","cre")),
7 | person("Jason", "Buenrostro", role = "ctb"),
8 | person("Caleb", "Lareau", role = "ctb"),
9 | person("William","Greenleaf", role = "ths"),
10 | person("Stanford University", role = "cph"))
11 | Description: Stores several motifs as PWMatrixList objects for use in R with
12 | packages like motifmatchr and chromVAR.
13 | Encoding: UTF-8
14 | LazyData: true
15 | License: MIT + file LICENSE
16 | Depends: R (>= 3.3)
17 | Imports: TFBSTools
18 | biocViews: MotifAnnotation
19 | RoxygenNote: 6.0.1
20 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # chromVARmotifs
2 |
3 | The goal of chromVARmotifs is to make it easy to use several different motif collections in R, particularly for use with motifmatchr and chromVAR packages. Motifs are stored as PWMatrixList objects (object from TFBSTools package).
4 |
5 | ## Installation
6 |
7 | Installation is easiest using the devtools package. The function `install_github` will install the package.
8 |
9 | ``` r
10 | devtools::install_github("GreenleafLab/chromVARmotifs")
11 | ```
12 |
13 | The TFBSTools package from Bioconductor is the only direct dependency; the PWMatrixList object from that package is used to store the motifs.
14 |
15 | ## Motif collections included:
16 |
17 | ``` r
18 | data("human_pwms_v1") #curated collection of human motifs from cisBP database
19 | data("mouse_pwms_v1") #curated collection of mouse motifs from cisBP database
20 | data("human_pwms_v2") #filtered collection of human motifs from cisBP database
21 | data("mouse_pwms_v2") #filtered collection of mouse motifs from cisBP database
22 | data("homer_pwms") #motifs from HOMER
23 | data("encode_pwms") #motifs from ENCODE
24 | ```
25 |
26 | ## Version 2
27 |
28 | The script used to make the "version 2" motifs (curated from the large master list for
29 | less redundancy) is shown below:
30 |
31 |
32 | ```r
33 | library(chromVARmotifs)
34 | library(dplyr)
35 | library(tidyr)
36 | library(data.table)
37 | data("human_pwms_v1")
38 | data("mouse_pwms_v1")
39 |
40 | sout <- sapply(strsplit(names(human_pwms_v1), split = "_"), function(s) c(s[3]))
41 | human_pwms_v2 <- human_pwms_v1[match(unique(sout), sout)]
42 |
43 | sout <- sapply(strsplit(names(mouse_pwms_v1), split = "_"), function(s) c(s[3]))
44 | mouse_pwms_v2 <- mouse_pwms_v1[match(unique(sout), sout)]
45 |
46 | save(human_pwms_v2, file = 'human_pwms_v2.rda')
47 | save(mouse_pwms_v2, file = 'mouse_pwms_v2.rda')
48 | ```
49 |
50 | ## Conversion to PWM
51 |
52 | Motifs originally in position frequency matrix form were converted to PWMs as follows:
53 |
54 | 1) Except for `homer_pwms`, a 0.008 pseudocount was added. Frequencies were then re-normalized to sum to 1.
55 | 2) Frequencies were divided by 0.25
56 | 3) Computed the log of the relative frequencies
57 |
58 | ## Curation of cisBP motifs
59 |
60 | We curated the motifs from the cisBP database to ensure each TF regulator was represented by at least one motif while reducing redundancy for the motifs linked to each TF>
61 |
62 | ## Sources
63 |
64 | `encode_pwms` are based on http://compbio.mit.edu/encode-motifs/
65 | `homer_pwms` are based on http://homer.ucsd.edu/homer/custom.motifs
66 | `human_pwms_v1` and `mouse_pwms_v1` are based on http://cisbp.ccbr.utoronto.ca/
67 |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/R/motifs.R:
--------------------------------------------------------------------------------
1 | #' chromVARmotifs: Collections of motifs for use with chromVAR
2 | #'
3 | #' Collections of motifs in a format for easy use with motifmatchr and chromVAR
4 | #' packages.
5 | #'
6 | #' @import TFBSTools
7 | #' @docType package
8 | #' @name chromVARmotifs
9 | NULL
10 | # > NULL
11 |
12 |
13 | #' human_pwms_v1
14 | #'
15 | #' Collection of human pwms
16 | #' @docType data
17 | #' @keywords datasets
18 | #' @name human_pwms_v1
19 | #' @details These motifs were curated from the cisBP database. Position
20 | #' frequency matrices were converted to PWMs by taking the log
21 | #' of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
22 | #' @usage data(human_pwms_v1)
23 | #' @return \code{\link[TFBSTools]{XMatrixList}} of length 1764
24 | #' @examples
25 | #' data(human_pwms_v1)
26 | NULL
27 |
28 | #' mouse_pwms_v1
29 | #'
30 | #' Collection of mouse pwms
31 | #' @details These motifs were curated from the cisBP database. Position
32 | #' frequency matrices were converted to PWMs by taking the log
33 | #' of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
34 | #' @docType data
35 | #' @keywords datasets
36 | #' @name mouse_pwms_v1
37 | #' @usage data(mouse_pwms_v1)
38 | #' @return \code{\link[TFBSTools]{XMatrixList}} of length 1346
39 | #' @examples
40 | #' data(mouse_pwms_v1)
41 | NULL
42 |
43 |
44 | #' human_pwms_v2
45 | #'
46 | #' Collection of human pwms filtered from version 1
47 | #' @docType data
48 | #' @keywords datasets
49 | #' @name human_pwms_v2
50 | #' @details These motifs were curated from the cisBP database. Position
51 | #' frequency matrices were converted to PWMs by taking the log
52 | #' of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
53 | #' @usage data(human_pwms_v1)
54 | #' @return \code{\link[TFBSTools]{XMatrixList}} of length 870
55 | #' @examples
56 | #' data(human_pwms_v2)
57 | NULL
58 |
59 | #' mouse_pwms_v2
60 | #'
61 | #' Collection of mouse pwms filtered from version 1
62 | #' @details These motifs were curated from the cisBP database. Position
63 | #' frequency matrices were converted to PWMs by taking the log
64 | #' of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
65 | #' @docType data
66 | #' @keywords datasets
67 | #' @name mouse_pwms_v2
68 | #' @usage data(mouse_pwms_v2)
69 | #' @return \code{\link[TFBSTools]{XMatrixList}} of length 884
70 | #' @examples
71 | #' data(mouse_pwms_v2)
72 | NULL
73 |
74 | #' encode_pwms
75 | #'
76 | #' Collection of motifs from ENCODE project
77 | #' @details Position frequency matrices were converted to PWMs by taking the log
78 | #' of the frequencies (after adding a pseudocount of 0.008) divided by 0.25.
79 | #' @docType data
80 | #' @keywords datasets
81 | #' @name encode_pwms
82 | #' @usage data(encode_pwms)
83 | #' @return \code{\link[TFBSTools]{XMatrixList}} of length 1346
84 | #' @examples
85 | #' data(encode_pwms)
86 | NULL
87 |
88 | #' homer_pwms
89 | #'
90 | #' Collection of motifs from HOMER (http://homer.ucsd.edu/homer/custom.motifs)
91 | #' @details Position frequency matrices were converted to PWMs by taking the log
92 | #' of the frequencies divided by 0.25.
93 | #'
94 | #' @docType data
95 | #' @keywords datasets
96 | #' @name homer_pwms
97 | #' @usage data(homer_pwms)
98 | #' @return \code{\link[TFBSTools]{XMatrixList}} of length 332
99 | #' @examples
100 | #' data(homer_pwms)
101 | NULL
102 |
103 |
--------------------------------------------------------------------------------