Skip to content

Commit 67cae51

Browse files
committed
initial commit. fixing errors from old_master
0 parents  commit 67cae51

File tree

1,106 files changed

+522123
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,106 files changed

+522123
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
build

LICENSE.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
CC0 1.0 Universal
2+
==================
3+
4+
Statement of Purpose
5+
---------------------
6+
7+
The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work").
8+
9+
Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others.
10+
11+
For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights.
12+
13+
1. Copyright and Related Rights.
14+
--------------------------------
15+
A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following:
16+
17+
i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work;
18+
ii. moral rights retained by the original author(s) and/or performer(s);
19+
iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work;
20+
iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below;
21+
v. rights protecting the extraction, dissemination, use and reuse of data in a Work;
22+
vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and
23+
vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof.
24+
25+
2. Waiver.
26+
-----------
27+
To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose.
28+
29+
3. Public License Fallback.
30+
----------------------------
31+
Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose.
32+
33+
4. Limitations and Disclaimers.
34+
--------------------------------
35+
36+
a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document.
37+
b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law.
38+
c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work.
39+
d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work.

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# electron epiviz app
2+
3+
```
4+
download repository
5+
npm install && npm start
6+
```
7+
8+
To build app for distribution - (builds both 32 and 64 bit versions for all platforms - linux, windows, mac os (kernel darwin and mas))
9+
10+
`electron packager . --all `
11+
12+
to build using electron-builder
13+
14+
has issues since electron-builder can't build apps for macos platform (have to build from a mac os system)
15+
`electron-builder .`
16+
17+
## electron parameters
18+
port = websocket port number
19+
workspace = load workspace (not implemented)
20+
gist = gist id (not implemented)
21+
22+
`electron main.js --port=7123`
23+
24+
To start loading data from local R session -
25+
26+
1. start epivizrStandalone.
27+
TODO: update standalone open_browser to open app link. For now manually start server
28+
29+
```
30+
library(epivizrStandalone)
31+
seqinfo <- GenomeInfoDb::Seqinfo(c("chr11","chr2"), c(1000000,8000000))
32+
app <- startStandalone(seqinfo=seqinfo, non_interactive=TRUE, host="localhost", verbose=TRUE)
33+
app$.open_browser()
34+
```
35+
36+
2. start electron `electron main.js --port=7123`
37+
38+
Then adding tracks -
39+
40+
```
41+
library(epivizr)
42+
data("tcga_colon_blocks")
43+
blocks_chart <- app$plot(tcga_colon_blocks, datasource_name="450k colon_blocks")
44+
```

args.js

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
'use strict'
2+
3+
const { basename } = require('path')
4+
const pkg = require('./package')
5+
const exe = basename(process.argv[0])
6+
7+
module.exports = require('yargs')
8+
.usage(`Usage: ${exe} [options]`)
9+
.strict()
10+
.wrap(78)
11+
.env(pkg.name.toUpperCase())
12+
13+
.demand(0, 1)
14+
15+
.option('port', {
16+
alias: 'p',
17+
type: 'number',
18+
describe: 'Set websocket port location'
19+
})
20+
21+
.option('workspace', {
22+
alias: 'p',
23+
type: 'string',
24+
describe: 'Load workspace'
25+
})
26+
27+
.help('help')
28+
.version(pkg.version)
29+
30+
.epilogue([
31+
'Environment Variables:',
32+
' NODE_ENV Set default environment'
33+
].join('\n'))

index.html

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Hello World!</title>
6+
</head>
7+
<body>
8+
<h1>Hello World!</h1>
9+
<!-- All of the Node.js APIs are available in this renderer process. -->
10+
We are using Node.js <script>document.write(process.versions.node)</script>,
11+
Chromium <script>document.write(process.versions.chrome)</script>,
12+
and Electron <script>document.write(process.versions.electron)</script>.
13+
</body>
14+
15+
<script>
16+
// You can also require other files to run in this process
17+
require('./renderer.js')
18+
</script>
19+
</html>

main.js

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
const electron = require('electron')
2+
// Module to control application life.
3+
const app = electron.app
4+
// Module to create native browser window.
5+
const BrowserWindow = electron.BrowserWindow
6+
7+
const path = require('path')
8+
const url = require('url')
9+
10+
const args = require('./args')
11+
const opts = args.parse(process.argv.slice(1))
12+
13+
global.ARGS = opts
14+
15+
// console.log(global.ARGS)
16+
17+
// Keep a global reference of the window object, if you don't, the window will
18+
// be closed automatically when the JavaScript object is garbage collected.
19+
let mainWindow
20+
21+
function createWindow () {
22+
// Create the browser window.
23+
mainWindow = new BrowserWindow({width: 800, height: 600})
24+
25+
if(opts.port) {
26+
// and load the epivizr-standalone.html of the app.
27+
mainWindow.loadURL(url.format({
28+
pathname: path.join(__dirname, 'src/epivizr-standalone.html'),
29+
protocol: 'file:',
30+
slashes: true
31+
}))
32+
33+
}
34+
else {
35+
// and load the index.html of the app.
36+
mainWindow.loadURL(url.format({
37+
pathname: path.join(__dirname, 'src/index-standalone.html'),
38+
protocol: 'file:',
39+
slashes: true
40+
}))
41+
}
42+
43+
// Open the DevTools.
44+
mainWindow.webContents.openDevTools()
45+
46+
// Emitted when the window is closed.
47+
mainWindow.on('closed', function () {
48+
// Dereference the window object, usually you would store windows
49+
// in an array if your app supports multi windows, this is the time
50+
// when you should delete the corresponding element.
51+
mainWindow = null
52+
})
53+
}
54+
55+
// This method will be called when Electron has finished
56+
// initialization and is ready to create browser windows.
57+
// Some APIs can only be used after this event occurs.
58+
app.on('ready', createWindow)
59+
60+
// Quit when all windows are closed.
61+
app.on('window-all-closed', function () {
62+
// On OS X it is common for applications and their menu bar
63+
// to stay active until the user quits explicitly with Cmd + Q
64+
if (process.platform !== 'darwin') {
65+
app.quit()
66+
}
67+
})
68+
69+
app.on('activate', function () {
70+
// On OS X it's common to re-create a window in the app when the
71+
// dock icon is clicked and there are no other windows open.
72+
if (mainWindow === null) {
73+
createWindow()
74+
}
75+
})
76+
77+
// In this file you can include the rest of your app's specific main process
78+
// code. You can also put them in separate files and require them here.

package.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "Epiviz",
3+
"version": "0.0.1",
4+
"description": "Genomics Data Visualization Platform",
5+
"main": "main.js",
6+
"scripts": {
7+
"start": "electron .",
8+
"pack": "build --dir",
9+
"dist": "build"
10+
},
11+
"build": {
12+
"appId": "epiviz",
13+
"mac": {
14+
"category": "genomics.epiviz"
15+
}
16+
},
17+
"repository": "https://github.com/jkanche/epiviz-electron",
18+
"keywords": [
19+
"epiviz",
20+
"genomics",
21+
"data",
22+
"visualization"
23+
],
24+
"postinstall": "install-app-deps",
25+
"author": "Jayaram Kancherla (jkanche @ umd . edu)",
26+
"license": "CC0-1.0",
27+
"devDependencies": {
28+
"electron": "^1.4.1",
29+
"electron-builder": "^15.6.2",
30+
"electron-packager": "^8.6.0"
31+
},
32+
"dependencies": {
33+
"yargs": "^7.0.2"
34+
}
35+
}

renderer.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// This file is required by the index.html file and will
2+
// be executed in the renderer process for that window.
3+
// All of the Node.js APIs are available in this process.

src/.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: generic
2+
jdk:
3+
- oraclejdk8
4+
addons:
5+
apt:
6+
packages:
7+
- oracle-java8-installer
8+
script:
9+
- jdk_switcher use oraclejdk8
10+
- bash travis/build.sh
11+
env:
12+
global:
13+
secure: "ZKXsr1qRmz97Lf2mlsOjqJnCSEgJOoQRulkZKSJIl7nRPOY29LczYwvUxU1Y37uKQKp0wjDxPFr/dVcZK+sCcBtNcJb4sq8bN9r8f9H3VFbSFYnjSSIywo8XBka41++aK511kLNCRn3Fd/6ly10IMckdDy694PkZ6oK1zNDbycbKwMzDEoaBAy/2tQWK92tuvE9bdO9vUYDq6/RN/TssCmqrhZ2U5igwJIrCNKrsQh1WfDvrxjR6xpyXwmxHJqbFj1lZryhj1iUDJFFgQ62W/vAHnF8IeFq0+5XQIG5YFAAt2Wx3MNvtaQV1jdEhiU9hYLXB7+UtEVw+6B/YbjvblKl3XfOOuxrj2QZwDA0uwPycz7ARq0Ikz27GASww1BqIvpNF98fNmZlskAO7c43c3ob3y8RNTh7+wU3ErXRIvTfyoIKsTeS7vI7dGwMJjXRP3fJoXgb0VcTbz1Cix9dHl9nTeenPVFp68O/Qi7jFLO4FuVMgi1JhQ87xj0u5c85fmAULRxgcny9auBelQoOmOSTzdw13p5MDKZhy0lZnDisDHaidpdsQ0ndPI2YOeSBaplDwIoJzVeMp401zp6AK8cYnBIF9vZ70bd1T6fwVYNasE+Wm5PAk8OY0YsHcsl5XisWkoH2H0r+gEAjVzk3CmBPSbWfwiCE+zxWYS3R/yu8="

src/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM tutum/apache-php
2+
MAINTAINER "Hector Corrada Bravo" [email protected]
3+
4+
RUN rm -fr /app
5+
ADD . /app

src/LICENSE

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
This package is provided to you under the terms of the Artistic License version 2.0:
2+
http://opensource.org/licenses/Artistic-2.0.
3+
4+
Included below is license and copyright information for any externally
5+
maintained libraries used by Epiviz. All other code is Copyright (c) 2012-2015,
6+
Hector Corrada Bravo <[email protected]> and Florin Chelaru <[email protected]>.
7+
All rights reserved.
8+
9+
http://epiviz.cbcb.umd.edu
10+
http://epiviz.github.io
11+
http://github.com/epiviz
12+
13+
====
14+
15+
closure: Copyright, Google, Inc. Apache License 2.0, https://github.com/google/closure-library
16+
d3.js: Copyright, Michael Bostock, https://github.com/mbostock/d3
17+
expression-parser: Copyright, Matthew Crumley, https://github.com/silentmatt/js-expression-eval/
18+
file-saver: Copyright, Eli Gray, http://eligrey.com
19+
jquery: Copyright, jQuery Foundation, MIT License, http://jquery.com
20+
DataTables: Copyright, Allan Jardine
21+
dropdown-check-list: Copyright, Adrian Tosca, MIT or GPL-2 License,
22+
dynatree: Copyright, Martin Wendt, MIT or GPL License, http://wwWendt.de
23+
farbtastic-color-picker: Copyright, Steven Wittens, GPL-2 License,
24+
globalize: Copyright, Software Freedom Conservancy, Inc., MIT or GPL-2 License, http://github.com/jquery/globalize
25+
parallel: Copyright, Adam Savitzky,
26+
sprintf: Copyright, Alexandru Marasteanu,
27+
28+
29+

src/README.md

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Epiviz
2+
======
3+
4+
Epiviz is a scientific information visualization tool for genetic and epigenetic data, used to aid in the exploration and understanding of correlations between various genome features.
5+
6+
For more information, visit - http://epiviz.github.io/
7+
8+
Using any PHP supported webserver
9+
---------------------------------
10+
Copy the Epiviz directory to the webserver configured directory. Navigate to <webserver-ip>/epiviz/index.php on your browser.
11+
12+
Using PHP
13+
---------
14+
PHP (http://php.net/) lets your run local webservers. Navigate to localhost:8181 on your browser.
15+
To run epiviz use:
16+
```
17+
php.exe -S localhost:8181 -t <location of the epiviz directory>
18+
```
19+
20+
Using Docker
21+
-------------------
22+
23+
This repository includes a `Dockerfile` to run a webserver that serves
24+
the epiviz web application. It includes a `site-settings.js` file that
25+
sets up data backends pointing to the University of Maryland. Update
26+
that file to use a different backend. It is registered in the DockerHub
27+
registry: (https://hub.docker.com/r/epiviz/epiviz/)[https://hub.docker.com/r/epiviz/epiviz/].
28+
To run it use:
29+
30+
```shell
31+
docker pull epiviz/epiviz
32+
docker run --name epiviz-app -d -p 80:80 epiviz/epiviz
33+
```

0 commit comments

Comments
 (0)