Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • a78cb8f
  • /
  • www
  • /
  • bubble.js
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:c6e999d5b51cb5c3f267a4399cd47bcc186185ca
directory badge
swh:1:dir:ec8f64eddac0275a2d374d52f654ab5a7b2d3024

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
bubble.js
/*
Author: Franck Soubès
Bioinformatics Master Degree - University of Bordeaux, France
Link: https://github.com/GeT-TRiX/MA_Trix_App/
Where: GET-TRiX's facility
Application: MATRiX is a shiny application for Mining and functional Analysis of TRanscriptomics data
Licence: GPL-3.0
*/


$(document).ready(function () {

var xTitle = "top genes enriched";

var defaultOptions = {


    series: null,

    chart: {
	  zoomType: "xy",
	  reflow: true, //width: 1100,
	  height: 600,
	  renderTo: "highChart",
	  type: 'bubble'

  },

  dom: "highChart",
  id: "highChart",

  exporting: {enabled: true},
  credits: {href: null, text: null},


   legend: {
        enabled: true
    },

    title: {
        text: null
    },

    subtitle: {
        text: 'Source: <a href="http://www.euromonitor.com/">ok</a> and <a href="https://data.oecd.org/">OECD</a>'
    },

    xAxis: {
        gridLineWidth: 1,
        title: {
            text: 'Fold enrichment'
        },
        labels: {
            format: '{value}'
        }

    },

    yAxis: {
        startOnTick: false,
        endOnTick: false,
        reversed:true,
        tickInterval: 1,
        title: {
            text: 'Fold enrichment'
        },

        labels: {
               formatter: function () {
            if(this.value === 0){
            return "";
            }
            else{
                return 'top' + this.value ;
              }
            },
            //format: 'top {value}',
            step:1,
        },
        maxPadding: 0.2,

        plotLines: [{
            color: 'black',
            dashStyle: 'dot',
            width: 1,
            value: 0,
            label: {
                align: 'right',
                style: {
                    fontStyle: 'italic'
                },
                x: -10
            },
            zIndex: 3
        }]
    },

    tooltip: {

        useHTML: true,
        headerFormat: '<table>',
        pointFormat: '<tr><th colspan="2"><h3>{point.term}</h3></th></tr>' +
                     '<tr><th>x value:</th><td>{point.x:,.1f}</td></tr>' +
                     '<tr><th>Top:</th><td>{point.y:,.0f}</td></tr>' +
                    '<tr><th> adj.pval:</th><td>{point.pvalue}</td></tr>' +
                    '<tr><th> Fold enrichment:</th><td>{point.FE}</td></tr>' +
                    '<tr><th>Percentage of hits:</th><td>{point.z:,.2f}%</td></tr>',
        footerFormat: '</table>',
        followPointer: true
    },

    plotOptions: {
        series: {
            stickyTracking: false,
            dataLabels: {
                enabled: true,
                format: '{point.GO}',
                color: 'black'
            }
        }
    },


  };


  function updatechart() {

  Shiny.addCustomMessageHandler("updateVariable", function(newData) {

  var newOptions = defaultOptions;
  newOptions.subtitle.text = newData.min;
  newOptions.subtitle.text = newData.max;
  newOptions.series = newData.series; //update the series data
  newOptions.subtitle.text = newData.legend;
  newOptions.yAxis.title.text = newData.title;
  newOptions.xAxis.title.text = newData.xaxis;


  var message = Shiny.addCustomMessageHandler("handler1", function (message){
  newOptions.plotOptions.series.dataLabels.enabled = message;

  var chartObj = new Highcharts.Chart(newOptions);

  Shiny.addCustomMessageHandler("iscollapse", function(collapsestate) {
    var chartObj = new Highcharts.Chart(newOptions);
    chartObj.reflow();
      });

    });
  });

  }

  var printUpdate = function () {
        $('#container').highcharts().reflow();
  };

  if (window.matchMedia) {
    var mediaQueryList = window.matchMedia('print');
    mediaQueryList.addListener(function (mql) {
    printUpdate();
      });
    }


updatechart();

});

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API