Browse code

fixed knitr error

paul-shannon authored on 23/08/2021 15:17:04
Showing3 changed files

... ...
@@ -1,11 +1,11 @@
1 1
 Package: MotifDb
2 2
 Type: Package
3 3
 Title: An Annotated Collection of Protein-DNA Binding Sequence Motifs
4
-Version: 1.35.0
5
-Date: 2020-04-21
4
+Version: 1.35.2
5
+Date: 2021-08-23
6 6
 Author: Paul Shannon, Matt Richards
7 7
 Maintainer: Paul Shannon <pshannon@systemsbiology.org>
8
-Depends: R (>= 3.5.0), methods, BiocGenerics, S4Vectors, IRanges, GenomicRanges, Biostrings
8
+Depends: R (>= 3.5.0), methods, BiocGenerics, S4Vectors, IRanges, GenomicRanges, Biostrings, markdown
9 9
 Suggests: RUnit, seqLogo, BiocStyle, knitr, rmarkdown
10 10
 Imports: rtracklayer, splitstackshape
11 11
 Description: More than 9900 annotated position frequency matrices from 14 public sources, for multiple organisms.
... ...
@@ -15,5 +15,7 @@ License_restricts_use: yes
15 15
 LazyLoad: yes
16 16
 biocViews: MotifAnnotation
17 17
 VignetteBuilder:
18
-  knitr
18
+  knitr,
19
+  rmarkdown,
20
+  formatR
19 21
 Encoding: UTF-8
... ...
@@ -159,7 +159,7 @@ matrixToMemeText = function (matrices)
159 159
     s [index] = sprintf ('MOTIF %s', fixed.name)
160 160
     index = index + 1
161 161
     new.line =
162
-       sprintf ('letter-probability matrix: alength= 4 w= %d nsites= %d E=8.1e-020',
162
+       sprintf ('letter-probability matrix: alength= 4 w= %d nsites= %d E=%f',
163 163
           nrow (tfMat), 45, 8.1e-020)
164 164
     s [index] =  new.line
165 165
     index = index + 1
... ...
@@ -387,11 +387,18 @@ blendCoreAndSecondaryDataSets <- function()
387 387
      # now revise all of the tbl.md rownames: they need "core" and "secondary"
388 388
      # inserted also
389 389
 
390
-   x <- rownames(tbl.md)
390
+   x <- rownames(tbl.secondary)
391
+   x[unmapped.secondary.only] <- sub("HOCOMOCOv11", "HOCOMOCOv11-secondary-", x[unmapped.secondary.only])
392
+   x[mapping] <- sub("HOCOMOCOv11", "HOCOMOCOv11-core-", x[mapping])
391 393
 
394
+   length(x)
392 395
 
393 396
    matrices <- matrices.secondary
394 397
    tbl.md <- tbl.secondary
398
+
399
+   rownames(tbl.md) <- x
400
+   names(matrices) <- x
401
+
395 402
    save(matrices, tbl.md, file="hocomoco11.RData")
396 403
 
397 404