GBrowse Persistent Variables

From GMOD
Revision as of 18:45, 12 August 2010 by Cvandevelde (Talk | contribs)

Jump to: navigation, search

[[GBrowse]] uses a few persistent variables to store data for a user. The following is an explanation of the structure of the commonly-used ones:

  • $state is a large hash containing information regarding the current configured state of the browser (hence the name). It contains the following key->value pairs:
    • width [string] - The width of the final image, in pixels, as set on the preferences tab.
    • source [string] - The current data source name.
    • ks [string] - ?
    • tracks [array] - An array of the labels of all the tracks for the
    • userid [string] - The currently-logged-in user's ID, corresponding to the main GBrowse user database.
    • uploadid [string] - The currently-logged-in user's uploads ID, corresponding to the folder containing their uploaded files.
    • seg_max [number] - The upper bound of the region currently being viewed; the right side of the image, unless flipped.
    • seg_min [number] - The lower bound of the region currently being viewed; the left side of the image, unless flipped.
    • flip [boolean] - True if the genome view has been flipped horizontally from the default left-to-right method.
    • show_tooltips [boolean] - Whether or not to show the helper tooltips in the main browser.
    • valid_region [boolean] - Whether the region requested is valid, or not. If not, the karotype is shown.
    • uploads [hash] - Contains all uploaded (not imported) files as keys, the values are arrays containing: ["uploaded file's name", "?"]
    • track_collapsed [hash] - ? "between"
    • region_size [number] - The size (in base pairs) of the region being viewed.
    • max segment [number] - ? 5000000
    • head [boolean] - ? 1
    • grid [boolean] - Whether or not to display the grid behind the rendered images
    • features [hash] - All the features available; the feature name is the key and the value is another hash containing 3 flags:
      • visible [boolean] - Whether or not the feature is visible in the browser display.
      • options [boolean] - ? 0
      • limit [boolean] - ? 0
    • version [number] - ? 100
    • stop [number] - ? 203999
    • ref [string] - The named region being displayed (?)
    • name [string] - The displayed name of the region (as seen in the "Landmark or Region" input field), "chrI:98000..203999" for example.
    • v [number] - ? 2
    • subtracks [hash] - ? {}
    • ins [boolean] - ? 1
    • stp [boolean] - ? 1
    • sk [string] - ? "sorted"
    • section_visible [hash] - A hash containing each section as a key and a boolean flag indicating whether a section is visible (true) or not (false).
    • cache [boolean] - Whether or not to cache the rendered images.
    • start [number] - 98000'
  • $session is a blessed hash containing information regarding the current user's session. It contains the following key->value pairs:
    • pid [number] - The process ID number of the session.
    • lockdir [string] - The directory path holding the lock information.
    • locktype [string] - The type of lock used.
    • lockobj [hash] - The [File::NFSLock http://search.cpan.org/~bbb/File-NFSLock-1.20/lib/File/NFSLock.pm] details of the session.
    • session [hash] - A hash containing the session data: