You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: vignettes/BioCircos.Rmd
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -39,13 +39,13 @@ To install this package, you can use CRAN (the central R package repository) to
39
39
40
40
### From CRAN
41
41
42
-
```{r eval=FALSE}
42
+
```{r eval=FALSE, screenshot.force = FALSE}
43
43
install.packages('BioCircos')
44
44
```
45
45
46
46
### From Github
47
47
48
-
```{r eval=FALSE}
48
+
```{r eval=FALSE, screenshot.force = FALSE}
49
49
# You need devtools for that
50
50
if (!require('devtools')){install.packages('devtools')}
51
51
@@ -72,7 +72,7 @@ A genome needs to be set in order to map all the coordinates of the tracks on it
72
72
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*).
73
73
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*.
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.
83
83
You may want to change the scale of the ticks on the chromosomes, to fit to your reference genome, with the *genomeTickScale* parameters.
84
84
85
-
```{r}
85
+
```{r, screenshot.force = FALSE}
86
86
library(BioCircos)
87
87
88
88
myGenome = list("A" = 10560,
@@ -109,7 +109,7 @@ All tracks need to be named.
109
109
A first track simply corresponds to text annotations. The obligatory parameters are the track name and the text to be displayed.
110
110
Some parameters such as the size, the opacity and the coordinates can be customized.
@@ -143,7 +143,7 @@ To map punctual information associated with a single-dimensional value on the re
143
143
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.
144
144
By default, points display a tooltip when hovered by the mouse.
145
145
146
-
```{r}
146
+
```{r, screenshot.force = FALSE}
147
147
library(BioCircos)
148
148
149
149
# Chromosomes on which the points should be displayed
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.
173
173
By default, arcs display a tooltip when hovered by the mouse.
174
174
175
-
```{r}
175
+
```{r, screenshot.force = FALSE}
176
176
library(BioCircos)
177
177
178
178
arcs_chromosomes = c('X', 'X', '2', '9') # Chromosomes on which the arcs should be displayed
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.
193
193
By default, links display a tooltip when hovered by the mouse.
194
194
195
-
```{r}
195
+
```{r, screenshot.force = FALSE}
196
196
library(BioCircos)
197
197
198
198
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
220
220
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.
221
221
Here, to add a track to the tracklist at each iteration of the loop, we initialize the *tracks* tracklist with an empty *BioCircosTracklist* object.
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.
256
256
The start and end coordinates of each arc, as well as the associated value need to be specified.
The *Line tracks* display segments on a track. They are defined by the set of vertices that will be joined to produce the segments.
314
314
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.
315
315
316
-
```{r}
316
+
```{r, screenshot.force = FALSE}
317
317
chrVert = rep(c(1, 3, 5), c(20,10,5))
318
318
posVert = c(249250621*log(c(20:1, 10:1, 5:1), base = 20))
0 commit comments