Skip to content

Commit 7c15367

Browse files
committed
Update installation
1 parent e8d6b3f commit 7c15367

File tree

11 files changed

+119
-139
lines changed

11 files changed

+119
-139
lines changed

docs/articles/geneviewer.html

+82-78
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/geneviewer_files/D3-7.8.5/geneviewer.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
dependencies:
22
- name: geneviewerwidget
3-
version: 0.1.10
3+
version: 0.1.8
44
src: htmlwidgets
55
script: geneviewerwidget.js
66
- name: Themes
7-
version: 0.1.10
7+
version: 0.1.8
88
src: htmlwidgets
9-
script: ./lib/geneviewer-0.1.10/Themes.js
9+
script: ./lib/geneviewer-0.1.8/Themes.js
1010
- name: geneviewer
11-
version: 0.1.10
11+
version: 0.1.8
1212
src: htmlwidgets
13-
script: ./lib/geneviewer-0.1.10/geneviewer.js
13+
script: ./lib/geneviewer-0.1.8/geneviewer.js
1414
- name: D3
1515
version: 7.8.5
1616
src: htmlwidgets

docs/articles/geneviewer_files/D3-7.8.5/lib/geneviewer-0.1.10/geneviewer.js docs/articles/geneviewer_files/D3-7.8.5/lib/geneviewer-0.1.8/geneviewer.js

+5-15
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ function mergeOptions(defaultOptions, themeOptionsKey, userOptions) {
351351
function getColorScale(colorScheme, customColors, uniqueGroups) {
352352
let colorScale;
353353

354+
//customColors = { ...(customColors || {}), null: "#FFF" };
355+
354356
const schemeCategory30 = [
355357
"#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
356358
"#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf",
@@ -360,18 +362,9 @@ function getColorScale(colorScheme, customColors, uniqueGroups) {
360362
"#8c6d31", "#e7cb94", "#e7969c", "#7b4173", "#a55194"
361363
];
362364

363-
if (customColors && typeof customColors === "string") {
364-
// Handle customColors as a single color
365-
colorScale = d3.scaleOrdinal()
366-
.domain(uniqueGroups)
367-
.range(uniqueGroups.map(() => customColors));
368-
} else if (customColors && Array.isArray(customColors)) {
369-
// Handle customColors as an array
370-
colorScale = d3.scaleOrdinal()
371-
.domain(uniqueGroups)
372-
.range(uniqueGroups.map((group, index) => customColors[index % customColors.length] || "#FFF"));
373-
} else if (customColors && typeof customColors === 'object') {
374-
// Handle customColors as an object
365+
// Check if customColors is an object and not an array
366+
if (customColors && typeof customColors === 'object' && !Array.isArray(customColors)) {
367+
// Create a color scale based on the customColors object
375368
colorScale = d3.scaleOrdinal()
376369
.domain(uniqueGroups)
377370
.range(uniqueGroups.map(group => customColors[group] || "#FFF"));
@@ -388,18 +381,15 @@ function getColorScale(colorScheme, customColors, uniqueGroups) {
388381
}
389382
}
390383
} else {
391-
// Default to schemeCategory30
392384
colorScale = d3.scaleOrdinal(schemeCategory30)
393385
.domain(uniqueGroups)
394386
.range(uniqueGroups.map(group =>
395387
group === "No Hit" || group === null ? "#FFF" : schemeCategory30[uniqueGroups.indexOf(group) % schemeCategory30.length]
396388
));
397389
}
398-
399390
return colorScale;
400391
}
401392

402-
403393
function isInAnyDiscontinuity(value, breaks) {
404394
for (let gap of breaks) {
405395
if (value >= gap.start && value <= gap.end) {

docs/articles/geneviewer_files/FileSaver-2.0.4-2.0.4/geneviewer.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
dependencies:
22
- name: geneviewerwidget
3-
version: 0.1.10
3+
version: 0.1.8
44
src: htmlwidgets
55
script: geneviewerwidget.js
66
- name: Themes
7-
version: 0.1.10
7+
version: 0.1.8
88
src: htmlwidgets
9-
script: ./lib/geneviewer-0.1.10/Themes.js
9+
script: ./lib/geneviewer-0.1.8/Themes.js
1010
- name: geneviewer
11-
version: 0.1.10
11+
version: 0.1.8
1212
src: htmlwidgets
13-
script: ./lib/geneviewer-0.1.10/geneviewer.js
13+
script: ./lib/geneviewer-0.1.8/geneviewer.js
1414
- name: D3
1515
version: 7.8.5
1616
src: htmlwidgets

docs/articles/geneviewer_files/FileSaver-2.0.4-2.0.4/lib/geneviewer-0.1.10/geneviewer.js docs/articles/geneviewer_files/FileSaver-2.0.4-2.0.4/lib/geneviewer-0.1.8/geneviewer.js

+5-15
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ function mergeOptions(defaultOptions, themeOptionsKey, userOptions) {
351351
function getColorScale(colorScheme, customColors, uniqueGroups) {
352352
let colorScale;
353353

354+
//customColors = { ...(customColors || {}), null: "#FFF" };
355+
354356
const schemeCategory30 = [
355357
"#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
356358
"#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf",
@@ -360,18 +362,9 @@ function getColorScale(colorScheme, customColors, uniqueGroups) {
360362
"#8c6d31", "#e7cb94", "#e7969c", "#7b4173", "#a55194"
361363
];
362364

363-
if (customColors && typeof customColors === "string") {
364-
// Handle customColors as a single color
365-
colorScale = d3.scaleOrdinal()
366-
.domain(uniqueGroups)
367-
.range(uniqueGroups.map(() => customColors));
368-
} else if (customColors && Array.isArray(customColors)) {
369-
// Handle customColors as an array
370-
colorScale = d3.scaleOrdinal()
371-
.domain(uniqueGroups)
372-
.range(uniqueGroups.map((group, index) => customColors[index % customColors.length] || "#FFF"));
373-
} else if (customColors && typeof customColors === 'object') {
374-
// Handle customColors as an object
365+
// Check if customColors is an object and not an array
366+
if (customColors && typeof customColors === 'object' && !Array.isArray(customColors)) {
367+
// Create a color scale based on the customColors object
375368
colorScale = d3.scaleOrdinal()
376369
.domain(uniqueGroups)
377370
.range(uniqueGroups.map(group => customColors[group] || "#FFF"));
@@ -388,18 +381,15 @@ function getColorScale(colorScheme, customColors, uniqueGroups) {
388381
}
389382
}
390383
} else {
391-
// Default to schemeCategory30
392384
colorScale = d3.scaleOrdinal(schemeCategory30)
393385
.domain(uniqueGroups)
394386
.range(uniqueGroups.map(group =>
395387
group === "No Hit" || group === null ? "#FFF" : schemeCategory30[uniqueGroups.indexOf(group) % schemeCategory30.length]
396388
));
397389
}
398-
399390
return colorScale;
400391
}
401392

402-
403393
function isInAnyDiscontinuity(value, breaks) {
404394
for (let gap of breaks) {
405395
if (value >= gap.start && value <= gap.end) {

docs/articles/geneviewer_files/html2canvas-1.4.1/geneviewer.yaml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
dependencies:
22
- name: geneviewerwidget
3-
version: 0.1.10
3+
version: 0.1.8
44
src: htmlwidgets
55
script: geneviewerwidget.js
66
- name: Themes
7-
version: 0.1.10
7+
version: 0.1.8
88
src: htmlwidgets
9-
script: ./lib/geneviewer-0.1.10/Themes.js
9+
script: ./lib/geneviewer-0.1.8/Themes.js
1010
- name: geneviewer
11-
version: 0.1.10
11+
version: 0.1.8
1212
src: htmlwidgets
13-
script: ./lib/geneviewer-0.1.10/geneviewer.js
13+
script: ./lib/geneviewer-0.1.8/geneviewer.js
1414
- name: D3
1515
version: 7.8.5
1616
src: htmlwidgets

docs/articles/geneviewer_files/html2canvas-1.4.1/lib/geneviewer-0.1.10/geneviewer.js docs/articles/geneviewer_files/html2canvas-1.4.1/lib/geneviewer-0.1.8/geneviewer.js

+5-15
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ function mergeOptions(defaultOptions, themeOptionsKey, userOptions) {
351351
function getColorScale(colorScheme, customColors, uniqueGroups) {
352352
let colorScale;
353353

354+
//customColors = { ...(customColors || {}), null: "#FFF" };
355+
354356
const schemeCategory30 = [
355357
"#1f77b4", "#ff7f0e", "#2ca02c", "#d62728", "#9467bd",
356358
"#8c564b", "#e377c2", "#7f7f7f", "#bcbd22", "#17becf",
@@ -360,18 +362,9 @@ function getColorScale(colorScheme, customColors, uniqueGroups) {
360362
"#8c6d31", "#e7cb94", "#e7969c", "#7b4173", "#a55194"
361363
];
362364

363-
if (customColors && typeof customColors === "string") {
364-
// Handle customColors as a single color
365-
colorScale = d3.scaleOrdinal()
366-
.domain(uniqueGroups)
367-
.range(uniqueGroups.map(() => customColors));
368-
} else if (customColors && Array.isArray(customColors)) {
369-
// Handle customColors as an array
370-
colorScale = d3.scaleOrdinal()
371-
.domain(uniqueGroups)
372-
.range(uniqueGroups.map((group, index) => customColors[index % customColors.length] || "#FFF"));
373-
} else if (customColors && typeof customColors === 'object') {
374-
// Handle customColors as an object
365+
// Check if customColors is an object and not an array
366+
if (customColors && typeof customColors === 'object' && !Array.isArray(customColors)) {
367+
// Create a color scale based on the customColors object
375368
colorScale = d3.scaleOrdinal()
376369
.domain(uniqueGroups)
377370
.range(uniqueGroups.map(group => customColors[group] || "#FFF"));
@@ -388,18 +381,15 @@ function getColorScale(colorScheme, customColors, uniqueGroups) {
388381
}
389382
}
390383
} else {
391-
// Default to schemeCategory30
392384
colorScale = d3.scaleOrdinal(schemeCategory30)
393385
.domain(uniqueGroups)
394386
.range(uniqueGroups.map(group =>
395387
group === "No Hit" || group === null ? "#FFF" : schemeCategory30[uniqueGroups.indexOf(group) % schemeCategory30.length]
396388
));
397389
}
398-
399390
return colorScale;
400391
}
401392

402-
403393
function isInAnyDiscontinuity(value, breaks) {
404394
for (let gap of breaks) {
405395
if (value >= gap.start && value <= gap.end) {

vignettes/geneviewer.Rmd

+7-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@ knitr::opts_chunk$set(
1717

1818
## Installation
1919

20-
**geneviewer** is available through GitHub
20+
You can install the released version of **geneviewer** from CRAN with:
21+
22+
```r
23+
install.packages("geneviewer")
24+
```
25+
26+
And the development version from GitHub with:
2127

2228
``` r
2329
# install.packages("devtools")

0 commit comments

Comments
 (0)