XML session file up-to-date specifications?

133 views
Skip to first unread message

Scott Kallgren

unread,
Nov 22, 2017, 1:10:42 PM11/22/17
to igv-help
Dear IGV users and developers,

Does anyone know if there are up-to-date XML session file specifications/documentation anywhere? The version I save from IGV 2.4.3 (macOS High Sierra) looks fairly different from either of these:

https://software.broadinstitute.org/software/igv/Sessions
https://software.broadinstitute.org/software/igv/ControlIGV (clearly older)

For instance:
  1. In <Session>
    1. What does 'path' do?
    2. My just-saved XML says `version="8"`, whereas both those links specify to put `version="3"`.
  2. In <Resource>
    1. What's an example of how `url` might be used if the `path` is already a URL?
  3. In <Panel>
    1. Is there a default width--can I leave this blank?
    2. Does the 'name' matter? It isn't shown.
  4. In <Track>
    1. What are the appropriate syntax/allowable options for color, expand, renderer, visible, and windowFunction?
    2. Is 'id' just a path to the file?
  5. What are <PanelLayout> and <HiddenAttributes>?
I can figure some of these out by trial and error, but others I can't (e.g. what are the 'renderer' options?).

My goal, by the way, is to script output of a session file for each end user after I run a bioinformatics pipeline containing their relevant track files, annotation files, and genome.

Thanks much,
Scott

James Robinson

unread,
Nov 23, 2017, 10:34:53 PM11/23/17
to igv-help
Hi, unfortunately no there is not.      The only officially supported use of session files is what's documented. Looking at the output of a saved session file is probably not an optimal way to reverse-engineer this because it dumps the entire state of the objects,  which is usually much more than is necessary. 

For what you are trying to do it should be enough to just supply the "Resources" section,  leave the Panel, PanelLayout, and HiddenAttributes out completely.   Those sections are only necessary for fine grain control of what the user sees.   If you want to control track attributes a better method is to use a track line in the files themselves.   Nevertheless, answers to your questions are below.

BTW the xml based session format is to be updated and replaced, probably with json.  This will be better documented.   If you're interested in having input, or just want to list your requirements for a session file,  please join the conversation at https://github.com/igvteam/igv/issues/492


In <Session>
What does 'path' do?

Nothing, you can ignore it.

My just-saved XML says `version="8"`, whereas both those links specify to put `version="3"`.

You can ignore this as well

In <Resource>
What's an example of how `url` might be used if the `path` is already a URL?

This is confusing,  url is an optional url of a website that will be opened when you click on a feature,  you can ignore it.

In <Panel>
Is there a default width--can I leave this blank?

Panel width can be left blank,  in fact it can't really be set.   This is just dumped as part of the state,  not useful as input.

Does the 'name' matter? It isn't shown.

No,  it should probably be unique but it isn't shown.  

In <Track>
What are the appropriate syntax/allowable options for color, expand, renderer, visible, and windowFunction?

You should probably leave these as default, the exception being color and expand.   Color is a comma separated rgb string,  e.g.  128,128,200.  I don't see an "expand" attribute,  did you mean to say "displayMode"?   This applies to feature tracks and can be COLLAPSED, SQUISHED, or EXPANDED.

Is 'id' just a path to the file?

In most cases yes.  The exception being files that produce multiple tracks, such as .seg files,  in which case it is more complicated.  

What are <PanelLayout>  

This contains the fractional height of each panel,  relative to the total height of the data portion of the window.   

<HiddenAttributes>?

Ignore this (leave it out)


--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/6662d1a6-93df-4004-a797-9abc0f52fe2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Scott Kallgren

unread,
Nov 27, 2017, 11:21:05 AM11/27/17
to igv-help
Hi Jim,

Thanks so much for all that. I'll play with producing a minimal XML, perhaps with a little <Track> info so I can specify `displayMode="SQUISHED"` for isoform-heavy reference tracks. And I might try `visible="false"` to hide the small BED I'm including to make the large indexed GTF reference searchable at the gene level.

By the way, re: `expand`, that's an option shown in https://software.broadinstitute.org/software/igv/Sessions . Perhaps it's not currently in this version.

Best,
Scott
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.

Scott Kallgren

unread,
Dec 21, 2017, 4:52:57 PM12/21/17
to igv-help
Quick question: is there a way to XML-encode starting a session in Group Autoscale for all/any tracks? I can't seem to find it.

Perhaps something related to nextAutoscaleGroup="3"?

Thanks much,
Scott

James Robinson

unread,
Dec 21, 2017, 9:08:53 PM12/21/17
to igv-help
Hi Scott,

Apparently (I just tried) there is not,  group autoscale is not preserved in sessions.   This is a bug obviously,  I'm surprised it hasn't been reported before.    If you could open a git issue we can continue discussion there about a fix.

JIm


To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/8a71dba1-8b24-47c9-9586-ac35c54eba5e%40googlegroups.com.

Scott Kallgren

unread,
Dec 22, 2017, 1:23:41 PM12/22/17
to igv-help
Thanks much, Jim.

For posterity, here's the GitHub issue: https://github.com/igvteam/igv/issues/500

James Robinson

unread,
Dec 22, 2017, 2:43:29 PM12/22/17
to igv-help
Yes, I'm going to dig into this post holidays.   The next release of the session format will be json, and compatible with igv.js.   The XML will still be supported of course.

To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/c76d6274-5797-4438-b428-6e4afc989f84%40googlegroups.com.

Malcolm Cook

unread,
Jan 22, 2020, 1:15:36 AM1/22/20
to igv-help
James et al, on the IGV team,

I too would be interested in more options for programmatically creating an IGV_Session file.  I've been using R library "tracktables" to do so but it is very incomplete in what it supports (specifically, it has not interface for correctly injecting .igv files into the session file)..  Any advances in this regard, or pointers to other approaches?

Cheers,

Malcolm
To unsubscribe from this group and stop receiving emails from it, send an email to igv-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages