Skip to content

Claudio-R/Claudio-R.github.io

Repository files navigation

SonicIGV - An IGV based Sonification Platform

SonicIGV

Author

Claudio Rapisarda, M. Sci. Music and Acoustic Engineering, Politecnico di Milano.

Aknowledgement

This work was supported by Professor Bernardini Alberto, Professor Professor Ceri Stefano, Postdoc Nanni Luca and Professor Sarti Augusto.

Description

SonicIGV is a long-term, open-minded project with the aim to create a platform able to provide strong analysis and sonification tools of genomic data together with the visualization tools provided by the IGV platform, licensed by MIT.

If you wish to know more about IGV and the people behind it, please visit the official website at the link https://igv.org/.

How to run

The application is available at the link https://claudio-r.github.io.

Beware! To correctly open the Sonification Module, move to "chr1" using the dropdown menu "all", in the left corner of the navbar. It may happen that moving from one chromosome to the other your browser gets stack. This is a bug in interfacing with IGV and will be fixed. Also, you should not use the canvas selector which opens up in the main page.

If you wish to clone the repository, no build operation is required. It is sufficient to move to the project directory and run the following code:

npm run install
npx http-server -a localhost .

An online server will be created at localhost:8000 to use the application. Since the whole sonification system is implemented using the WebAudio API, I suggest using Chrome to get the best results from your sonification.

Contribution

SonicIGV has been built to be easily expandable and scalable. Contribution are really welcome!

The entry point is the index.html file in the first level of folder. It includes as a script the app.js file in js/igv_source folder, which in turns calls the SonicIGV.js script.

The main code is contained in the js folder. It contains the IGV source code, and the code related to SonicIGV, as well as the resources it uses.

In the python folder there are some python scripts used for parsing the data.

Note that the data which do not relate to the first chromosome are not provided. Please contact me or Luca Nanni if you need them. Also, the project folders contains a lot of files needed by IGV and that should not be deleted or modified.

Adding a module

To add a new sonification module, implement it as a new class with the following characteristics:

  1. The constructor must takes two arguments, the first being the complete set of information relative to the signals associated to the currently selected chromosome, and the second being a configuration object containing the identificative name of the actual signals to sonify, the start and stop indexes to sonify, as visualized in the application, and the values of parameters as defined by the user through the GUI. These arguments will be passed automatically from the main application to the sonification processor.
  2. It must implement a public method play() to start the playback of the sonification. It is called when the user hits the play button in the GUI.
  3. It must implement a public method stop() to stop the playback of the sonification. It is called when the user hits the stop button in the GUI.
  4. The sonification processor should be completely indipendent and possibly, defined entirely within a single file to move into the audioProcessors folder.

Once the processor is completed, it has to be imported into the SonicIGV.js file within the js folder, and a new item has to be included in the index.js file. You can use the python script json_creator.py in the python folder to easily update the file.

The item should at least contain a type field, displayed in the GUI, and a formatted_name field, used internally to assign IDs to DOM element and other stuff. Also, in the init_params field, it should contains all the information relative to the slider control to visualize in the GUI. By now, the sonification platform automatically generates sliders only. If other type of input controllers are to be added, the structure of init_params should be modified to properly inform the application, which should be modified as well to create the correct DOM elements.

Besides, the json_creator.py file updates the epigenomic data contained in the epigenomes.js file. This file contains for each chromosome and each histone the path to the .narrowPeak and .broadPeak, automatically loaded into the application in purpose of visualization, and a field containing the actual data to process. By now only binary data relative to the first chromosome are available, but this is the file to modify in case other data are available.

Finally, if for any reason you need to interface with the IGV browser, you can use the Browser API available at the link https://github.com/igvteam/igv.js/wiki.

About

Host repository for web applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published