Sessions management

How to handle sessions

When you open RNAseqViewer, a new session will be started. This means you will start with a blank track list and no dataset is loaded yet. You can then add datasets, navigate along the data and customize the tracks.

To avoid having to repeat these operations if you want to visualize the same data a second time, you can save the session through the File menu. This means that all the settings about the loaded datasets, the way tracks are displayed and the current location will be saved in a session file, with the extension .rsv.

If you want to visualize again the data from a previously saved session, you can open the session through the File menu. This will load the datasets and restore the appearance of the software to the same state as when you saved the session.

Session files

Session files are XML files with the extension .rsv. They are designed to be easily edited or created by humans.

The root of the file is a <session> element. It should contain a <datasets> element, which will contain all the loaded datasets. Each dataset is a <dataset> element, which should have two attributes:

  • The attribute file should contain the path to the data file. It is possible to mention a URL (over HTTP of FTP) to a distant file, which will be downloaded in the downloaded directory located in the installation path of RNAseqViewer.
  • The attribute type should contain the name of the type of dataset, among the following list:
    • sequence for DNA sequences (Fasta files)
    • annotations for genome annotations (RefFlat or GTF files)
    • reads for read alignments (SAM/BAM files)
    • bed for BED annotations (BED files)
    • junctions for splicing junctions (BED files)
    • transcripts for transcriptomes (GTF files)
    • numeric for numeric data (Wiggle files)

The tracks for each dataset should be defined with <track> element inside the a <dataset> element. The <track> element has the following attributes:

  • name: the name of the track
  • color: the color of the handle of the track, in the hexadecimal format (#XXXXXX)
  • viewtype: the type of view of the track, depending on the type of dataset
  • height (optional): the height of the track in pixels
  • order (optional): the rank of the track with regards to the other tracks (0 for the first track, 1 for the second track, etc.)

The information about the view’s settings are given in the <view> element, which is a direct child of the <session> element. It can contains several optional sub-elements:

  • the <position> element, with the coordinates of the current view given in its three attributes: chr, start and end.
  • the <window> element with the information about the size and the organization of the window’s elements. The <window> element contains two attributes: geometry and state, which are encoded strings.
  • the introns element, which indicates whether introns should be hidden or not. This is given in its hidden, which should be either True or False.

Here is an example of session file:

<?xml version="1.0" ?>
<session>
   <datasets>
      <dataset file="D:\data\hg18\hg18.txt" type="annotations">
         <track color="#FB6F96" height="145" name="hg18" order="1" viewtype="expanded"/>
      </dataset>
      <dataset file="D:\data\accepted_hits.bam" type="reads">
         <track color="#FFD6F9" height="120" name="accepted_hits" order="2" viewtype="coverage"/>
         <track color="#5687AE" height="145" name="accepted_hits" order="3" viewtype="reads"/>
      </dataset>
      <dataset file="D:\data\hg18\hg18.fa" type="sequence">
         <track color="#42EF51" height="25" name="hg18" order="0" viewtype="sequence"/>
      </dataset>
   </datasets>
   <view>
      <window geometry="AdnQywABAAAA(...)AA==" state="AAAA/wAAAAD9(...)AA"/>
      <position chr="chr1" end="97352" start="1261"/>
      <introns hidden="True"/>
   </view>
</session>