Skip to content

Commit

Permalink
Merge branch 'release/v3.1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
frasator committed Aug 7, 2015
2 parents 8ee76a4 + 1e7965f commit bfd3651
Show file tree
Hide file tree
Showing 617 changed files with 905 additions and 114,412 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
build/
node_modules/
bower_components/

## IntelliJ
*.iml
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "lib/jsorolla"]
path = lib/jsorolla
url = https://github.com/opencb/jsorolla.git

204 changes: 69 additions & 135 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,197 +1,131 @@
/*global module:false*/
module.exports = function (grunt) {

// Project configuration.
grunt.initConfig({
// Metadata.
meta: {
version: '3.1.2',
commons: {
dir: '../js-common-libs/',
//genome viewer contains cellbse and utils
'genomeviewer': {
version: '1.0.2',
dir: '<%= meta.commons.dir %>build/genome-viewer/<%= meta.commons.genomeviewer.version %>/'
},
//opencga does not contains utils
opencga: {
version: '1.0.0',
dir: '<%= meta.commons.dir %>build/opencga/<%= meta.commons.opencga.version %>/'
}
}
pkg: grunt.file.readJSON('package.json'),
jsopkg: grunt.file.readJSON('lib/jsorolla/package.json'),
def: {
name: 'genome-maps',
build: 'build/<%= pkg.version %>',
jsorolla: 'lib/jsorolla'
},
banner: '/*! PROJECT_NAME - v<%= meta.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'* http://PROJECT_WEBSITE/\n' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> ' +
'OpenCB; Licensed GPLv2 */\n',
// Task configuration.

concat: {
options: {
banner: '<%= banner %>',
stripBanners: true
},
build: {
dist: {
src: [
// 'src/gm-config.js',
'src/gm-plugins-config.js',
'src/gm-navigation-bar.js',
'src/gm-status-bar.js',
'src/genome-maps.js'
],
dest: 'build/<%= meta.version %>/genome-maps-<%= meta.version %>.js'
dest: '<%= def.build %>/<%= def.name %>.js'
}
},
uglify: {
options: {
banner: '<%= banner %>'
banner: '/*! <%= def.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
build: {
src: '<%= concat.build.dest %>',
dest: 'build/<%= meta.version %>/genome-maps-<%= meta.version %>.min.js'
}
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
unused: true,
boss: true,
eqnull: true,
browser: true,
globals: {
jQuery: true
dist: {
files: {
'<%= def.build %>/<%= def.name %>.min.js': ['<%= concat.dist.dest %>']
}
},
gruntfile: {
src: 'Gruntfile.js'
},
lib_test: {
src: ['lib/**/*.js', 'test/**/*.js']
}
},
qunit: {
files: ['test/**/*.html']
},

copy: {
build: {
files: [
{ expand: true, cwd: './', src: ['vendor/**'], dest: 'build/<%= meta.version %>/' },
{ expand: true, cwd: './', src: ['styles/**'], dest: 'build/<%= meta.version %>/' }, // includes files in path and its subdirs
{ expand: true, cwd: './src', src: ['gm-config.js'], dest: 'build/<%= meta.version %>/' }
]
},
genomeviewer: {
files: [
{ expand: true, cwd: '<%= meta.commons.genomeviewer.dir %>', src: ['genome-viewer*.js'], dest: 'vendor' }
]
},
opencga: {
files: [
{ expand: true, cwd: '<%= meta.commons.opencga.dir %>', src: ['opencga*.js', 'worker*'], dest: 'vendor' }
]
},
styles: {
files: [
{ expand: true, cwd: '<%= meta.commons.dir %>styles/', src: ['**'], dest: 'styles' },
{ expand: true, cwd: '<%= meta.commons.dir %>vendor/', src: ['jquery-ui-*custom/**'], dest: 'vendor' }
]
},
map: {
files: [
{ expand: true, cwd: '<%= meta.commons.dir %>vendor/', src: ['jquery.min.map'], dest: 'vendor' },
{ expand: true, cwd: '<%= meta.commons.dir %>vendor/', src: ['backbone-min.map'], dest: 'vendor' }
{ expand: true, cwd: './src', src: ['gm-config.js'], dest: '<%= def.build %>/' },
{ expand: true, cwd: './<%= def.jsorolla %>', src: ['vendor/**'], dest: '<%= def.build %>/' },
{ expand: true, cwd: './<%= def.jsorolla %>', src: ['styles/**'], dest: '<%= def.build %>/' },
{ expand: true, cwd: './<%= def.jsorolla %>/src/lib', src: ['worker*'], dest: '<%= def.build %>/' },
{ expand: true, cwd: './<%= def.jsorolla %>/build/<%= jsopkg.version %>/genome-viewer/', src: ['genome-viewer*.js', 'gv-config.js'], dest: '<%= def.build %>/' }
]
}
},
clean: {
build: ["build/<%= meta.version %>/"]
dist: ['<%= def.build %>/']
},

vendorPath: 'build/<%= meta.version %>/vendor',
stylesPath: 'build/<%= meta.version %>/styles',
htmlbuild: {
build: {
src: 'src/genome-maps.html',
dest: 'build/<%= meta.version %>/',
src: 'src/<%= def.name %>.html',
dest: '<%= def.build %>/',
options: {
beautify: true,
scripts: {
'js': 'build/<%= meta.version %>/genome-maps-<%= meta.version %>.min.js',
'vendor': [
'build/<%= meta.version %>/vendor/jquery.min.js',
'build/<%= meta.version %>/vendor/underscore*.js',
'build/<%= meta.version %>/vendor/backbone*.js',
'build/<%= meta.version %>/vendor/jquery.mousewheel*.js',
'build/<%= meta.version %>/vendor/gl-matrix-min*.js',
'build/<%= meta.version %>/vendor/ChemDoodleWeb*.js',
'build/<%= meta.version %>/vendor/jquery.cookie*.js',
'build/<%= meta.version %>/vendor/purl*.js',
'build/<%= meta.version %>/vendor/jquery.sha1*.js',
'build/<%= meta.version %>/vendor/jquery.qtip*.js',
'build/<%= meta.version %>/vendor/rawdeflate*.js',
'build/<%= meta.version %>/vendor/jquery-ui-1.10.3*/js/jquery-ui*min.js',

'build/<%= meta.version %>/vendor/genome-viewer*.min.js',
'build/<%= meta.version %>/vendor/opencga*.min.js'
]
},
styles: {
'css': ['<%= stylesPath %>/css/style.css'],
'vendor': [
'build/<%= meta.version %>/vendor/ChemDoodleWeb*.css',
'build/<%= meta.version %>/vendor/jquery.qtip*.css',
'build/<%= meta.version %>/vendor/jquery-ui-1.10.3*/css/**/jquery-ui*min.css'
]
'<%= def.build %>/vendor/jquery.qtip*.css',
'<%= def.build %>/vendor/ChemDoodleWeb*.css',
'<%= def.build %>/vendor/bootstrap-*-dist/css/bootstrap.min.css',
'<%= def.build %>/vendor/typeahead.js-bootstrap.css',
'<%= def.build %>/vendor/jquery.simplecolorpicker.css'
],
'css': ['<%= def.build %>/styles/css/style.css']
},
scripts: {
vendor: [
'<%= def.build %>/vendor/underscore*.js',
'<%= def.build %>/vendor/backbone*.js',
'<%= def.build %>/vendor/jquery.min.js',
'<%= def.build %>/vendor/bootstrap-*-dist/js/bootstrap.min.js',
'<%= def.build %>/vendor/typeahead.min.js',
'<%= def.build %>/vendor/jquery.mousewheel*.js',
'<%= def.build %>/vendor/gl-matrix-min*.js',
'<%= def.build %>/vendor/ChemDoodleWeb*.js',
'<%= def.build %>/vendor/jquery.cookie*.js',
'<%= def.build %>/vendor/purl*.js',
'<%= def.build %>/vendor/jquery.sha1*.js',
'<%= def.build %>/vendor/jquery.qtip*.js',
'<%= def.build %>/vendor/rawdeflate*.js',
'<%= def.build %>/vendor/xml2json.js',
],
config: [
'<%= def.build %>/gv-config.js'
],
lib: [
'<%= def.build %>/genome-viewer.min.js'
],
js: '<%= def.build %>/<%= def.name %>.min.js'
}

}
}
},
'curl-dir': {

},
rename: {
html: {
dist: {
files: [
{src: ['build/<%= meta.version %>/genome-maps.html'], dest: 'build/<%= meta.version %>/index.html'}
{
src: ['<%= def.build %>/<%= def.name %>.html'],
dest: '<%= def.build %>/index.html'
}
]
}
},
watch: {
commons: {
files: ['<%= meta.commons.genomeviewer.dir %>**','<%= meta.commons.opencga.dir %>**'],
tasks: ['commons'],
options: {
spawn: false
}
hub: {
'genome-viewer': {
src: ['lib/jsorolla/Gruntfile.js'],
tasks: ['gv']
}
}
});

// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
// grunt.loadNpmTasks('grunt-contrib-qunit');
// grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-rename');
grunt.loadNpmTasks('grunt-html-build');
grunt.loadNpmTasks('grunt-curl');
grunt.loadNpmTasks('grunt-hub');

// Default task.
grunt.registerTask('default', ['clean', 'concat', 'uglify', 'copy', 'htmlbuild', 'rename:html']);
grunt.registerTask('vendor', ['curl-dir']);
grunt.registerTask('log-deploy', 'Deploy path info', function (version) {
grunt.log.writeln("DEPLOY COMMAND: scp -r build/" + grunt.config.data.pkg.version + " cafetero@mem16:/httpd/bioinfo/www-apps/" + grunt.config.data.def.name + "/");
});

// dependencies from js-common-libs
grunt.registerTask('commons', ['copy:genomeviewer', 'copy:opencga', 'copy:styles']);
// Default task.
grunt.registerTask('default', ['hub','clean', 'concat', 'uglify', 'copy', 'htmlbuild', 'rename', 'log-deploy']);

};
119 changes: 116 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,117 @@
genome-maps
===========
# Overview
Genome Maps is a modern and high-performance web-based HTML5 genome browser. Genome Maps can browse data from [CellBase](https://github.com/opencb/cellbase) and render remote big data from [OpenCGA](https://github.com/opencb/opencga) server such as BAM and VCFs files.

A new web-based HTML5 genome browser. Genome Maps can also browse BAM and VCFs files among other formats.
Genome Maps constitutes the genome browser component of [OpenCB](http://www.opencb.org/) for [CellBase](https://github.com/opencb/cellbase) and [OpenCGA](https://github.com/opencb/opencga) data visualization. It is used by other OpenCB projects such as [OpenCGA](https://github.com/opencb/opencga) as well as other external applications such as [ICGC](https://dcc.icgc.org/) or [Babelomics](http://www.babelomics.org/).

Note: This repository is a major refactoring of https://github.com/opencb-bigdata-viz/genome-maps. All users must update to this one.

### Documentation
You can find Genome Maps documentation and tutorials at: https://github.com/opencb/genome-maps/wiki.

### Issue Tracking
You can report bugs or request new features at [GitHub issue tracking](https://github.com/opencb/genome-maps/issues).

### Release Notes and Roadmap
Releases notes are available at [GitHub releases](https://github.com/opencb/genome-maps/releases).

Roadmap is available at [GitHub milestones](https://github.com/opencb/genome-maps/milestones). You can report bugs or request new features at [GitHub issue tracking](https://github.com/opencb/genome-maps/issues).

### Versioning
Genome Maps is versioned following the rules from [Semantic versioning](http://semver.org/).

### Maintainers
We recommend to contact Genome Maps developers by writing to OpenCB mailing list opencb@googlegroups.com. The main developers and maintainers are:
* Ignacio Medina (im411@cam.ac.uk) (_Founder and Project Leader_)
* Francisco Salavert (fsalavert@cipf.es)

##### Contributing
Genome Maps is an open-source and collaborative project. We appreciate any help and feeback from users, you can contribute in many different ways such as simple bug reporting and feature request. Dependending on your skills you are more than welcome to develop client tools, new features or even fixing bugs.


# How to build
Genome Maps is developed in HTML5, therefore it is mainly developed in JavaScript and makes a heavy usage of HTML and CSS. It uses [Bower](http://bower.io/) and [Grunt](http://gruntjs.com/) as building tools. Genome Maps also requires of [OpenCB JSorolla](https://github.com/opencb/jsorolla) to be built, this is a JavaScript library developed for several OpenCB web-based projects, this can be found as Git submodule in Genome Maps.

Stable releases are merged and tagged at **_master_** branch, you are encourage to use latest stable release for production. Current active development is carried out at **_develop_** branch, only building is guaranteed and bugs are expected, use this branch for development or for testing new functionalities. The only dependency of Genome Maps from OpenCB is JSorolla. Genome Maps **_master_** branch depends on stable branches in JSorolla, while **_develop_** branch of Genome Maps depends on JSorolla **_develop_**.

### Prerequisites
The following technologies are needed to build Genome Maps: [Node.js](https://nodejs.org/), [npm](https://www.npmjs.com/), [Bower](http://bower.io/) and [Grunt](http://gruntjs.com/).

##### Installing Node.js and npm
To install [Node.js](https://nodejs.org/) you can visit [this link](https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager).

[npm](https://www.npmjs.com/) stands for _node packaged modules_ and it is the dependency manager of [Node.js](https://nodejs.org/).

##### Install Bower and Grunt
After installing _Node.js_ and _npm_, we can install [Bower](http://bower.io/) and [Grunt](http://gruntjs.com/) by executing the following commands with root permission:

```bash
sudo npm install -g bower
sudo npm install -g grunt-cli
```

### Cloning
Genome Maps is an open-source and free project, you can download **_develop_** branch by executing:

imedina@ivory:~$ git clone https://github.com/opencb/genome-maps.git
Cloning into 'genome-maps'...
remote: Counting objects: 2274, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 2274 (delta 5), reused 0 (delta 0), pack-reused 2256
Receiving objects: 100% (2274/2274), 12.01 MiB | 678.00 KiB/s, done.
Resolving deltas: 100% (952/952), done.

To fetch the latest stable release at **_master_** branch can be downloaded executing:

imedina@ivory:~$ git clone -b master https://github.com/opencb/genome-maps.git
Cloning into 'genome-maps'...
remote: Counting objects: 2274, done.
remote: Compressing objects: 100% (16/16), done.
Receiving objects: 13% (296/2274)
remote: Total 2274 (delta 5), reused 0 (delta 0), pack-reused 2256
Receiving objects: 100% (2274/2274), 12.01 MiB | 507.00 KiB/s, done.
Resolving deltas: 100% (952/952), done.

After this, in both cases, you **must** execute the following command to fetch the JSorolla submodule:

git submodule update --init


### Build
After install _Node.js_ and _npm_ we have to install _npm_ packages for Genome Maps, from the the root folder execute:

```bash
npm install
```
This will make _npm_ to look at file [package.json](package.json) and install locally all the dependencies listed there.

To install all _Bower_ dependencies for Genome Maps execute from the root folder:

```bash
bower install
```
This will make _Bower_ to look at file [bower.json](bower.json) and install locally all the dependencies.

First, you must update JSorolla dependencies:
```bash
cd lib/jsorolla
npm install
bower install
```

Finally, to build Genome Maps execute:
```bash
grunt
```

When completed, all compiled files will be located under the `build` folder.


### Testing
You can copy build content to a web server such as Apache HTTP Server and open your favourite internet browser to open Genome Maps.


# Supporters
JetBrains is supporting this open source project with:

[![Intellij IDEA](https://www.jetbrains.com/idea/docs/logo_intellij_idea.png)]
(http://www.jetbrains.com/idea/)
Loading

0 comments on commit bfd3651

Please sign in to comment.