PDF output dimensions

9 views
Skip to first unread message

Alex Reynolds

unread,
Aug 22, 2016, 1:38:55 PM8/22/16
to gen...@soe.ucsc.edu
Hello,

In the PDF output from a UCSC genome browser instance, is the left-most column -- the column that contains labels for each track -- always set to a specific pixel width? 

In other words, is the width of this left-most column a constant value, regardless of the number of tracks or the label content within?

Regards,
Alex

Brian Lee

unread,
Aug 23, 2016, 2:31:44 PM8/23/16
to Alex Reynolds, gen...@soe.ucsc.edu
Dear Alex,

Thank you for using the UCSC Genome Browser and your question about the PDF output found under the top blue "View" menu bar.

You may be pleased to learn you can configure the display of the Browser by going to the top blue "Genome Browser" menu bar and then selecting the "Configure" option.

On that screen you can, for example, unselect the box next to "Display labels to the left of items in tracks" and remove track details if desired, or make other display changes. Of particular note is the option to change the number of characters that display in the label area width and the text size of the labels. In this sense the the left-most column can be calibrated on the configuration page and therefore is not a constant value, however the pixel width is dependent upon a user's preference of the number of desired characters to display for each track label in combination with the user's desired text size.

Here are some example sessions with different number of characters selected and different text sizes:

Characters 8, text size 12: http://genome.ucsc.edu/cgi-bin/hgTracks?hgS_doOtherUser=submit&hgS_otherUserName=brianlee&hgS_otherUserSessionName=hg38.8chars.12size

Characters 45, text size 8: http://genome.ucsc.edu/cgi-bin/hgTracks?hgS_doOtherUser=submit&hgS_otherUserName=brianlee&hgS_otherUserSessionName=hg19.45chars.8size

Thank you again for your inquiry and using the UCSC Genome Browser. If you have any further questions, please reply to gen...@soe.ucsc.edu. All messages sent to that address are archived on a publicly-accessible forum. If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

All the best,

Brian Lee
UCSC Genomics Institute
> --
>

Alex Reynolds

unread,
Aug 23, 2016, 3:36:09 PM8/23/16
to gen...@soe.ucsc.edu
Hi Brian,

Thanks for your response. 

So it looks like there are two cart dump variables that could potentially control this display? Via http://genome.ucsc.edu/cgi-bin/cartDump:

hgS_newSessionName hg19.45chars.8size
hgS_otherUserSessionName hg19.45chars.8size

Of these two keys, which gets used to set track detail column width?

Also, is there a part of source code for the genome browser which might suggest how it translates the "Xchars.Ysize" value into pixel width it sets aside for rendering the track detail column?

This might seem like an odd question, but I'd like to programmatically annotate the PDF that comes out of the genome browser, and to do this reliably, to calculate the width of the track detail column. That way, I can demarcate where the actual track data are rendered and place annotations correctly, relative to the figure's interval.

Thanks for any advice.

Regards,
Alex

Brian Lee

unread,
Aug 23, 2016, 3:52:58 PM8/23/16
to Alex Reynolds, gen...@soe.ucsc.edu
Dear Alex,

Thank you for using the UCSC Genome Browser and your question about variables for configuring the display.

The two items you mentioned were session names I created in the session link provided. To learn more about creating sessions please see the Session User Guide page: http://genome.ucsc.edu/goldenPath/help/hgSessionHelp.html

The cart variables that can define these configuration changes are the following:

textSize 8
hgt.labelWidth 45

They can also be added to the URL in this fashion:

&textSize=10
&hgt.labelWidth=45

Here are two example URLs where these are passed to the Browser:

http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&textSize=10&hgt.labelWidth=45
http://genome.ucsc.edu/cgi-bin/hgTracks?db=hg38&textSize=24&hgt.labelWidth=4

Please note that by visiting the "Configure" option under the top blue "Genome Browser" menu bar you will see more details about these options and how text size is limited to these selections: 6,8,10,12,14,18,24,34


Thank you again for your inquiry and using the UCSC Genome Browser. If you have any further questions, please reply to gen...@soe.ucsc.edu. All messages sent to that address are archived on a publicly-accessible forum. If your question includes sensitive data, you may send it instead to genom...@soe.ucsc.edu.

All the best,

Brian Lee
UCSC Genomics Institute


> --
>
Reply all
Reply to author
Forward
0 new messages