Learn how to use Gigwa like a pro in a few minutes!
@@ -582,6 +582,9 @@
maxDistanceMatrixSize - Max dimension of the genotyping matrix (#samples x #SNPs) to calculate distance matrix on. Default is 1 billion (1E9)
+
+
igvProxiedDomains - CSV list of domains (supporting wildcards) for which IGV.js will use a proxy to access genome / track files (workaround for CORS issues)
");
}
+function updateChartWidth() {
+ const chartContainer = document.getElementById('densityChartArea');
+ if (!chartContainer)
+ return;
+
+ const containerWidth = chartContainer.clientWidth;
+ const requiredWidth = $('#widthMultiplier').val() * containerWidth;
+
+ chartContainer.style.minWidth = '100%';
+ chartContainer.style.overflowX = 'auto';
+ chartContainer.style.whiteSpace = 'nowrap';
+
+ if (chart) {
+ chart.setSize(requiredWidth, null, false);
+ chart.reflow();
+ // Ensure the x-axis covers the full range of data
+ const xAxis = chart.xAxis[0];
+ xAxis.setExtremes(null, null, true, false);
+ // Set marginRight to 0 to ensure the plot area extends to the edge
+ chart.update({
+ chart: {
+ marginRight: 0
+ }
+ });
+ }
+}
+
+window.addEventListener('resize', function() {
+ updateChartWidth();
+});
+
function displayOrAbort() {
if (dataBeingLoaded) {
abortOngoingOperation();
@@ -508,7 +564,7 @@ function getIntervalCountFromLocalStorage() {
if (localStorage.getItem("intervalCount") != null)
return localStorage.getItem("intervalCount");
else
- return 1000;
+ return 1000; // default
}
function applyChartType() {
@@ -536,8 +592,10 @@ function applyChartType() {
buildCustomisationDiv(chartInfo);
if (chartInfo.onLoad !== undefined)
chartInfo.onLoad();
- if (currentChartType == "fst" && typeof $('select[multiple]#plotGroupingMetadataValues').smartColorMultiSelect !== 'undefined')
+ if (currentChartType == "fst" && typeof $('select[multiple]#plotGroupingMetadataValues').smartColorMultiSelect !== 'undefined') {
$('select[multiple]#plotGroupingMetadataValues').smartColorMultiSelect();
+ $("#plotGroupingMetadataValues").parent().find("button.scms-toggle-icon").on("click", chartIndSelectionChanged);
+ }
loadChart();
}
@@ -583,9 +641,9 @@ function displayChart(minPos, maxPos) {
// Set the interval count until the next chart reload
let tempValue = parseInt($('#intervalCount').val());
if (isNaN(tempValue))
- displayedRangeIntervalCount = 1000;
- else if (tempValue > 1000)
- displayedRangeIntervalCount = 1000;
+ displayedRangeIntervalCount = 5000;
+ else if (tempValue > 5000)
+ displayedRangeIntervalCount = 5000;
else if (tempValue < 50)
displayedRangeIntervalCount = 50;
else
@@ -655,9 +713,11 @@ function adler32(str) {
function displayResult(chartInfo, jsonResult, displayedVariantType, displayedSequence) {
//console.log(Object.keys(cachedResults));
-
- // TODO : Key to the middle of the interval ?
- chartJsonKeys = chartInfo.series.length == 1 ? Object.keys(jsonResult) : Object.keys(jsonResult[0]);
+ for (const key in jsonResult) // for some reason HighCharts seems to fail (showing no graph at all) when fed with too many NaN values: replace them with null
+ if (jsonResult[key] === "NaN" || (typeof value === 'number' && isNaN(value)))
+ jsonResult[key] = null;
+
+ chartJsonKeys = chartInfo.series.length == 1 ? Object.keys(jsonResult) : Object.keys(jsonResult[0]);
var intervalSize = parseInt(chartJsonKeys[1]) - parseInt(chartJsonKeys[0]);
let totalVariantCount = 0;
@@ -668,18 +728,32 @@ function displayResult(chartInfo, jsonResult, displayedVariantType, displayedSeq
chart = Highcharts.chart('densityChartArea', {
chart: {
type: 'spline',
+ reflow: false,
zoomType: 'x'
},
title: {
text: chartInfo.title.replace("{{totalVariantCount}}", totalVariantCount).replace("{{displayedVariantType}}", displayedVariantType).replace("{{displayedSequence}}", displayedSequence),
+ align: 'left',
+ x: 50,
},
subtitle: {
text: isNaN(intervalSize) ? '' : chartInfo.subtitle.replace("{{intervalSize}}", intervalSize),
+ align: 'left',
+ x: 60,
+ },
+ legend: {
+ floating: true,
+ align: 'left',
+ x: 280,
},
xAxis: {
categories: chartJsonKeys,
title: {
text: chartInfo.xAxisTitle,
+ align: 'low',
+ offset: 70,
+ x: 500,
+ y: -5,
},
events: {
afterSetExtremes: function(e) {
@@ -715,8 +789,8 @@ function displayResult(chartInfo, jsonResult, displayedVariantType, displayedSeq
}
},
exporting: {
- enabled: true,
- buttons: {
+ enabled: true,
+ buttons: {
contextButton: {
menuItems: ["viewFullscreen", "printChart",
"separator",
@@ -748,15 +822,30 @@ function displayResult(chartInfo, jsonResult, displayedVariantType, displayedSeq
textArea.select();
try {
document.execCommand('copy');
- console.log('Copied to clipboard: ' + text);
+// console.log('Copied to clipboard: ' + text);
} catch (err) {
console.log('Failed to copy text to clipboard: ' + text);
}
document.body.removeChild(textArea);
}
- }]
+ }],
+ align: 'left',
+ verticalAlign: 'top',
+ x: 0,
+ y: 0,
+ floating: true,
+ symbol: 'menu',
+ symbolFill: '#666666',
+ symbolStroke: '#666666',
+ symbolStrokeWidth: 3,
+ theme: {
+ fill: 'white',
+ stroke: 'none',
+ padding: 1,
+ zIndex: 100
+ }
}
- }
+ }
}
});
@@ -794,6 +883,8 @@ function displayResult(chartInfo, jsonResult, displayedVariantType, displayedSeq
if (chartInfo.onDisplay !== undefined)
chartInfo.onDisplay();
+
+ updateChartWidth();
}
function addMetadataSeries(minPos, maxPos, fieldName, colorIndex) {
@@ -1023,9 +1114,9 @@ function displayOrHideThreshold(isChecked) {
function changeIntervalCount() {
let tempValue = parseInt($('#intervalCount').val());
if (isNaN(tempValue))
- $("#intervalCount").val(1000);
- else if (tempValue > 1000)
- $("#intervalCount").val(1000);
+ $("#intervalCount").val(5000);
+ else if (tempValue > 5000)
+ $("#intervalCount").val(5000);
else if (tempValue < 50)
$("#intervalCount").val(50);
}
diff --git a/src/main/webapp/navbar.jsp b/src/main/webapp/navbar.jsp
index 8e2cf6e0..903c7f11 100644
--- a/src/main/webapp/navbar.jsp
+++ b/src/main/webapp/navbar.jsp
@@ -92,24 +92,33 @@
Gigwa - Terms of use
-
1) Limitation of warranty
-
a) You acknowledge that the actual state of scientific and technical knowledge do not permit to test and check all uses of Gigwa, nor to detect the being of possible defaults. You acknowledge that the changes, the Use, the modification, the development, the reproduction of Gigwa are deemed to be executed by experimented users and contain risks. You are responsible for the checking by any means of fitness of Gigwa for your own purposes, of checking of its working, of its Use in conditions that do not cause damages to persons or goods.
-
b) Gigwa is provided on a « as is » basis, without warranties express or implied other than its existence, including all disclaimer of warranty relating to a title or deed (of property or exploitation), the lack of infringement, the merchantability, the secured, innovative or accurate features of Gigwa, the lack of mistakes, the suitability with Your equipment and/or software configuration.
-
-
2) Disclaimer of liability
- a) CIRAD or IRD can not be held responsible towards anyone:
-
-
i) for any damage due to the complete or partial breach of Your obligations;
-
ii) for any direct or indirect damages resulting of the Use or the performance of Gigwa caused to the Final User when he is a professional using Gigwa for professional purposes;
-
iii) for any indirect damage arising from the Use or the performances of Gigwa
-
-
b) The parties agree expressly that any financial or commercial prejudice (for instance loose of data, loose of customers or orders, loose of benefit, trading loss, misses to gain, commercial disorder) or any action suited against You by a third party is considered as an indirect damage and can not be subject of a indemnifying by CIRAD or IRD.
-
-
3) Applicable law
-
This contract and all disputes arising out of the execution or interpretation of this license shall be governed by French law.
a) You acknowledge that the actual state of scientific and technical knowledge do not permit to test and check all uses of Gigwa, nor to detect the being of possible defaults. You acknowledge that the changes, the Use, the modification, the development, the reproduction of Gigwa are deemed to be executed by experimented users and contain risks. You are responsible for the checking by any means of fitness of Gigwa for your own purposes, of checking of its working, of its Use in conditions that do not cause damages to persons or goods.
+
b) Gigwa is provided on a « as is » basis, without warranties express or implied other than its existence, including all disclaimer of warranty relating to a title or deed (of property or exploitation), the lack of infringement, the merchantability, the secured, innovative or accurate features of Gigwa, the lack of mistakes, the suitability with Your equipment and/or software configuration.
+
+
Disclaimer of liability
+ a) CIRAD or IRD can not be held responsible towards anyone:
+
+
i) for any damage due to the complete or partial breach of Your obligations;
+
ii) for any direct or indirect damages resulting of the Use or the performance of Gigwa caused to the Final User when he is a professional using Gigwa for professional purposes;
+
iii) for any indirect damage arising from the Use or the performances of Gigwa
+
+
b) The parties agree expressly that any financial or commercial prejudice (for instance loose of data, loose of customers or orders, loose of benefit, trading loss, misses to gain, commercial disorder) or any action suited against You by a third party is considered as an indirect damage and can not be subject of a indemnifying by CIRAD or IRD.
+
+
Applicable law
+
This contract and all disputes arising out of the execution or interpretation of this license shall be governed by French law.
+
+ ">
+
+
+
Cookie consent
+
This website uses Google Analytics to analyze anonymized traffic and improve your experience. You can choose to accept or decline the use of cookies for analytics purposes. You can change your preference at any time by clicking the 'Terms of use' link in the Gigwa page footer.