new data? quickly make XML files for your IGV server

Running IGV from a server (as briefly outlined here) enables you to access data quickly and remotely, but when new data comes in that you want to add to your existing data (‘nodes’), modifying the xml files can really suck the life out of you.

I have been getting lots of new data, but have been putting off uploading to my IGV web server because… I didn’t want to update the xml file! I realized however a relatively quick way to coax your data tracks (for me, mostly bisulfite sequencing) into the xml format to quickly add to the existing IGV xml file with all your other data. There’s almost certainly a better way to do this, but here’s what I came up with in a nutshell: move the data to the directory where you would host tracks that are viewed on your server (/var/www/html/igvdata/….), then open a new IGV window and upload those tracks, save the session (which outputs a session-specific XML), then basically copy-paste that XML file generated to make the new node in your existing data structure.

  1. put all the data tracks you want to add to your IGV server into the appropriate directory (/var/www/html/igvdata/some_new_directory_/ data_tracks_here_:-) /
  2. in a new IGV session, open all the tracks you want to ultimately add to your server
  3. save the session
  4. open the session xml file and copy all the “resources” that are those tracks you are adding.
  5. start a new xml in an IGV-friendly layout as outlined here with <Global> and <Category> root-parent elements.
  6. run this snippet of code over this new xml to add “name” feature to these file resources according to their basename (or you can do this by hand if you have few samples and/or don’t like the basename) otherwise your tracks will be nameless and sad
    1. perl -wpl -e ‘s/(path=some_new_directory\/)(.)(\/>)/name=”$2 $1$2$3/g;’
  7. modify the order and create sub-categories of the files using an xml editor like komodo so you don’t lose your marbles
  8. save this new and righteous XML in your web servin’ directory.
  9. update your registry text file (as outlined on the same webpage as step 5).

good luck!

Leave a Reply

Your email address will not be published. Required fields are marked *