## This is the script for the JBrowse demo screencast, last updated January 15, 2013 ##

** set up browser to initial state: 1088x784, click

http://localhost/jbrowse/index.html?loc=ctgA%3A11576..30575&tracks=Transcript%2Cbam_simulated%2Cvolvox_microarray.bw_xyplot&data=sample_data%2Fjson%2Fvolvox

then close tracks

**

** hit record **

=========================
SCENE 1
=========================

Hi, I'm Rob Buels, lead developer of the JBrowse genome browser.  This short video gives an overview of the primary features of JBrowse.

Like most genome browsers, JBrowse lets you scroll back and forth through a genome, displaying data in multiple tracks on the screen.  For this demo, we are using a set of artificial test data.

Let's turn on a few tracks.  We can either drag them from the track list on the left into the main display pane -

** turn on Exonerate predictions, "Simulated next-gen reads" by dragging **

or by double-clicking them

** turn on "BigWig XY - volvox_microarray" with double-click **

To scroll back and forth, we just click and drag in the main pane.

** scroll with the mouse **

If we double-click in the main pane, we zoom in, and shift-double-clicking zooms out.  We can also do these things using the buttons in the navigation area at the top.

Another way of navigating in JBrowse is what's called rubber-band zooming, or dynamic zooming, where you can highlight parts of the display that you want to zoom to.  You can do this either in the overview -

** highlight in the overview to zoom out **

or in the main view while holding down shift to highlight.

** shift-zoom in the main view **

To find a specific feature or reference sequence by name, just type its name in the location box at the top.  Let's type the name of a test feature, f14.

** Type "f1" slowly in the location box **

Notice that as I type, JBrowse suggests names of features that match what I've typed.  So far, I've only typed "f1", but JBrowse is already suggesting "f14" as an option, so I'll click it to select it -

** click "f14" **

and then hit "Go" to jump to it.

** click "Go", MOVE MOUSE OFF SCREEN **

**
 put

 http://localhost/jbrowse/index.html?data=sample_data/json/modencode

 in the clipboard
**
========================================================
SCENE 2
========================================================

Notice that "Example Features", the track that contains f14, is automatically brought up to show the feature we're searching for.

JBrowse is capable of displaying a wide variety of data types, and has support for many popular file formats, including GFF3, BED, BAM, Wiggle, and BigWig.

One of the best features of JBrowse is its ability to display data directly from BAM and BigWig files, with no pre-processing necessary.  This means that if your BigWig or BAM file is accessible on your web server, you can just add a track entry for it in the JBrowse configuration, and it'll be ready to go.

# BAM alignments

First, let's have a look at some alignments from a BAM file, in the track labelled 'volvox-sorted.bam'.  We'll turn off these tracks to give us some space -

** turn off all visible tracks **

We'll drag it from the side bar to turn it on.

** turn on volvox-sorted.bam **

This is a simulated genomic resequencing dataset, with next-gen reads of 100bp, shown with a JBrowse Alignments track, which is optimized specifically for showing next-generation alignments.  As we scroll through, we can see that this data includes both sequencing errors and some SNPs.  It's easy to see visually where the reads agree on a sequence that is different from the reference, since it looks like a column of a different color.  To see all of the detailed information about a particular read, just click on it -

** click on one of the reads **

and a window showing all of the data for that read will come up.

** close the dialog **

Once again, all of this is being displayed directly from the BAM file itself.  As we scroll around, JBrowse is fetching small pieces of the file as they are needed, which works with even the largest BAM files.

# BigWig files

Similarly, JBrowse can also display quantitative data directly from BigWig files.  Let's turn off that alignment track, and turn on a couple of tracks that demonstrate the BigWig functionality -

** turn on BigWig Density and BigWig XY - volvox_microarray **

These are two different views of data from the same BigWig file, which contains some made-up quantitative test data.

The upper track is a JBrowse Wiggle/Density track, set up to show the quantitative data as colored regions: blue for values above the data set's global mean, red for values below the mean.  More intense blues and reds indicate values that are further above and below the mean, respectively.

The lower track, labeled 'BigWig XY', is a JBrowse Wiggle/XYPlot track, which shows a bar graph of the quantitative data.  This one is configured to show the values as blue bars of varying heights, along with a yellow line showing the data's global mean, and grey shaded regions showing plus or minus one and two variances of the mean.

And, just as with the BAM track shown earlier, JBrowse fetches small parts of the BigWig file on an as-needed basis, so this works with even with very large BigWig files.

What's more, beginning in JBrowse 1.7, all of this data can be exported to a variety of file formats.  For example, to get the quantitative data for this particular region in a bedGraph file, I can just go to the menu for this track -

** click the track menu -> save track data **

choose to save the visible region, and bedGraph format

** choose visible region and bedGraph format **

and hit 'View'to see the bedGraph dump of the data in the currently visible region.

** hit View **

and there we have our bedGraph file with the data from this region.  If we want to save it to disk, we can hit the Save button here, or we could also have hit the save button on the previous screen.

This data-saving functionality works with all of the major data types supported by JBrowse, and can save files in FASTA, GFF3, BED, bedGraph, and Wiggle format.

Next, we'll navigate to a different set of test data for 1800 tracks from the modENCODE project, looking at another exciting feature of JBrowse: the optional faceted track selector.

** pull up the modencode demo in A NEW TAB

http://localhost/jbrowse/index.html?data=sample_data/json/modencode

**

==================
SCENE 3
==================

With the faceted track selector, you can progressively narrow the set of tracks you're interested in by selecting the attributes you want them to have; that is, searching by one or more facets of the track data.  In the track selector, click to select an attribute, then click to select one or more values you want to search for.

So, let's say we want to find tracks with data from Robert Waterston's lab.  We go over to the 'Principal investigator' facet, and in there we see a list of PIs whose labs are generating these modENCODE tracks, with a count of how many tracks come from that lab.  OK, so we select Robert Waterston.

Now, say we also want only RNA-seq tracks, so we go to Technique and select RNA-seq.

** select Technique -> RNA-seq **

if we go back and look again at the principal investigators section, you can see that the PIs and counts have changed.  The list of values for each facet is affected by what is selected for the other facets, so now that we have selected RNA-seq, the Principal Investigators facet only shows PIs that have RNA-seq tracks, and it shows a count of how many RNA-seq tracks they have.

So now we have 89 matching tracks.  So, finally let's say we're only interested in tracks that involve C. elegans Dauer larvae, so we type 'dauer' in the text search box.  This narrows it to three tracks that satisfy the criteria: they are from Robert Waterston's lab, are produced with RNA-seq, and have the keyword 'dauer' in their metadata.

Now, let's say we change our mind and don't want to limit it just to RNA-seq tracks.  We can either click RNA-seq under Techniques again to toggle that selection off, or we could hit the red X next to technique to clear the selections for the whole facet.

Now we have 17 tracks that match: 3 RNA-seq tracks and 14 integrated-gene-model tracks, generated by the Waterston lab, and involving Dauer larvae.

To turn these on in the display, we either check the box next to each of them, or we can turn them all on and off at the same time using the check box in the column heading on the left.

And finally, if we want to clear our selections and start again, we can hit the 'Clear all filters' button, and find more tracks.

One last thing to point out: the faceted track selector also has a couple of special categories for tracks that are currently turned on, and tracks that have been recently used.  You can use these as search terms like anything else.  So if we want our recently used tracks for Dauer larvae, we can just select Recently Used, and type 'dauer' in the text box.

** turn off the faceted selector **

** Go back to the volvox data tab **

This concludes the overview of JBrowse's main features.  Visit jbrowse.org for more screen casts, as well as live demos and links to documentation about how to set up your own JBrowse genome browser.  Happy browsing!


