[gt-users] gt sketch: controlling order in which tracks are displayed
Sascha Steinbiss
steinbiss at zbh.uni-hamburg.de
Wed Jul 15 11:53:45 CEST 2009
Aaron Quinlan wrote:
> Hello all,
Hello Aaron,
> Briefly, I cannot figure out how to control the order (e.g. from top
> to bottom) in which tracks are displayed in the resulting image when
> using "gt sketch".
<snip>
> Strangely, the order that is actually displayed is neither a) the
> order in which the files are listed on the command line, nor b) the
> order of the the entries in the style file.
> Could someone enlighten me as to how do this? Certainly it must be
> possible.
Up to now, the tracks in the resulting image are sorted alphabetically
by their track identifier (the string displayed at their top). If you
are using the 'gt sketch' tool only, this string is constructed by
concatenation of the file name and the SO type of the features in the
track. So in your case, the tracks are ordered by their file names
(however, uppercase letters come before lowercase letters, which may be
confusing at first).
A possible quick solution would be to rename the files. This would work
with the 'gt sketch' tool. Another solution would be to use a track
selector function (http://genometools.org/trackselectors.html) in a
custom Ruby or Python script. This track selector function can modify
the track identifiers by arbitrary rules (e.g. by prepending a number so
tracks get sorted exactly how you like it).
The problem with a completele free interface for track order is that new
tracks can be created 'on the fly' using track selector functions, so
giving a per-SO-type ordering in the style file will not be sufficient
in all cases. I am still trying to find a good interface in the
AnnotationSketch library for specifying track ordering. If you have any
suggestions, I would be very interested in how you would like to have
this solved ;)
> Many thanks,
> Aaron
> Postdoc, Hall Lab, University of Virginia.
You're welcome!
Best wishes,
Sascha Steinbiss
--
Sascha Steinbiss
Center for Bioinformatics
University of Hamburg
Bundesstr. 43
20146 Hamburg
Germany
Email: steinbiss at zbh.uni-hamburg.de
URL: http://www.zbh.uni-hamburg.de/steinbiss
Phone: +49 (40) 42838 7322
FAX: +49 (40) 42838 7312
More information about the gt-users
mailing list