Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
275 commits
Select commit Hold shift + click to select a range
853a37b
Update readme and package.json
jrobinso Sep 5, 2018
4abd66f
package.json
jrobinso Sep 5, 2018
4a78631
Update readme with note to Windows users
jrobinso Sep 5, 2018
ea37192
Add support for touch - panning on tracks
jrobinso Sep 6, 2018
5984158
bug fix - touch handler
jrobinso Sep 6, 2018
bfd50d5
more touch move -- must deploy this to test it :(
jrobinso Sep 6, 2018
741d843
touch
jrobinso Sep 6, 2018
cd855a8
.
jrobinso Sep 6, 2018
6642cae
Reset -- initial touch support. Panning and "clicking".
jrobinso Sep 6, 2018
5169e6a
Hide gear menu when width < 1000 pixels & device is mobile -- too sma…
jrobinso Sep 7, 2018
615be22
simplify document and window event management
jrobinso Sep 7, 2018
0ce17c0
event cleanup -- reduce use of document and window
jrobinso Sep 8, 2018
7ec1763
Fix bug with "y" click location (did not account for scrolling)
jrobinso Sep 10, 2018
1f0779c
touch support for popover closing
jrobinso Sep 10, 2018
2e990fd
Fix off-by-1 error on multilocus viewport label
jrobinso Sep 11, 2018
e7af9ae
Implement continuous integration (#732)
eweitz Sep 11, 2018
ebece91
Update README.md
jrobinso Sep 11, 2018
b3bdd44
package-lock update
jrobinso Sep 11, 2018
31288e4
add UCSC "interact" parser
jrobinso Sep 11, 2018
3669856
Update README.md
jrobinso Sep 11, 2018
c0fbdc2
Update README.md
jrobinso Sep 11, 2018
4f6547a
Prevent "mouseup" from bubbling up from popups
jrobinso Sep 13, 2018
ca1593a
Support whole-genome views for feature tracks with explicit indexed=f…
jrobinso Sep 13, 2018
f9ba268
Preserve track order in session
jrobinso Sep 14, 2018
df39891
Fix many subtle bugs with "track drag" -- as in re-order tracks, not …
jrobinso Sep 14, 2018
e621747
fixes #544
jrobinso Sep 14, 2018
7de6195
Fix "draggable" bug -- mouse down on close widget would start drag op…
jrobinso Sep 14, 2018
04b71cd
Remember segTrack sort state in sessions
jrobinso Sep 14, 2018
7c0cc62
maintain gtex selection state in sessions
jrobinso Sep 14, 2018
411040d
issue544Fix:related change (#733)
kaushik51094 Sep 15, 2018
fb81d85
Position zoom-in notice to top of viewport
jrobinso Sep 15, 2018
efc9e1d
Include read base quality in alignment sort
jrobinso Sep 15, 2018
55ad1c6
Fix browser tests
jrobinso Sep 15, 2018
a8c986d
Preserve alignment sort option in session
jrobinso Sep 15, 2018
95890e2
Increase default downsampling depth to 100.
jrobinso Sep 16, 2018
6c2a5c5
Bug fix -- base quality parsing
jrobinso Sep 16, 2018
b6e8a6e
minor cleanup
jrobinso Sep 16, 2018
4de5479
use "click" event instead of "mouseup" for clicks and double-clicks o…
jrobinso Sep 16, 2018
d69d102
viz window menu bug
jrobinso Sep 16, 2018
3378662
Track menu bug fix -- raw html was ignored
jrobinso Sep 17, 2018
1837a04
package-lock update
jrobinso Sep 19, 2018
7ad4eae
simplify oAuth implementation -- prep for generalization
jrobinso Sep 19, 2018
8edcd72
set "user-select:none". Fixes #734
jrobinso Sep 19, 2018
6002763
Add api to set global oauth token per host (formerly only worked for …
jrobinso Sep 19, 2018
bf50efa
Update README.md
jrobinso Sep 19, 2018
d1dc448
Sort all alignments, not just "maxRows". Fixes #737
jrobinso Sep 19, 2018
24ebde4
Prevent popup text at end of drag or scroll
jrobinso Sep 19, 2018
8dcc9f4
fix unit tests
jrobinso Sep 20, 2018
c79a61d
Update README.md
jrobinso Sep 20, 2018
df6651a
Use alignment color (shaded dark) for coverage track.
jrobinso Sep 20, 2018
71e71d1
Cigar string parsing bug -- conversion from var -> let changed behavior
jrobinso Sep 20, 2018
4b1c437
RNA structure
jrobinso Sep 25, 2018
ffa91d8
Add svg image output option
jrobinso Sep 25, 2018
c1e2d73
type on grunt file
jrobinso Sep 25, 2018
77a1818
feature drawing optimization -- don't draw features that won't be seen.
jrobinso Sep 25, 2018
811e1d1
viewbox error in svg
jrobinso Sep 25, 2018
4fea87e
Set clip rect for SVG export.
jrobinso Sep 25, 2018
6a4cad6
svg - set viewbox to account for vertical scroll
jrobinso Sep 25, 2018
1d3c619
SVG optimization -- don't draw rects that are out of view (do not int…
jrobinso Sep 25, 2018
47079ba
RNA structure track (".bp" files)
jrobinso Sep 27, 2018
a9d8ea9
Use track prototype chaining to share base properties
jrobinso Sep 28, 2018
2dea74c
zoom slider
turner Sep 27, 2018
e7f61d0
css-ing
turner Sep 27, 2018
808fbb1
refactor - browser.minifyWithGenomicStateWithCenter
turner Sep 28, 2018
02f4d51
minify - refactor
turner Sep 28, 2018
4501c21
zoom refactor
turner Sep 28, 2018
94f8aa7
added lerp function
turner Sep 28, 2018
d6edc72
bug fix
turner Sep 28, 2018
0458256
browser.doZoom(). Clean up loop
turner Sep 28, 2018
929c1d0
implement browser.zoomWithRangePercentage
turner Sep 28, 2018
1cd8015
bi-directional slider
turner Sep 28, 2018
564a313
bug fix
turner Sep 28, 2018
956661e
refactor slider zoom
turner Sep 28, 2018
c9ec6a2
refactor
turner Sep 28, 2018
13506e0
Range slider (#739)
jrobinso Oct 1, 2018
c0d7a02
multi-locus view. hide zoom slider.
turner Oct 1, 2018
ce0e991
Merge remote-tracking branch 'origin/range-slider'
jrobinso Oct 1, 2018
a04b9e1
track labels. handle multi-locus view. (#740)
turner Oct 2, 2018
2160ccd
remove karyo remnents
turner Oct 2, 2018
20b8502
Merge pull request #741 from igvteam/dat_remove_karyo
turner Oct 2, 2018
f40d8ce
Merge remote-tracking branch 'origin/master'
jrobinso Oct 2, 2018
0f67a9c
"arc" track for rna structure base pair data (".bp"). See issue #730
jrobinso Oct 2, 2018
3b53a9b
Arc track issues -- see issue #730
jrobinso Oct 3, 2018
bdd005e
ditto
jrobinso Oct 3, 2018
5feb4f6
bookmark bug fix
jrobinso Oct 3, 2018
49ccd9b
issue743fix : fix to select correct alignmentBlock when the clicked p…
kaushik51094 Oct 4, 2018
2244bb1
misc
jrobinso Oct 4, 2018
9849df1
tmp
jrobinso Oct 5, 2018
20f5494
bug fix -- png output broken
jrobinso Oct 8, 2018
43c967c
Remove test for deprecated web service
jrobinso Oct 8, 2018
87e3c94
fix problems with zoom widget, slider hide/show
jrobinso Oct 9, 2018
c5ef326
Add support for SNP track
jrobinso Oct 9, 2018
e603e55
show/hide ruler works again. New issue: multi-locus panel delete butt…
turner Oct 9, 2018
587dd41
bigwig bug fix and optimization
jrobinso Oct 9, 2018
c6e37a2
bug hunt. Genome swap. Show/hide ruler is probably the culprit. (#748)
turner Oct 10, 2018
dbf8fb2
bw cleanup
jrobinso Oct 10, 2018
6585cfe
Enable "showRuler=false"
jrobinso Oct 10, 2018
c29cd71
test data updates
jrobinso Oct 10, 2018
e8225db
Update dev html and test files
jrobinso Oct 11, 2018
a5a26d5
change gtex base url
jrobinso Oct 11, 2018
440bffa
reduce default gtex viz window
jrobinso Oct 11, 2018
4118d08
add 'snp' to viz window types
jrobinso Oct 11, 2018
d361863
Support for UCSC repeat masker files
jrobinso Oct 12, 2018
3527813
ucsc track updates
jrobinso Oct 12, 2018
3435d0d
bound genomic range for ucsc queries
jrobinso Oct 12, 2018
eb386c8
Bug fix -- visibility window set as string, not int!
jrobinso Oct 13, 2018
1f9a3d0
Add embed target
jrobinso Oct 13, 2018
f9a1578
Add test file for embed.html
jrobinso Oct 13, 2018
5c99044
...
jrobinso Oct 13, 2018
e02f0fb
protect against malformed locus strings
jrobinso Oct 13, 2018
fa31b21
Enhance support for UCSC formats, and custom formats generally
jrobinso Oct 14, 2018
d95699e
Support UCSC "ensgene" format
jrobinso Oct 14, 2018
d229939
feature parsing
jrobinso Oct 14, 2018
0fad516
add clinvar format
jrobinso Oct 14, 2018
de2f1e7
test maintenance
jrobinso Oct 14, 2018
fd5f2e0
case issue affecting test
jrobinso Oct 14, 2018
23372a5
custom feature parsing update
jrobinso Oct 14, 2018
44276a5
whole genome feature drawing bug fix -- exons do not have WG coordin…
jrobinso Oct 14, 2018
50d3910
Add babel console remove plugin. Fixes #613
jrobinso Oct 14, 2018
d386ce6
Add zoom wiht scale factor, fixes #508
jrobinso Oct 14, 2018
fb6c2a4
unit tests
jrobinso Oct 15, 2018
168058e
update npm version
jrobinso Oct 15, 2018
4268f80
update readme
jrobinso Oct 15, 2018
3230ad0
Update README.md
jrobinso Oct 15, 2018
80f3425
Initial support for CIViC
jrobinso Oct 16, 2018
82f7c96
Add color menu for annotation tracks
jrobinso Oct 16, 2018
6875117
civic tweaks
jrobinso Oct 16, 2018
aa620ae
Copy prototype when making WG objects
jrobinso Oct 16, 2018
bc031e6
civic popup text tweak
jrobinso Oct 16, 2018
9ebe46e
civic
jrobinso Oct 16, 2018
2c21e74
CIViC popup data tweaks
jrobinso Oct 16, 2018
c79ecd4
uppercase displayMode
jrobinso Oct 16, 2018
b47aab2
Add "quick build" to facilitate debugging. Only builds igv.js
jrobinso Oct 17, 2018
5d5dc71
Fix for tabs visibility problem
jrobinso Oct 17, 2018
b59ce98
Fix minor issue affecting RNA-Seq gaps when left block is out of view.
jrobinso Oct 17, 2018
7c6c44e
Update grunt file for quick build
jrobinso Oct 17, 2018
55d0478
Fix visibility problem when using tabs / hidden modals for ruler and …
jrobinso Oct 17, 2018
ba188f4
Resize trackView left gutter properly (#754)
anderspitman Oct 17, 2018
d1c5228
add local bam example
jrobinso Oct 19, 2018
45e36e0
add bordere to localBam.html
jrobinso Oct 19, 2018
436c39e
update version number
jrobinso Oct 20, 2018
01a88b6
Implement TextDecoder for IE
jrobinso Oct 20, 2018
cedb505
fix test for TextDecoder
jrobinso Oct 20, 2018
a9c94cc
Update README.md
jrobinso Oct 21, 2018
81b7b8d
igv.xhr tests
jrobinso Oct 22, 2018
f1c1e50
Update README.md
jrobinso Oct 23, 2018
213851f
Dat final responsive navbar (#761)
jrobinso Oct 24, 2018
6312f56
Dat final content header (#762)
jrobinso Oct 25, 2018
af583a7
Update README.md
helgathorv Oct 26, 2018
617b025
remove dead code
jrobinso Oct 29, 2018
99ce9e5
bug fix -- sequence tracks accumulate from loading sessions
jrobinso Oct 29, 2018
70ab658
Fix "browser.toJSON" bug (was returning string, not object)
jrobinso Oct 30, 2018
3885d7a
Fusion Inspector. Zoom Widget layout fix. (#769)
turner Oct 30, 2018
def8429
Support fasta with start offset
jrobinso Oct 30, 2018
3be1a07
Initial support for "points" graphType - wig tracks.
jrobinso Oct 31, 2018
6393afa
navbar. responsive tweaks. (#771)
turner Nov 1, 2018
2208bba
Track Color Picker Rethink. (#772)
turner Nov 1, 2018
8c9d513
fix dev html bug
jrobinso Nov 2, 2018
833249a
Remove locus from igv-dev.html
jrobinso Nov 2, 2018
413aec1
Track Render Fixes Specific to SVG Output. (#776)
turner Nov 2, 2018
9df2a85
SVG Output (#777)
turner Nov 3, 2018
5a4d6c3
wig track baseline tweak
jrobinso Nov 3, 2018
6b2d81d
SVG Save. API signature improvements (#778)
turner Nov 3, 2018
7e2bc13
Fix sort-by-base bug. Alignment rows with no overlapping base were i…
jrobinso Nov 4, 2018
7e85f30
Fix npe exception in whole genome SVG rendering
jrobinso Nov 5, 2018
db4be92
bug fixes
jrobinso Nov 6, 2018
5658b85
move canvas2svg.js to "js" folder. Fixes #780
jrobinso Nov 6, 2018
1728c96
Add configuration parameter for custom genome list. Fixes #779
jrobinso Nov 6, 2018
36efb8d
Correct rounding error in bam coverage calculation (#774)
oyvinev Nov 6, 2018
432ed0e
use viewport width rather than canvas width to autoscale arcs
jrobinso Nov 6, 2018
57c0bd4
Whole Genome Ruler Track SVG Render. Git Issue 765. (#784)
turner Nov 7, 2018
e6b7198
SVG Render. Axis Rendered only for first panel in multi-locus. Git Is…
turner Nov 7, 2018
4533bae
faulty endianess init logic. Fixes #788
jrobinso Nov 7, 2018
0f8e46d
multi-locus view. add inter-panel gap. (#787)
turner Nov 8, 2018
86d86b9
update all .html files in dev.
turner Nov 8, 2018
805b048
Update canvas2svg path
jrobinso Nov 9, 2018
fdac703
cBio html update
jrobinso Nov 10, 2018
a9d5258
Issues around large canvas size (track swith many rows, bam and seg p…
jrobinso Nov 11, 2018
1ce089e
SVG Render. WIG Track. X value is NaN. (#795)
turner Nov 15, 2018
e6008ac
Fix google oAuth problem -- calls to gapi.signIn must occur in contex…
jrobinso Nov 15, 2018
508de82
WGV Ruler Canvas. Include Fix for SEG Track. (#794)
turner Nov 16, 2018
74c5be7
generalize colorpicker functionality. For use by apps hosting igv.js …
turner Nov 16, 2018
4821a33
fixed decodeUTF8 function signature (#799)
jrobinso Nov 20, 2018
e00f846
Responsive Navbar. DIY. No media-queries. (#800)
turner Nov 27, 2018
7ec3c3a
color picker updates (#801)
turner Nov 28, 2018
be4ea45
Seg track compressed mode (#803)
jrobinso Nov 29, 2018
a508c20
2.1 updates
jrobinso Nov 30, 2018
0f155f7
update version
jrobinso Nov 30, 2018
4f111f8
Update README.md
jrobinso Nov 30, 2018
011f24c
navbar. firefox browser zoom-widget issues (#804)
turner Nov 30, 2018
3ce235b
use chr of mate in split screen view. Fixes #806
jrobinso Dec 6, 2018
b318178
Color alignments with mates on other chromosomes
jrobinso Dec 6, 2018
2f46ab7
UI tweaks (#805)
turner Dec 7, 2018
1f0bfb1
bug fix -- mouse handlers not added to sequence track
jrobinso Dec 8, 2018
66cca75
Update README.md
jrobinso Dec 9, 2018
ce084b2
reset panning interval to 3x screen size
jrobinso Dec 10, 2018
be4e5f3
Fix ROI bug. See issue #319
jrobinso Dec 11, 2018
869f841
Cram (#813)
jrobinso Dec 11, 2018
61fee8f
Change signature of Browser.loadSession to support Google Drive
jrobinso Dec 11, 2018
d30bcf5
fix merge issues
jrobinso Dec 11, 2018
3c85aeb
remove accidentally committed file
jrobinso Dec 11, 2018
ee9cfee
remove zoom in notice from sequence track
jrobinso Dec 12, 2018
358681d
package json updates
jrobinso Dec 12, 2018
8ac802a
Limit query interval expansion to maximum of 4x current view (2 zoom …
jrobinso Dec 13, 2018
9892c82
rationalize session loading methods
jrobinso Dec 13, 2018
122c8d5
Some hand merging from mut-report branch
jrobinso Dec 13, 2018
4e5458b
Mut report (#819)
jrobinso Dec 13, 2018
f1fa4d5
remove test track from igv-dev
jrobinso Dec 13, 2018
321fec7
Build problem on Windows. Fixes #812
jrobinso Dec 13, 2018
1680169
Mut report (#823)
jrobinso Dec 13, 2018
985c8d0
track gear css-ing (#821)
turner Dec 13, 2018
45515a2
Update README.md
jrobinso Dec 15, 2018
756bb03
Update README.md
jrobinso Dec 15, 2018
e4b57b3
Web app (#826)
jrobinso Dec 16, 2018
58f4ed2
don't update hidden viewports (width == 0)
jrobinso Dec 18, 2018
91d4398
data uri cleanup
jrobinso Dec 18, 2018
fee2f23
alignment sort bug fix
jrobinso Dec 19, 2018
df50511
Seg track - use "sample" for "sampleKey" if sampleKey is not defined
jrobinso Dec 31, 2018
afbd522
Use simplified referenceFrame object locuschange event.
jrobinso Jan 2, 2019
1cfd48e
Declare stainColor (#832)
anderspitman Jan 11, 2019
c67580c
Add method to return SVG for current view
jrobinso Jan 11, 2019
a87de64
update package.json
jrobinso Jan 11, 2019
4411bba
Update readme
jrobinso Jan 11, 2019
2a52f99
fixes #827
jrobinso Jan 12, 2019
e9af0a0
use igv.min in embed.html
jrobinso Jan 12, 2019
11edc2c
Repair Icon creation and clean up css. (#833)
turner Jan 14, 2019
0fd0758
Fix CRAM bugs, fixes #834
jrobinso Jan 14, 2019
ac15fd1
Add popup message for CRAM files for MD5 mismatch. See #834
jrobinso Jan 15, 2019
140e9c0
Bug fix -- scrollbar not shown in multi-locus view
jrobinso Jan 15, 2019
7181a73
fixed bug with "view mate in split screen" -- broken if bam chr names…
jrobinso Jan 15, 2019
23de80a
rollback async/await
jrobinso Jan 15, 2019
6fe8141
Add babel regenerator to restore async/await
jrobinso Jan 15, 2019
cac70d5
Bug fix -- ideogram not shown from bookmarked sessions
jrobinso Jan 15, 2019
ec16067
Alert Dialog. Layout fixes. (#836)
turner Jan 15, 2019
6a1972d
alert scroll bar fix.
turner Jan 15, 2019
8ff7924
asycn/await -> loadGenome
jrobinso Jan 15, 2019
ef68a96
support whole genome for bed files
jrobinso Jan 15, 2019
64f8998
bug fix: coverage track mismatches not shown
jrobinso Jan 15, 2019
e15360d
fix track scroll bar
jrobinso Jan 16, 2019
7f0f5ce
Specify browser list for babel build > 1%, last 2 versions.
jrobinso Jan 16, 2019
57f69fe
Packaging overhaul
jrobinso Jan 16, 2019
20c394c
build cleanup
jrobinso Jan 16, 2019
c1a507f
Fix XML sessions
jrobinso Jan 16, 2019
af8ca96
Add unit tests for session files
jrobinso Jan 16, 2019
0e38dc2
test refactoring
jrobinso Jan 17, 2019
86cc6b6
Update cram bundle -- throw excpetion if content-range header is missing
jrobinso Jan 17, 2019
805c4cd
bug fix -- track type not correctly guessed for "cram" files
jrobinso Jan 17, 2019
9bf1b11
CSS Issues (#837)
turner Jan 17, 2019
24b51ea
Add babel prior to uglify
Chris7 Aug 30, 2018
aca6581
Add distributed files
Chris7 Aug 30, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 12 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
.DS_Store
/.vscode/
/dist/
/es5/
/.idea/
/igv.js.iml
/node_modules/.bin/cake
/node_modules
/dist/
/tmp/
/cBio/
/miRNA/
*.iml
/npm-debug.log
/css/.sass-cache/ab483755b4a226863a81d799c4857b21ee6820d0/_igv_trackgear_popup.scssc
/css/.sass-cache/ab483755b4a226863a81d799c4857b21ee6820d0/_igv-colorpicker.scssc
/css/.sass-cache/ab483755b4a226863a81d799c4857b21ee6820d0/_igv-generic-container.scssc
/css/.sass-cache/ab483755b4a226863a81d799c4857b21ee6820d0/igv.scssc
/css/.sass-cache/ab483755b4a226863a81d799c4857b21ee6820d0/_igv-trackgear-popup.scssc
/css/.sass-cache/ab483755b4a226863a81d799c4857b21ee6820d0/_igv-user-feedback.scssc
/css/.sass-cache/ab483755b4a226863a81d799c4857b21ee6820d0/_igv-generic-dialog-container.scssc
/css/.sass-cache
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: node_js
dist: trusty
sudo: required
node_js:
- "8.11.1"
addons:
chrome: stable
before_script: npm install -g grunt-cli; npm ls; grunt
script: npm test
80 changes: 74 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,54 @@
const webpackConfig = require('./webpack.config.js');

module.exports = function (grunt) {
require("load-grunt-tasks")(grunt);

// 1. All configuration goes here
grunt.initConfig({

pkg: grunt.file.readJSON('package.json'),

qunit_puppeteer: {
test: {
options: {
headless: true,
traceSettings: {
outputConsole: false,
outputAllAssertions: false
},
qunitPage: 'http://0.0.0.0:8000/test/runTests.html'
}
}
},

connect: {
server: {
options: {
port: 8000,
base: '.'
}
}
},

webpack: {
options: {
stats: !process.env.NODE_ENV || process.env.NODE_ENV === 'development'
},
prod: webpackConfig,
dev: Object.assign({ watch: true }, webpackConfig)
},

copy: {
igvjs: {
src: 'dist/igv.min.js',
dest: 'dist/igv.js',
},
},

concat: {
igv: {
src: [
'wrapper/header.js',
'wrapper/header-cjs.js',
'tmp/embedCss.js',
'vendor/jquery-3.3.1.slim.js',
'vendor/underscore.js',
Expand All @@ -16,12 +57,13 @@ module.exports = function (grunt) {
'vendor/jquery.mousewheel.js',
'vendor/rbtree.js',
'vendor/tdigest.js',
'vendor/cram-bundle.js',
'js/**/*.js',
'wrapper/footer.js'
'wrapper/footer-cjs.js'
],
dest: 'dist/igv.js'
dest: 'tmp/igv-cjs.js'
},
igv_es6: {
igv_esm: {
src: [
'wrapper/header-esm.js',
'tmp/embedCss.js',
Expand All @@ -32,6 +74,7 @@ module.exports = function (grunt) {
'vendor/jquery.mousewheel.js',
'vendor/rbtree.js',
'vendor/tdigest.js',
'vendor/cram-bundle.js',
'js/**/*.js',
'wrapper/footer-esm.js'
],
Expand Down Expand Up @@ -83,30 +126,55 @@ module.exports = function (grunt) {
dest: 'dist/igv.esm.min.js'
}
},
babel: {
options: {
sourceMap: true,
presets: ['es2015']
},
dist: {
files: {
'dist/igv.esm.js': 'dist/igv.esm.js',
'dist/igv.js': 'dist/igv.js',
}
}
}

clean: {
dist: ['dist'],
tmp: ['tmp']
}

});

// 3. Where we tell Grunt we plan to use this plug-in.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify-es');
grunt.loadNpmTasks('grunt-qunit-puppeteer');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-webpack');

// 4. Where we tell Grunt what to do when we type "grunt" into the terminal.
grunt.registerTask('default', [ 'concat:css', 'embed-css', 'concat:igv', 'concat:igv_es6', 'uglify:igv', 'uglify:igv_esm']);
grunt.registerTask('default', ['clean:dist', 'concat:css', 'embed-css', 'concat:igv', 'webpack:prod', 'concat:igv_esm', 'babel', 'uglify:igv_esm', 'copy:igvjs', 'clean:tmp']);

grunt.registerTask('doc', ['md2html']);

grunt.registerTask('test', ['connect', 'qunit_puppeteer:test']);

grunt.task.registerTask('embed-css', 'One line-ify igv.css.', function () {

var ping,
pong,
foo;

ping = grunt.file.read('tmp/igv-all.css');
ping = ping.replace(/\r\n/g, '\\n');
pong = ping.replace(/\n/g, '\\n');
ping = pong.replace(/"/g, '\\"');

foo = grunt.file.read('wrapper/embedCss.js');
foo = foo.replace('_CSS_', ping)
foo = foo.replace('_CSS_', ping);

grunt.file.write('tmp/embedCss.js', foo);
});
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2018 The Regents of the University of California
Copyright (c) 2018 Regents of the University of California and Broad Institute

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
151 changes: 147 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,150 @@
igv.js
=======
# igv.js
[![Build Status](https://travis-ci.org/igvteam/igv.js.svg?branch=master)](https://travis-ci.org/igvteam/igv.js)

igv.js is an embeddable interactive genome visualization component developed by the
[Integrative Genomics Viewer (IGV)](https://igv.org) team.

Below are examples and a quickstart guide.
See the [Wiki](https://github.com/igvteam/igv.js/wiki) for more documentation.

igv.js is an embeddable interactive genome visualization component. It is based on the desktop [Integrative Genomics Viewer (IGV)](http://www.broadinstitute.org/igv), and developed by the same team.

# Examples

***[Alignments](https://igv.org/web/release/2.2.0/examples/bam.html)***

See the [Wiki](https://github.com/igvteam/igv.js/wiki) for more information.
***[GA4GH](https://igv.org/web/release/2.2.0/examples/ga4gh.html)***

***[Copy number](https://igv.org/web/release/2.2.0/examples/copyNumber.html)***

***[Multiple regions](http://igv.org/release/2.2.0/test/examples/multi-locus.html)***

***[More](http://igv.org/web/release/2.2.0/examples)***


# Quickstart

## Installation
igv.js consists of a single javascript file with no external dependencies. To link directly to the current release copy this snippet

```html
<script src="https://cdn.jsdelivr.net/npm/igv@2.2.0/dist/igv.min.js"></script>
```

Pre-built expanded and minified js files for ES5 (igv.js, igv.min.js) and ES6 (igv.esm.js, igv.esm.min.js)
can be downloaded from [https://igv.org/web/release/2.2.0/dist/](https://igv.org/web/release/2.2.0/dist/).

Alternatively you can install with npm

```npm install igv```

and source the appropriate file for your module system (igv.min.js or igv.esm.min.js) in node_modules/igv/dist.

To use igv.js include it with a script tag

````<script src="igv.min.js/>````

***or*** import it as a requirejs module

```requirejs(['igv.min'], function (igv) {...}``` *(see [examples/igv-require.html](http://igv.org/web/release/2.2.0/examples/igv-require.html))*

***or*** import it as an es6 module

```import igv from 'igv.esm.min.js'``` *(see [examples/igv-esm.html](http://igv.org/web/release/2.2.0/examples/igv-esm.html))*



## Usage

To create an igv.js ***browser*** supply a container div
and an initial configuration defining the reference genome, initial tracks, and other state to the
function ```igv.createBrowser(div, config)```.

This function returns a promise for an igv.Browser object which can used to control the browser. An
[example](http://igv.org/web/release/2.0.0-rc5/examples/bam.html) of
a browser on a single alignment track opened at a specific locus:

```
var igvDiv = document.getElementById("igv-div");
var options =
{
genome: "hg19",
locus: "chr8:128,747,267-128,754,546",
tracks: [
{
type: 'alignment',
format: 'bam',
url: 'https://data.broadinstitute.org/igvdata/1KG/b37/data/HG02450/alignment/HG02450.mapped.ILLUMINA.bwa.ACB.low_coverage.20120522.bam',
name: 'HG02450'
}
]
};

igv.createBrowser(igvDiv, options)
.then(function (browser) {
console.log("Created IGV browser");
})
```

For more details see the [Wiki](https://github.com/igvteam/igv.js/wiki) for full documentation of the API.

## Development

### Requirements

Building igv.js and running the examples require Linux or MacOS. Other Unix environments will probably
work but have not been tested.

Windows users can use [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/install-win10).

### Building

Building igv.js and running the examples requires [node.js](https://nodejs.org/).


```
git clone https://github.com/igvteam/igv.js.git
cd igv.js
npm install
npm run grunt
```

This creates a dist folder with the following files

* igv.js, igv.min.js - ES5 compatible files for script or requirejs imports
* igv.esm.js, igv.esm.min.js -- ES6 module


### Tests

To run the tests from the command line

```
grunt test
```

To run the tests in a browser start an [http-server](https://www.npmjs.com/package/http-server)

npm run http-server

Then open [http://localhost:8080/test/runTests.html](http://localhost:8080/test/runTests.html).


### Examples

To run the examples start an [http-server](https://www.npmjs.com/package/http-server)

npm run http-server

Then open [http://localhost:8080/index.html](http://localhost:8080/index.html).


# Supported Browsers

igv-webapp and igv.js require a modern web browser with support for Javascript ECMAScript 2015. We test on the latest versions of Chrome, Safari, Firefox, and Edge. Internet Explorer (IE) is not supported.

# License

igv.js is [MIT](/LICENSE) licensed.

[documentation]: https://github.com/igvteam/igv.js/wiki
[examples]: http://igv.org/web/test/examples
Loading