Skip to content

Commit

Permalink
Merge branch 'release/1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranmraine committed Mar 30, 2017
2 parents f138298 + 0a5aeb1 commit 64e8333
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 10 deletions.
11 changes: 5 additions & 6 deletions docs/source/howItWorks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ How jbrowse_rasterize works
The ability to take screenshots in JBrowse is made diffcult by there being no true end-point to the
generation of a view. All actions are asynchronous with no single testable variable or element.

``jbrowse_rasterize`` attempts to compensate for this by testing several critical elements of the DOM.
``jbrowse_rasterize`` attempts to compensate for this by testing several critical elements of the DOM::

1. ``document.readyState === "complete"``
2. ``document.getElementsByClassName('innerTrackContainer')[0]\``
``.getElementsByClassName('track').length === trackCount+1``
3. ``document.getElementsByClassName('loading').length === 0``
document.readyState === "complete" &&
document.getElementsByClassName('innerTrackContainer')[0].getElementsByClassName('track').length === trackCount+1 &&
document.getElementsByClassName('loading').length === 0

Item 2 needs the ``+1`` to account for the grid background track.
``trackCount`` needs ``+1`` to account for the grid background track.
3 changes: 2 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ that are considered publicly useful.

.. toctree::
:maxdepth: 2
:caption: Tools
:caption: Documents

jbrowse_rasterize
installation
howItWorks

License
Expand Down
10 changes: 10 additions & 0 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Installation
============

Installation of ``jbrowse_rasterize`` can be achieved a number of ways but the
simplest is::

export VERSION=master # or version number, e.g. 1.1.0
export JBTK=https://raw.githubusercontent.com/cancerit/cgpJBrowseToolkit
curl -sSL $JBTK/$VERSION/js/jbrowse_rasterize.js> $HOME/local/bin/jbrowse_rasterize.js
chmod u+x $HOME/local/bin/jbrowse_rasterize.js
2 changes: 1 addition & 1 deletion docs/source/jbrowse_rasterize.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Usage

Usage is simple, set up the display with relevant tracks in the browser and provide the updated URL it to the script::

$ casperjs jbrowse_rasterize.js \
$ jbrowse_rasterize.js \
--width=1200 \
--imgType=png \
--locs=places.bed \
Expand Down
5 changes: 3 additions & 2 deletions js/jbrowse_rasterize.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var VERSION="1.0.0"
#!/usr/bin/env casperjs
var VERSION="1.1.0"

var casper = require('casper').create({
verbose: true,
Expand All @@ -13,7 +14,7 @@ if(casper.cli.has("v")) {
phantom.exit(0)
}

var usage = "\nUSAGE: casperjs jbrowse_rasterize.js --width=<int> --imgType=<bmp|jpeg|pdf|png> --baseUrl=<url> --locs=<locations.bed> --outdir=<outdir> [--passwdFile=<file>] [--navOff]\n"
var usage = "\nUSAGE: jbrowse_rasterize.js --width=<int> --imgType=<bmp|jpeg|pdf|png> --baseUrl=<url> --locs=<locations.bed> --outdir=<outdir> [--passwdFile=<file>] [--navOff]\n"
+"\tNOTE: if '--imgType=pdf' please set '--height=<required height>\n"
+"\tVERSION: use '--v' to ger version of script, (--version gives the casperjs version)\n";

Expand Down

0 comments on commit 64e8333

Please sign in to comment.