igv-rails 0.0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +135 -0
- data/Rakefile +2 -0
- data/igv-rails.gemspec +24 -0
- data/lib/igv/rails/version.rb +5 -0
- data/lib/igv/rails.rb +8 -0
- data/vendor/assets/javascripts/igv-all.js +25784 -0
- data/vendor/assets/javascripts/igv-all.min.js +19 -0
- data/vendor/assets/javascripts/igv-all.min.map +1 -0
- data/vendor/assets/stylesheets/igv.css +1151 -0
- metadata +99 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 371309659e904d126929128e815ff56689295dea
|
4
|
+
data.tar.gz: 577d5a1d8daf29dad3332d11fffaa22bc07cd016
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0f745397291ad4ec8f52c29354cd5b70268ba27acd62bb7ba2fd1f3cc264cce4779e9510be2a6e1a85b489dbe1117e58599b592b1c8b19c445241b83986f18b3
|
7
|
+
data.tar.gz: e7104f1443b97244922256b735172aa5839346825e8ece9f5a179077bfbf33c9732add1612362def862586ebf15d7af6f57b20b3544997c3c3418f7ac7c3f2f6
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 William Van Etten
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
# igv-rails
|
2
|
+
|
3
|
+
## Installation
|
4
|
+
|
5
|
+
Add this line to the application's Gemfile:
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
gem 'igv-rails'
|
9
|
+
```
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install igv-rails
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
Add IGV (and dependencies) to the application's Gemfile:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
gem 'font-awesome-rails'
|
25
|
+
gem 'jquery-rails'
|
26
|
+
gem 'jquery-ui-rails'
|
27
|
+
gem 'igv-rails'
|
28
|
+
```
|
29
|
+
|
30
|
+
Require IGV (and dependencies) to the application's application.js:
|
31
|
+
|
32
|
+
```javascript
|
33
|
+
//= require jquery
|
34
|
+
//= require jquery-ui
|
35
|
+
//= require igv-all
|
36
|
+
```
|
37
|
+
|
38
|
+
Require IGV CSS (and dependencies) to the application's application.css:
|
39
|
+
|
40
|
+
```css
|
41
|
+
/*
|
42
|
+
*= require font-awesome
|
43
|
+
*= require jquery-ui
|
44
|
+
*= require igv
|
45
|
+
*/
|
46
|
+
```
|
47
|
+
|
48
|
+
## Example
|
49
|
+
|
50
|
+
Provide a div container within a view:
|
51
|
+
|
52
|
+
```html
|
53
|
+
<div id="myDiv"></div>
|
54
|
+
```
|
55
|
+
|
56
|
+
Provide javascript to configure and load IGV within the view:
|
57
|
+
|
58
|
+
```javascript
|
59
|
+
$(document).ready(function () {
|
60
|
+
var div = $("#myDiv")[0],
|
61
|
+
options = {
|
62
|
+
showNavigation: true,
|
63
|
+
genome: "hg19",
|
64
|
+
locus: "chr1:155,172,193-155,172,564",
|
65
|
+
tracks: [
|
66
|
+
{
|
67
|
+
url: '//www.broadinstitute.org/igvdata/1KG/b37/data/NA06984/alignment/NA06984.mapped.ILLUMINA.bwa.CEU.low_coverage.20120522.bam',
|
68
|
+
label: 'NA06984'
|
69
|
+
}
|
70
|
+
]
|
71
|
+
};
|
72
|
+
|
73
|
+
igv.createBrowser(div, options);
|
74
|
+
});
|
75
|
+
```
|
76
|
+
|
77
|
+
## Contributing
|
78
|
+
|
79
|
+
1. Fork it ( https://github.com/[my-github-username]/igv-rails/fork )
|
80
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
81
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
82
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
83
|
+
5. Create a new Pull Request
|
84
|
+
|
85
|
+
## Build Notes
|
86
|
+
|
87
|
+
This is [igv-web](https://www.broadinstitute.org/software/igv/home) GEMified for the Rails >= 4.1 asset pipeline through the following:
|
88
|
+
|
89
|
+
bundle gem igv-rails
|
90
|
+
cd igv-rails
|
91
|
+
mkdir -p vendor/assets/javascripts
|
92
|
+
curl http://www.broadinstitute.org/igv/projects/igv-web/dist/igv-all.min.js -o vendor/assets/javascripts/igv-all.js
|
93
|
+
mkdir -p vendor/assets/stylesheets
|
94
|
+
curl http://www.broadinstitute.org/igv/projects/igv-web/css/igv.css -o vendor/assets/stylesheets/igv.css
|
95
|
+
mkdir -p vendor/assets/images
|
96
|
+
curl http://www.broadinstitute.org/igv/projects/igv-web/dist/igv-all.min.map -o vendor/assets/images/igv-all.min.map
|
97
|
+
echo "" >> README.md; echo "# igv appended README #" >> README.md; echo "" >> README.md
|
98
|
+
curl https://github.com/broadinstitute/igv-web/blob/master/README.md >> README.md
|
99
|
+
echo "" >> LICENSE; echo "# igv appended LICENSE #" >> LICENSE; echo "" >> LICENSE
|
100
|
+
curl https://github.com/broadinstitute/igv-web/blob/master/license.txt >> LICENSE
|
101
|
+
git add .
|
102
|
+
git commit -am "igv-rails"
|
103
|
+
git remote add origin git@github.com:vanetten/igv-rails.git
|
104
|
+
|
105
|
+
* modify **lib/igv/rails/version.rb** to match igv-all.js version
|
106
|
+
|
107
|
+
VERSION = "0.0.1.*"
|
108
|
+
|
109
|
+
* modify **lib/igv/rails.rb** to subclass Rails::Engine
|
110
|
+
|
111
|
+
class Engine < ::Rails::Engine
|
112
|
+
end
|
113
|
+
|
114
|
+
* modify **igv-rails.gemspec**
|
115
|
+
|
116
|
+
spec.summary = "IGV for Rails."
|
117
|
+
spec.description = "This gem provides igv javascript, css, and images for your Rails application."
|
118
|
+
spec.homepage = "https://github.com/vanetten/igv-rails"
|
119
|
+
spec.files = `git ls-files -z`.split("\x0") + ["LICENSE", "README.md"]
|
120
|
+
spec.add_dependency "railties", "~> 4.1"
|
121
|
+
|
122
|
+
* build
|
123
|
+
|
124
|
+
rake build
|
125
|
+
|
126
|
+
* release
|
127
|
+
|
128
|
+
rake release
|
129
|
+
|
130
|
+
## igv appended README
|
131
|
+
|
132
|
+
igv-web
|
133
|
+
=======
|
134
|
+
|
135
|
+
Lightweight HTML-5 versison of the Integrative Genomics Viewer (http://www.broadinstitute.org/igv).
|
data/Rakefile
ADDED
data/igv-rails.gemspec
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'igv/rails/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "igv-rails"
|
8
|
+
spec.version = Igv::Rails::VERSION
|
9
|
+
spec.authors = ["William Van Etten, PhD"]
|
10
|
+
spec.email = ["vanetten@bioteam.net"]
|
11
|
+
spec.summary = "IGV for Rails."
|
12
|
+
spec.description = "This gem provides igv javascript, css, and images for your Rails application."
|
13
|
+
spec.homepage = "https://github.com/vanetten/igv-rails"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0") + ["LICENSE", "README.md"]
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "railties", "~> 4.1"
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
23
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
24
|
+
end
|