Skip to content

Commit 51255fb

Browse files
committed
Solve the _R_CHECK_LENGTH_1_CONDITION_
warning and the warning raised on CRAN machines without Pandoc installed
1 parent edcb386 commit 51255fb

2 files changed

Lines changed: 17 additions & 17 deletions

File tree

R/BioCircos.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1113,7 +1113,7 @@ BioCircosTracklist <- function(){
11131113
colorError = paste0("\'", varName,
11141114
"\' parameter should be either a vector of chromosome colors or the name of a RColorBrewer brewer.")
11151115
if(class(colVar) == "character"){
1116-
if((colVar %in% rownames(RColorBrewer::brewer.pal.info))&&(length(colVar) == 1)) { # RColorBrewer's brewer
1116+
if(all(colVar %in% rownames(RColorBrewer::brewer.pal.info))&(length(colVar) == 1)) { # RColorBrewer's brewer
11171117
colVar = grDevices::colorRampPalette(RColorBrewer::brewer.pal(8, colVar))(colLength)
11181118
}
11191119
else if(!all(grepl("^#", colVar))){ # Not RGB values

vignettes/BioCircos.Rmd

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ To install this package, you can use CRAN (the central R package repository) to
3939

4040
### From CRAN
4141

42-
```{r eval=FALSE}
42+
```{r eval=FALSE, screenshot.force = FALSE}
4343
install.packages('BioCircos')
4444
```
4545

4646
### From Github
4747

48-
```{r eval=FALSE}
48+
```{r eval=FALSE, screenshot.force = FALSE}
4949
# You need devtools for that
5050
if (!require('devtools')){install.packages('devtools')}
5151
@@ -72,7 +72,7 @@ A genome needs to be set in order to map all the coordinates of the tracks on it
7272
For now, the only pre-configured genome available is *hg19* (GRCh37), for which the length of the main 22 genomic autosomal chromosome pairs and of the sexual chromosomes are available. The Y chromosome can be removed using the *ychr* parameter. Visual parameters are also available, such as by giving a vector of colors or a *RColorBrewer* palette to change the colors of each chromosome (parameter *genomeFillColor*), the space between each chromosome (*chrPad*) or their borders (*displayGenomeBorder*).
7373
The ticks, displaying the scale on each chromosome, can be removed with *genomeTicksDisplay*, and the genome labels (chromosome names) can be brought closer or further away from the chromosomes with *genomeLabelDy*.
7474

75-
```{r}
75+
```{r, screenshot.force = FALSE}
7676
library(BioCircos)
7777
7878
BioCircos(genome = "hg19", yChr = FALSE, genomeFillColor = "Reds", chrPad = 0,
@@ -82,7 +82,7 @@ BioCircos(genome = "hg19", yChr = FALSE, genomeFillColor = "Reds", chrPad = 0,
8282
To use your own reference genome, you need to define a named list of chromosomal lengths and use it as the *genome* parameter. The names and lengths should match the coordinates you plan on using later for your tracks.
8383
You may want to change the scale of the ticks on the chromosomes, to fit to your reference genome, with the *genomeTickScale* parameters.
8484

85-
```{r}
85+
```{r, screenshot.force = FALSE}
8686
library(BioCircos)
8787
8888
myGenome = list("A" = 10560,
@@ -109,7 +109,7 @@ All tracks need to be named.
109109
A first track simply corresponds to text annotations. The obligatory parameters are the track name and the text to be displayed.
110110
Some parameters such as the size, the opacity and the coordinates can be customized.
111111

112-
```{r}
112+
```{r, screenshot.force = FALSE}
113113
library(BioCircos)
114114
115115
tracklist = BioCircosTextTrack('myTextTrack', 'Some text', size = "2em", opacity = 0.5,
@@ -126,7 +126,7 @@ BioCircos(tracklist, genomeFillColor = "PuOr",
126126

127127
Another simple track type correspond to backgrounds, displayed under other tracks, in a given radius interval.
128128

129-
```{r}
129+
```{r, screenshot.force = FALSE}
130130
library(BioCircos)
131131
132132
tracklist = BioCircosBackgroundTrack("myBackgroundTrack", minRadius = 0.5, maxRadius = 0.8,
@@ -143,7 +143,7 @@ To map punctual information associated with a single-dimensional value on the re
143143
It is therefore needed to specify the chromosome and coordinates where each points are mapped, as well as the corresponding value, which will be used to compute the radial coordinate of the points.
144144
By default, points display a tooltip when hovered by the mouse.
145145

146-
```{r}
146+
```{r, screenshot.force = FALSE}
147147
library(BioCircos)
148148
149149
# Chromosomes on which the points should be displayed
@@ -172,7 +172,7 @@ BioCircos(tracklist, genomeFillColor = "PuOr",
172172
Arc tracks are displaying arcs along the genomic circle, between the radii given as the *minRadius* and *maxRadius* parameters. As for an SNP track, the chromosome and coordinates (here corresponding to the beginning and end of each arc) should be specified.
173173
By default, arcs display a tooltip when hovered by the mouse.
174174

175-
```{r}
175+
```{r, screenshot.force = FALSE}
176176
library(BioCircos)
177177
178178
arcs_chromosomes = c('X', 'X', '2', '9') # Chromosomes on which the arcs should be displayed
@@ -192,7 +192,7 @@ BioCircos(tracklist, genomeFillColor = "PuOr",
192192
Links track represent links between different genomic position. They are displayed at the center of the visualization, and out to a radius specified by the *maxRadius* parameter. The chromosomes and beginning and end positions of the regions to be linked are necessary, and labels can be added.
193193
By default, links display a tooltip when hovered by the mouse.
194194

195-
```{r}
195+
```{r, screenshot.force = FALSE}
196196
library(BioCircos)
197197
198198
links_chromosomes_1 = c('X', '2', '9') # Chromosomes on which the links should start
@@ -220,7 +220,7 @@ Bar plots may be added on another type of tracks. The start and end coordinates
220220
By default, the radial range of the track will stretch from the minimal to the maximum value of the track, but other boundaries may be specified with the *range* parameter.
221221
Here, to add a track to the tracklist at each iteration of the loop, we initialize the *tracks* tracklist with an empty *BioCircosTracklist* object.
222222

223-
```{r figBarTrack, fig.width=4, fig.height=4, fig.align = 'center'}
223+
```{r figBarTrack, fig.width=4, fig.height=4, fig.align = 'center', screenshot.force = FALSE}
224224
library(BioCircos)
225225
library(RColorBrewer)
226226
library(grDevices)
@@ -255,7 +255,7 @@ BioCircos(tracks, genomeFillColor = "YlOrBr", genome = as.list(lengthChr),
255255
Conceptually close to bar tracks, and commonly used for purposes such as representation of copy number variants, the CNV tracks consist of arcs at a given radial distance showing a value associated with a genome stretch.
256256
The start and end coordinates of each arc, as well as the associated value need to be specified.
257257

258-
```{r figCNVTrack}
258+
```{r figCNVTrack, screenshot.force = FALSE}
259259
library(BioCircos)
260260
261261
# Arcs coordinates
@@ -282,7 +282,7 @@ BioCircos(tracks, genomeFillColor = "YlOrBr", genomeTicksDisplay = F, genomeLabe
282282
For a given genome stretch, heatmaps associate linearly numerical values with a color range.
283283
For two-dimensional heatmaps, you can stack up *heatmap tracks*, as done in the following example.
284284

285-
```{r}
285+
```{r, screenshot.force = FALSE}
286286
library(BioCircos)
287287
288288
# Define a custom genome
@@ -313,7 +313,7 @@ BioCircos(tracks, genome = as.list(lengthChr), genomeTicksDisplay = F, genomeLab
313313
The *Line tracks* display segments on a track. They are defined by the set of vertices that will be joined to produce the segments.
314314
If the vertices provided span multiple chromosomes, the segments between the last point on a chromosome and the first point on the next chromosome will be discarded.
315315

316-
```{r}
316+
```{r, screenshot.force = FALSE}
317317
chrVert = rep(c(1, 3, 5), c(20,10,5))
318318
posVert = c(249250621*log(c(20:1, 10:1, 5:1), base = 20))
319319
@@ -331,7 +331,7 @@ BioCircos(tracks, chrPad = 0.05, displayGenomeBorder = FALSE, LINEMouseOutDispla
331331

332332
Tracks can be removed from a track list by substracting the name of the corresponding track.
333333

334-
```{r}
334+
```{r, screenshot.force = FALSE}
335335
library(BioCircos)
336336
337337
# Create a tracklist with a text annotation and backgrounds
@@ -347,7 +347,7 @@ BioCircos(tracklist - 't1')
347347

348348
You can combine and overlap as many tracks as you want.
349349

350-
```{r figMultiTrack, fig.width=5, fig.height=5, fig.align = 'center'}
350+
```{r figMultiTrack, fig.width=5, fig.height=5, fig.align = 'center', screenshot.force = FALSE}
351351
library(BioCircos)
352352
353353
# Fix random generation for reproducibility
@@ -422,6 +422,6 @@ The package **heatmaply** was used as a model for this vignette, as well as for
422422

423423
## Session info
424424

425-
```{r sessionINFO}
425+
```{r sessionINFO, screenshot.force = FALSE}
426426
sessionInfo()
427427
```

0 commit comments

Comments
 (0)