{"id":212,"date":"2015-08-13T15:31:13","date_gmt":"2015-08-13T22:31:13","guid":{"rendered":"http:\/\/genome.ucsc.edu\/blog\/?p=212"},"modified":"2021-10-30T15:28:27","modified_gmt":"2021-10-30T15:28:27","slug":"how-to-share-your-ucsc-screenthoughts","status":"publish","type":"post","link":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/2015\/08\/13\/how-to-share-your-ucsc-screenthoughts\/","title":{"rendered":"How to share your UCSC screenthoughts"},"content":{"rendered":"<p>by Robert Kuhn\u00a0\u00a0\u00a0\u00a0\u00a0 August 12, 2015<\/p>\n<p>The UCSC Genome Browser is great tool for visualizing your data alongside a ton of data from all over the place.\u00a0 Perhaps, at long last, you have loaded up a gene set, the supporting mRNAs and maybe the SNPs from OMIM or dbSNP, and the Conservation track to make a great point.<\/p>\n<p>Now you want to save that thought, or share it with a colleague, or make a slide for a meeting, or publish it in a paper. Saving your screenthought can take two forms: static or dynamic.\u00a0 You can snap and save a picture of the screen, or you can share a link to an active Genome Browser.\u00a0 We\u2019ll talk about both approaches here and discuss some of the advantages and pitfalls of each.<\/p>\n<p><strong>Share a static image.\u00a0<\/strong> \u00a0 You can always take a screen grab and throw it onto a slide with little effort.\u00a0 The screen resolution is fine for\u00a0 a slide, because your computer and your slide will <a href=\"http:\/\/genome.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/viewFinger.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-215 alignleft\" src=\"http:\/\/genome.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/viewFinger.jpg\" alt=\"viewFinger\" width=\"197\" height=\"59\" \/><\/a>both be 72 or 96 dpi.\u00a0 But, if you try that for a publication, your image will have to be really small (scale down 3x in each dimension to get 300 dpi for print) or it will be unacceptably fuzzy.<\/p>\n<p>To get high resolution images for publication, use the Browser\u2019s .pdf export function to allow the vector-graphics image to scale to full journal size and resolution. Look for the .pdf output in the \u201cView\u201d pulldown menu at the top of the Browser page.\u00a0 Both the chromosome ideogram and the main Browser graphic can be saved in this fashion.<\/p>\n<p><strong>Share a dynamic session, but DO NOT copy a URL.<\/strong>\u00a0 To save a dynamic screen session that would allow you or others to look around, add more data tracks, check out other genes, etc., you might be tempted to simply copy the URL from your Firefox or Chrome web browser.\u00a0 That might even seem to work OK at first, but it is in fact not a stable link and can lead to weird Browser behavior.\u00a0 Worse, you may not even be sharing what you think you are, and will never know it.<\/p>\n<p>Let\u2019s break down a URL as copied directly from my Firefox and see how it plays out.<\/p>\n<p><a href=\"http:\/\/genome.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/url2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-229 size-full\" src=\"http:\/\/genome.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/url2.jpg\" alt=\"url2\" width=\"681\" height=\"25\" srcset=\"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/url2.jpg 681w, https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/url2-300x11.jpg 300w, https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/url2-624x23.jpg 624w\" sizes=\"auto, (max-width: 681px) 100vw, 681px\" \/><\/a><\/p>\n<p>This URL contains a parameter, <em>hgsid<\/em>, which is actually a pointer to a row in a UCSC database identifying your session and keeping the state of all your variables (we borrowed the name \u201ccart\u201d).\u00a0 If you send this URL to someone, yet keep browsing around, your cart will continue to change as you work, and your friend will see the latest state your Genome Browser is in when she clicks the link. The original state of your cart when you shared the URL is long gone before she sees it.<\/p>\n<p>Your shared URL might even appear to work OK because two of the variables in the URL, <em>db<\/em> (database) and <em>position<\/em>, will override values stored in your cart (cart variables are separated by an ampersand).\u00a0 Your friend will see the right genome assembly (<em>db<\/em> variable) and location (<em>position<\/em> variable) and think she\u2019s seeing what you want.\u00a0 But, if you have turned any data tracks on or off in the interim, or removed a custom track, those changes will also be part of what she sees. The original state is lost.\u00a0 A different colleague could click the link at some other time and see something different still.<\/p>\n<p>As an experiment, here is that same URL in a form you can click or copy\/paste into your web browser:<\/p>\n<p><a href=\"http:\/\/genome.ucsc.edu\/cgi-bin\/hgTracks?db=hg19&amp;position=chr8%3A38311140-38327276&amp;hgsid=438231169_c2xrrbHK2bQhTuHqjEIOniXGqenu\">http:\/\/genome.ucsc.edu\/cgi-bin\/hgTracks?db=hg19&amp;position=chr8%3A38311140-38327276&amp;hgsid=438231169_c2xrrbHK2bQhTuHqjEIOniXGqenu<\/a><\/p>\n<p>Does it look like this?<\/p>\n<p><a href=\"http:\/\/genome.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/watsKriekSessionSm.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-227 size-full\" src=\"http:\/\/genome.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/watsKriekSessionSm.jpg\" alt=\"Untitled\" width=\"800\" height=\"91\" srcset=\"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/watsKriekSessionSm.jpg 800w, https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/watsKriekSessionSm-300x34.jpg 300w, https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/watsKriekSessionSm-624x71.jpg 624w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>That\u2019s what it looked like when I shared the URL. Your click will show the 5\u2019 end of the FGFR1 gene region on human assembly hg19 (because the URL has explicitly included db and position variables), but who knows what tracks might be turned on or off in the interim? Whatever the last person to click it did to it will rule. Every person who reads this blog and clicks the link can change the track configuration for whomever comes next. Only the <em>db<\/em> and <em>position<\/em> are going to persist.<\/p>\n<p><strong>Quick-and-dirty URL hack.\u00a0 \u00a0<\/strong> If you really want a quick-and-dirty way to share a link, here are a couple of suggestions.\u00a0 You could send the link as it is above, then strip a few characters out of the <em>hgsid<\/em> in the URL in your own browser and refresh.\u00a0 Because the new long <em>hgsid<\/em> string will not exist in our database, you will be assigned a new <em>hgsid<\/em> and the state of the old one will stick \u2013 until your friend starts messing with it.\u00a0 Or you could strip out the <em>hgsid<\/em> parameter entirely and add in other parameters that define the tracks you want to turn on, e.g.:<\/p>\n<p>&amp;knownGene=pack&amp;snp142=dense<\/p>\n<p>That will better define the tracks you want, but it is neither as stable nor as easy as saving a Session. You can use \u201chide,\u201d too, to be sure certain tracks are turned off. Read more about configuring your links <a href=\"https:\/\/genome.ucsc.edu\/FAQ\/FAQlink.html#link4\" target=\"_blank\" rel=\"noopener\">here<\/a>.<\/p>\n<p><strong>Share a stable dynamic Session<\/strong>.\u00a0\u00a0\u00a0 The best way to save a train of thought in a stable fashion is via the Saved Session tools under the \u201cMy Data\u201d pulldown menu. A Saved Session acts as a <a href=\"http:\/\/genome.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/mydataFinger.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-213 alignleft\" src=\"http:\/\/genome.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/mydataFinger.jpg\" alt=\"mydataFinger\" width=\"232\" height=\"70\" \/><\/a>stable snapshot of all the details of your Browser view.\u00a0 Saving a thought using this feature requires a login, but it allows you to save the state of a Browser session (semi)-permanently. Anyone viewing your session will be able to further browse around the genome without affecting the session you saved.\u00a0 After you have saved a session, you will see a \u201cBrowser\u201d link that can be copied and shared.<\/p>\n<p>For example, to load the view above as a stable session, try this link (no login is required to view some else\u2019s Saved Session):<\/p>\n<p>http:\/\/genome.ucsc.edu\/cgi-bin\/hgTracks?hgS_doOtherUser=submit&#038;hgS_otherUserName=sessionGallery&#038;hgS_otherUserSessionName=hg19_watsonKriek<\/p>\n<p>Although anyone with this URL can view this session, no one can change it unless logged in as user \u201cSessionGallery.\u201d<\/p>\n<p>In the past we endeavored to save the Session for at least 3-4 months after the last time it was viewed, and custom tracks in sessions were subject to persist for at least 48 hours after the last time they were viewed. We have now moved to not remove session data, unless deleted, and to not remove custom tracks in sessions. \u00a0We still encourage people to save their Session cart to a local file using the \u201cSave Settings\u201d feature (and to keep backups of all their custom tracks on a local machine).\u00a0 That way, you can load your Session settings any time and onto any copy of the Browser (such as to the European mirror or a local Genome Browser-in-a-Box) and avoid any possible loss of data due to unforeseen circumstances.\u00a0 We do the best we can to maintain our servers so that you do not lose your sessions, but computers are only human and they break.<\/p>\n<p><strong>Really stable sessions. \u00a0\u00a0<\/strong> If you are looking to create a permanent link for a publication, you should consider hosting your downloaded Session and any of your own custom data on a server you control (such as in a <a href=\"http:\/\/genome.ucsc.edu\/goldenPath\/help\/hgTrackHubHelp.html\">Track Hub<\/a>). It will still be loaded onto the UCSC Genome Browser, but you are not at the mercy of California earthquakes, wildfires or crashed servers (except for your own).\u00a0 You can read more about building links to remotely hosted user information <a href=\"https:\/\/en.wikipedia.org\/wiki\/UCSC_Genome_Browser#To_Host_Remote_User_Information\" target=\"_blank\" rel=\"noopener\">here<\/a>\u00a0and on our Session&#8217;s Gallery page\u00a0<a href=\"http:\/\/genome.ucsc.edu\/goldenPath\/help\/sessions.html#links\">here.<\/a><\/p>\n<p>On both pages you can learn about the following parameters for forming links to launch sessions from your hub:<\/p>\n<p>hgS_doLoadUrl=submit<br \/>\nhgS_loadUrlName=<\/p>\n<p>We hope we have given you some food for thought about how to make the Genome Browser more useful in your work.\u00a0 Using a reliable method for saving and sharing sessions is great way to avoid the frustration of lost data and misleading links.\u00a0 Stay tuned for more useful Browser tips in future blogs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>by Robert Kuhn\u00a0\u00a0\u00a0\u00a0\u00a0 August 12, 2015 The UCSC Genome Browser is great tool for visualizing your data alongside a ton of data from all over the place.\u00a0 Perhaps, at long last, you have loaded up a gene set, the supporting mRNAs and maybe the SNPs from OMIM or dbSNP, and the Conservation track to make [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":227,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6,5,7,8,9],"class_list":["post-212","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-browser","tag-genome","tag-hgsid","tag-sessions","tag-sharing-sessions"],"jetpack_featured_media_url":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-content\/uploads\/2015\/08\/watsKriekSessionSm.jpg","_links":{"self":[{"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/posts\/212","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/comments?post=212"}],"version-history":[{"count":10,"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/posts\/212\/revisions"}],"predecessor-version":[{"id":928,"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/posts\/212\/revisions\/928"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/media\/227"}],"wp:attachment":[{"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/media?parent=212"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/categories?post=212"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/genome-blog.gi.ucsc.edu\/blog\/wp-json\/wp\/v2\/tags?post=212"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}